#include "TableCfg.h"
Public Types | |
| enum class | TableHeaderMode { NoHeader , Horizontal , Vertical } |
Public Types inherited from ot::WidgetViewBase | |
| enum | ViewFlag { NoViewFlags = 0x00 , ViewIsCloseable = 0x01 , ViewDefaultCloseHandling = 0x02 , ViewIsPinnable = 0x04 , ViewIsCentral = 0x10 , ViewIsSide = 0x20 , ViewIsTool = 0x40 } |
| ViewFlags are used to describe the view behaviour in the frontend. More... | |
| enum | ViewDockLocation { Default , Left , Top , Right , Bottom } |
| /ref ViewFlag "ViewFlag" More... | |
| enum | ViewType { View3D , View1D , ViewText , ViewTable , ViewVersion , ViewGraphics , ViewGraphicsPicker , ViewProperties , ViewNavigation , CustomView } |
| typedef Flags< ViewFlag > | ViewFlags |
Public Member Functions | |
| TableCfg (int _rows=0, int _columns=0, WidgetViewBase _baseInfo=WidgetViewBase(WidgetViewBase::ViewTable, WidgetViewBase::ViewIsCentral|WidgetViewBase::ViewIsCloseable)) | |
| TableCfg (const ot::GenericDataStructMatrix &_matrix, TableCfg::TableHeaderMode _headerMode) | |
| TableCfg (const TableCfg &_other) | |
| TableCfg (TableCfg &&_other) noexcept | |
| virtual | ~TableCfg () |
| TableCfg & | operator= (const TableCfg &_other) |
| TableCfg & | operator= (TableCfg &&_other) noexcept |
| virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
| Add the object contents to the provided JSON object. | |
| virtual void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
| Set the object contents from the provided JSON object. | |
| void | clear (void) |
| Clears all the data. Resets the row and column count back to 0. | |
| int | getRowCount (void) const |
| int | getColumnCount (void) const |
| const std::vector< std::vector< std::string > > & | getRows (void) const |
| const std::vector< std::string > & | getRow (int _row) const |
| void | setCellText (int _row, int _column, const std::string &_text) |
| const std::string & | getCellText (int _row, int _column) const |
| void | setRowHeader (int _row, const std::string &_headerText) |
| void | setRowHeader (int _row, TableHeaderItemCfg *_item) |
| const TableHeaderItemCfg * | getRowHeader (int _row) const |
| void | setColumnHeader (int _column, const std::string &_headerText) |
| void | setColumnHeader (int _column, TableHeaderItemCfg *_item) |
| const TableHeaderItemCfg * | getColumnHeader (int _column) const |
Public Member Functions inherited from ot::WidgetViewBase | |
| WidgetViewBase (ViewType _type, ViewFlags _flags=ViewFlags()) | |
| WidgetViewBase (const std::string &_entityName, const std::string &_title, ViewType _type, ViewFlags _flags=ViewFlags()) | |
| WidgetViewBase (const std::string &_entityName, const std::string &_title, ViewDockLocation _dockLocation, ViewType _type, ViewFlags _flags=ViewFlags()) | |
| WidgetViewBase (const WidgetViewBase &_other) | |
| virtual | ~WidgetViewBase () |
| WidgetViewBase & | operator= (const WidgetViewBase &_other) |
| void | setTitle (const std::string &_title) |
| const std::string & | getTitle (void) const |
| void | setViewFlag (ViewFlag _flag, bool _active=true) |
| Set the widget view flag. | |
| void | setViewFlags (ViewFlags _flags) |
| Replace the current flags with the flags provided. | |
| ViewFlags | getViewFlags (void) const |
| Returns the current flags. | |
| void | setViewType (ViewType _type) |
| ViewType | getViewType (void) const |
| void | setDockLocation (ViewDockLocation _dockLocation) |
| Set the dock location. | |
| ViewDockLocation | getDockLocation (void) const |
| Returns the dock location. | |
| void | setEntityInformation (const BasicEntityInformation &_info) |
Public Member Functions inherited from ot::BasicEntityInformation | |
| BasicEntityInformation () | |
| BasicEntityInformation (const std::string &_entityName) | |
| BasicEntityInformation (const std::string &_entityName, UID _entityId, UID _entityVersion) | |
| BasicEntityInformation (const BasicEntityInformation &_other) | |
| virtual | ~BasicEntityInformation () |
| BasicEntityInformation & | operator= (const BasicEntityInformation &_other) |
| void | setEntityName (const std::string &_entityName) |
| const std::string & | getEntityName (void) const |
| void | setEntityID (UID _entityId) |
| UID | getEntityID (void) const |
| void | setEntityVersion (UID _entityVersion) |
| UID | getEntityVersion (void) const |
Public Member Functions inherited from ot::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
Static Public Member Functions | |
| static std::string | toString (TableHeaderMode _headerMode) |
| static TableHeaderMode | stringToHeaderMode (const std::string &_headerMode) |
Static Public Member Functions inherited from ot::WidgetViewBase | |
| static std::string | toString (ViewFlag _flag) |
| Returns a string representation of the provided view flag. | |
| static ViewFlag | stringToViewFlag (const std::string &_flag) |
| Returns The view flag represented by the provided string. | |
| static std::list< std::string > | toStringList (ViewFlags _flags) |
| Returns a string list contaning a string representation of every set flag in the provided view flags. | |
| static ViewFlags | stringListToViewFlags (const std::list< std::string > &_flags) |
| Returns the view flags represented by the provided string list. | |
| static std::string | toString (ViewDockLocation _dockLocation) |
| Returns the string representation of the provided view dock location. | |
| static ViewDockLocation | stringToDockLocation (const std::string &_dockLocation) |
| Returns the view dock location represented by the provided string. | |
| static std::string | toString (ViewType _type) |
| Returns the string representation of the provided view type. | |
| static ViewType | stringToViewType (const std::string &_type) |
| Returns the view type represented by the provided string. | |
|
strong |
| ot::TableCfg::TableCfg | ( | int | _rows = 0, |
| int | _columns = 0, | ||
| WidgetViewBase | _baseInfo = WidgetViewBase(WidgetViewBase::ViewTable, WidgetViewBase::ViewIsCentral | WidgetViewBase::ViewIsCloseable) ) |
| ot::TableCfg::TableCfg | ( | const ot::GenericDataStructMatrix & | _matrix, |
| TableCfg::TableHeaderMode | _headerMode ) |
| ot::TableCfg::TableCfg | ( | const TableCfg & | _other | ) |
|
noexcept |
|
virtual |
|
overridevirtual |
Add the object contents to the provided JSON object.
| _object | Json object reference to write the data to. |
| _allocator | Allocator. |
Reimplemented from ot::WidgetViewBase.
| void ot::TableCfg::clear | ( | void | ) |
Clears all the data. Resets the row and column count back to 0.
| const std::string & ot::TableCfg::getCellText | ( | int | _row, |
| int | _column ) const |
|
inline |
| const ot::TableHeaderItemCfg * ot::TableCfg::getColumnHeader | ( | int | _column | ) | const |
| const std::vector< std::string > & ot::TableCfg::getRow | ( | int | _row | ) | const |
|
inline |
| const ot::TableHeaderItemCfg * ot::TableCfg::getRowHeader | ( | int | _row | ) | const |
|
inline |
| ot::TableCfg & ot::TableCfg::operator= | ( | const TableCfg & | _other | ) |
|
noexcept |
| void ot::TableCfg::setCellText | ( | int | _row, |
| int | _column, | ||
| const std::string & | _text ) |
| void ot::TableCfg::setColumnHeader | ( | int | _column, |
| const std::string & | _headerText ) |
| void ot::TableCfg::setColumnHeader | ( | int | _column, |
| TableHeaderItemCfg * | _item ) |
|
overridevirtual |
Set the object contents from the provided JSON object.
| _object | The JSON object containing the information. |
| May | throw an exception if the provided object is not valid (members missing or invalid types). |
Reimplemented from ot::WidgetViewBase.
| void ot::TableCfg::setRowHeader | ( | int | _row, |
| const std::string & | _headerText ) |
| void ot::TableCfg::setRowHeader | ( | int | _row, |
| TableHeaderItemCfg * | _item ) |
|
static |
|
static |