![]() |
Scanframe Modular Application 0.1.0
|
List model for a sf::InformationBase list. More...
#include <InformationListIdModel.h>


Classes | |
| class | Entry |
Public Types | |
| enum | EField : int { cId , cType , cPurpose , cNamePath } |
| Displayable columns. More... | |
| typedef QList< Entry * > | ListType |
| Type for containing the information for this model. | |
Public Member Functions | |
| InformationListIdModel (QObject *parent=nullptr) | |
| Constructor. | |
| ~InformationListIdModel () override | |
| Constructor. | |
| int | nameLevel () const |
| Gets the levels of names displayed of the variables in the list. | |
| void | setNameLevel (int level) |
| Sets the levels of names displayed of the variables in the list. | |
| void | setItemDelegate (QAbstractItemView *view) |
| Creates a sf::CommonItemDelegate instance for the passed view. | |
| void | refresh () |
| Refresh the attached viewer. | |
| EField | getField (int column) const |
| Gets the field displayed in the column. | |
| int | getColumn (EField field) const |
| Gets the column position or number where the field is displayed. | |
| void | update (int row=-1, int column=-1, const QList< int > &roles={}) |
| Update values in the given column and row. | |
| void | updateField (int row, EField field, const QList< int > &roles={}) |
| Update the column for the given field for all rows. | |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| Overridden from base class to provide column display names. | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Overridden from base class to provide the amount of rows. | |
| QVariant | data (const QModelIndex &index, int role) const override |
| Overridden from base class to provide the data to present. | |
| int | columnCount (const QModelIndex &parent={}) const override |
| Overridden from base class to provide the amount of columns. | |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Overridden from base class to provide flags on an item by index. | |
| void | addEntry (InformationBase *info_base, const QString &purpose, const QString &tip={}) |
| Adds an entry to the list with pointer to the instance actually changed. | |
| void | addEntry (gii::TypeId type_id, gii::IdType *id, const QString &purpose, const QString &tip) |
| Adds an entry to the list only by id and type. | |
| void | clearEntries () |
| Clear the variables added. | |
| const ListType & | getList () const |
| Gets the entry list of the model. | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| Overridden from base class to provide assignment of an item when edited. | |
| Q_SIGNAL void | changed (const Entry *entry) |
| Signals a change of the Variable's property. | |
List model for a sf::InformationBase list.
| typedef QList<Entry*> sf::InformationListIdModel::ListType |
Type for containing the information for this model.
| enum sf::InformationListIdModel::EField : int |
|
explicit |
Constructor.
|
override |
Constructor.
| void sf::InformationListIdModel::addEntry | ( | gii::TypeId | type_id, |
| gii::IdType * | id, | ||
| const QString & | purpose, | ||
| const QString & | tip | ||
| ) |
Adds an entry to the list only by id and type.
| type_id | Type of the id . |
| id | Current id for this instance. |
| purpose | Indicating the purpose of this object. |
| tip | Additional optional information on the purpose. |
| void sf::InformationListIdModel::addEntry | ( | InformationBase * | info_base, |
| const QString & | purpose, | ||
| const QString & | tip = {} |
||
| ) |
Adds an entry to the list with pointer to the instance actually changed.
| info_base | Information object pointer of sf::Variable or sf::ResultData. |
| purpose | Indicating the purpose of this object. |
| tip | Additional optional information on the purpose. |
| Q_SIGNAL void sf::InformationListIdModel::changed | ( | const Entry * | entry | ) |
| void sf::InformationListIdModel::clearEntries | ( | ) |
Clear the variables added.
|
override |
Overridden from base class to provide the amount of columns.
|
override |
Overridden from base class to provide the data to present.
|
override |
Overridden from base class to provide flags on an item by index.
| int sf::InformationListIdModel::getColumn | ( | EField | field | ) | const |
Gets the column position or number where the field is displayed.
| field |
| EField sf::InformationListIdModel::getField | ( | int | column | ) | const |
Gets the field displayed in the column.
| column | Position or number of the column |
| const ListType & sf::InformationListIdModel::getList | ( | ) | const |
Gets the entry list of the model.
|
override |
Overridden from base class to provide column display names.
| int sf::InformationListIdModel::nameLevel | ( | ) | const |
Gets the levels of names displayed of the variables in the list.
| void sf::InformationListIdModel::refresh | ( | ) |
Refresh the attached viewer.
|
override |
Overridden from base class to provide the amount of rows.
|
override |
Overridden from base class to provide assignment of an item when edited.
| void sf::InformationListIdModel::setItemDelegate | ( | QAbstractItemView * | view | ) |
Creates a sf::CommonItemDelegate instance for the passed view.
| void sf::InformationListIdModel::setNameLevel | ( | int | level | ) |
Sets the levels of names displayed of the variables in the list.
| void sf::InformationListIdModel::update | ( | int | row = -1, |
| int | column = -1, |
||
| const QList< int > & | roles = {} |
||
| ) |
Update values in the given column and row.
| row | When -1 all rows are selected. |
| column | When -1 all columns are selected. |
| roles | Roles to update. |
| void sf::InformationListIdModel::updateField | ( | int | row, |
| EField | field, | ||
| const QList< int > & | roles = {} |
||
| ) |
Update the column for the given field for all rows.
| row | When -1 all rows are selected. |
| field | Translated to the column containing the field. |
| roles | Roles to update. |