Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
gva::WidgetTableDynamic Class Reference

A widget representing a table of elements. More...

#include <table_dynamic.h>

Inheritance diagram for gva::WidgetTableDynamic:
Inheritance graph
Collaboration diagram for gva::WidgetTableDynamic:
Collaboration graph

Public Types

enum class  SortType { kSortUnsorted = 0 , kSortAscending , kSortDescending }
 An enum representing to type of sort.
 

Public Member Functions

 WidgetTableDynamic (const RendererGva &renderer, TouchGva *touch, uint32_t background_colour)
 Construct a new Widget Table Dynamic object.
 
 ~WidgetTableDynamic () final=default
 Destroy the Widget Keyboard object.
 
std::string GetWidgetName () const final
 Get the Widget Name attribute.
 
void Draw () final
 The base class override to draw the table once setup.
 
void AddRow (uint32_t foreground_colour, uint32_t background_colour, uint32_t outline_colour, uint32_t highlight_colour, widget::WeightType font_weight) final
 Add a row to the table.
 
void AddRow () final
 Add a row to the table.
 
void AddRow (widget::WeightType font_weight) final
 Add a row to the table.
 
void AddCell (const std::string text, uint32_t width) final
 Add a basic cell.
 
void AddCell (const std::string text, uint32_t width, uint32_t background_colour) final
 Add a new cell with background colour.
 
void AddCell (const std::string text, uint32_t width, widget::CellAlignType align) final
 Add a new cell specifying alignment.
 
void AddCell (const std::string text, uint32_t width, widget::CellAlignType align, uint32_t background_colour) final
 Add a new cell specifying alignment.
 
void SetHideOverride (bool hide)
 Set the Hide Override attribute.
 
bool GetHideOverride () const
 Get the Hide Override attribute.
 
void SetSorted (SortType sort)
 Set the Sorted attribute.
 
SortType GetSorted () const
 Get the Sorted attribute.
 
void SetAllHighlighted (bool highlight_all)
 Set the All Highlighted attribute.
 
bool GetAllHighlighted () const
 Get the All Highlighted attribute.
 
- Public Member Functions inherited from gva::WidgetTable
 WidgetTable (const RendererGva &renderer, TouchGva *touch, uint32_t background_colour=0x000000)
 Construct a new Widget Table object.
 
 ~WidgetTable () override=default
 Destroy the Widget Keyboard object.
 
void Reset ()
 Reset the table.
 
uint32_t GetBackgroundColour () const
 Get the Background Colour attribute.
 
void SetBackgroundColour (uint32_t background_colour)
 Set the Background Colour attribute.
 
void SetCurrentRow (uint32_t row)
 Set the Current selected row, will be highlighted in the theme colours.
 
void SetNextRow ()
 Set the Next Row attribute.
 
void SetPreviousRow ()
 Set the Previous Row attribute.
 
uint32_t GetCurrentRow () const
 Get the Current selected highlighted row.
 
std::vector< RowType > & GetRows ()
 Get the Rows vector.
 
void SetRows (const std::vector< RowType > &rows)
 Get the all the Rows in supplie vector.
 
- Public Member Functions inherited from gva::WidgetX
 WidgetX (const RendererGva &renderer, widget::WidgetEnum widget_type)
 Construct a new Widget X object.
 
virtual widget::WidgetEnum GetWidgetType () const
 Get the Widget Type attribute.
 
void SetVisible (bool visible)
 Set the Visible object.
 
bool GetVisible () const
 Get the Visible object.
 
virtual void SetX (uint32_t x)
 Set the X dimension.
 
uint32_t GetX () const
 Get the Y dimension.
 
virtual void SetY (uint32_t y)
 Set the Y dimension.
 
uint32_t GetY () const
 Get the Y dimension.
 
void SetWidth (uint32_t width)
 Set the Width.
 
uint32_t GetWidth () const
 Get the Width.
 
void SetHeight (uint32_t width)
 Set the Height.
 
uint32_t GetHeight () const
 Get the Height.
 
widget::WidgetEnum GetType () const
 Get the Type object.
 
RendererGvaGetRenderer () const
 Get the Renderer object.
 
void SetStateText (LabelStates state)
 Set the State Text of an on screen label.
 
void SetStateLabel (const LabelStates state)
 Set the State Label object.
 
uint32_t GetStateTextColour (LabelStates state) const
 Get the State Text Colour object.
 

Additional Inherited Members

- Data Fields inherited from gva::WidgetX
uint32_t x_ = 0
 The widget x location in pixels.
 
uint32_t y_ = 0
 The widget y location in pixels.
 
uint32_t width_ = 0
 The widget width in pixels.
 
uint32_t height_ = 0
 The widget height in pixels.
 

Detailed Description

A widget representing a table of elements.

Constructor & Destructor Documentation

◆ WidgetTableDynamic()

gva::WidgetTableDynamic::WidgetTableDynamic ( const RendererGva renderer,
TouchGva touch,
uint32_t  background_colour 
)
explicit

Construct a new Widget Table Dynamic object.

Parameters
rendererThe Gva renderer
touchThe touch object
background_colourThe background colour

Member Function Documentation

◆ AddCell() [1/4]

void gva::WidgetTableDynamic::AddCell ( const std::string  text,
uint32_t  width 
)
finalvirtual

Add a basic cell.

widgets

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels

Reimplemented from gva::WidgetTable.

◆ AddCell() [2/4]

void gva::WidgetTableDynamic::AddCell ( const std::string  text,
uint32_t  width,
uint32_t  background_colour 
)
finalvirtual

Add a new cell with background colour.

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels
background_colourCell background colour

Reimplemented from gva::WidgetTable.

◆ AddCell() [3/4]

void gva::WidgetTableDynamic::AddCell ( const std::string  text,
uint32_t  width,
widget::CellAlignType  align 
)
finalvirtual

Add a new cell specifying alignment.

Parameters
textThe text to be contained in the cell
widthThe width of the ctable_
alignAlignment CellAlignType

Reimplemented from gva::WidgetTable.

◆ AddCell() [4/4]

void gva::WidgetTableDynamic::AddCell ( const std::string  text,
uint32_t  width,
widget::CellAlignType  align,
uint32_t  background_colour 
)
finalvirtual

Add a new cell specifying alignment.

Parameters
textThe text to be contained in the cell
widthThe width of the cell in pixels
alignAlignment CellAlignType::
background_colourCell background colour

Reimplemented from gva::WidgetTable.

◆ AddRow() [1/3]

void gva::WidgetTableDynamic::AddRow ( )
finalvirtual

Add a row to the table.

Reimplemented from gva::WidgetTable.

◆ AddRow() [2/3]

void gva::WidgetTableDynamic::AddRow ( uint32_t  foreground_colour,
uint32_t  background_colour,
uint32_t  outline_colour,
uint32_t  highlight_colour,
widget::WeightType  font_weight 
)
finalvirtual

Add a row to the table.

Parameters
foreground_colourForeground colour
background_colourBackground colour
outline_colourOutline colour
highlight_colourHighlight colour
font_weightThe font weight

Reimplemented from gva::WidgetTable.

◆ AddRow() [3/3]

void gva::WidgetTableDynamic::AddRow ( widget::WeightType  font_weight)
finalvirtual

Add a row to the table.

Parameters
font_weightThe font weight

Reimplemented from gva::WidgetTable.

◆ Draw()

void gva::WidgetTableDynamic::Draw ( )
finalvirtual

The base class override to draw the table once setup.

Reimplemented from gva::WidgetTable.

◆ GetAllHighlighted()

bool gva::WidgetTableDynamic::GetAllHighlighted ( ) const

Get the All Highlighted attribute.

Returns
true if all currently highlighted
false if only some highlighted

◆ GetHideOverride()

bool gva::WidgetTableDynamic::GetHideOverride ( ) const

Get the Hide Override attribute.

Returns
true if overridden alarms are hidden
false otherwise

◆ GetSorted()

WidgetTableDynamic::SortType gva::WidgetTableDynamic::GetSorted ( ) const

Get the Sorted attribute.

Returns
true
false

◆ GetWidgetName()

std::string gva::WidgetTableDynamic::GetWidgetName ( ) const
inlinefinalvirtual

Get the Widget Name attribute.

Returns
std::string

Reimplemented from gva::WidgetTable.

◆ SetAllHighlighted()

void gva::WidgetTableDynamic::SetAllHighlighted ( bool  highlight_all)

Set the All Highlighted attribute.

Parameters
highlight_alltrue if all to be highlighted, false to unset all bar first row

◆ SetHideOverride()

void gva::WidgetTableDynamic::SetHideOverride ( bool  hide)

Set the Hide Override attribute.

Parameters
hide

◆ SetSorted()

void gva::WidgetTableDynamic::SetSorted ( SortType  sort)

Set the Sorted attribute.

Parameters
sort

The documentation for this class was generated from the following files: