|
QtPdCom
1.0.0
|
Table model. More...
#include <TableModel.h>


Classes | |
| struct | Exception |
| Exception type. More... | |
| class | Impl |
| Table model. More... | |
Public Slots | |
| void | commit () |
| Commits all edited data. | |
| void | revert () |
| Reverts all edited data. | |
| void | addRow () |
| updates the visibleRowCount variable. | |
| void | remRow () |
| updates the visibleRowCount variable. | |
Signals | |
| void | editingChanged (bool) |
Public Member Functions | |
| TableModel (QObject *parent=nullptr) | |
| Constructor. | |
| ~TableModel () | |
| Destructor. | |
| void | addColumn (TableColumn *) |
| Adds a column. | |
| void | clearColumns () |
| Clears the Columns. | |
| bool | isEditing () const |
| unsigned int | getRowCapacity () const |
| bool | hasVisibleRowsVariable () const |
| virtual int | rowCount (const QModelIndex &) const |
| Implements the model interface. | |
| virtual int | columnCount (const QModelIndex &) const |
| Implements the model interface. | |
| virtual QVariant | data (const QModelIndex &, int) const |
| Implements the Model interface. | |
| virtual QVariant | headerData (int, Qt::Orientation, int) const |
| Implements the Model interface. | |
| virtual Qt::ItemFlags | flags (const QModelIndex &) const |
| Implements the Model interface. | |
| virtual bool | setData (const QModelIndex &, const QVariant &, int) |
| void | setHighlightRowVariable (PdCom::Variable, const PdCom::Selector &={}, const Transmission &=QtPdCom::event_mode) |
| Subscribe to a process variable for highlighting a row. | |
| void | setHighlightRowVariable (PdCom::Process *, const QString &, const PdCom::Selector &={}, const Transmission &=QtPdCom::event_mode) |
| Subscribe to a process variable for highlighting a row. | |
| void | clearHighlightRowVariable () |
| void | setVisibleRowsVariable (PdCom::Variable pv) |
| Subscribe to a process variable for setting the visible rows of the Table, this is most often a parameter which also gets updated if the Table row count gets changed by editing. | |
| void | clearVisibleRowsVariable () |
| void | setHighlightColor (QColor, int=-1) |
| void | setDisabledColor (QColor, int=-1) |
Private Slots | |
| void | dimensionChanged () |
| Reacts on process variable dimension changes. | |
| void | columnHeaderChanged () |
| Reacts on header data changes. | |
| void | valueChanged () |
| Reacts on process variable changes. | |
| void | highlightRowChanged () |
| void | visibleRowCountChanged () |
Private Attributes | |
| class Q_DECL_HIDDEN | Impl |
| std::unique_ptr< Impl > | impl |
Table model.
| TableModel::TableModel | ( | QObject * | parent = nullptr | ) |
Constructor.
References highlightRowChanged(), impl, valueChanged(), and visibleRowCountChanged().
| TableModel::~TableModel | ( | ) |
Destructor.
References clearColumns(), and impl.
| void TableModel::addColumn | ( | TableColumn * | col | ) |
Adds a column.
References columnHeaderChanged(), dimensionChanged(), impl, and valueChanged().
|
slot |
updates the visibleRowCount variable.
References impl.
| void TableModel::clearColumns | ( | ) |
Clears the Columns.
References columnHeaderChanged(), dimensionChanged(), impl, and valueChanged().
Referenced by ~TableModel().
| void TableModel::clearHighlightRowVariable | ( | ) |
References impl.
Referenced by setHighlightRowVariable().
| void TableModel::clearVisibleRowsVariable | ( | ) |
References impl.
Referenced by setVisibleRowsVariable().
|
virtual |
|
privateslot |
|
slot |
Commits all edited data.
References editingChanged(), and impl.
|
virtual |
Implements the Model interface.
References impl.
|
privateslot |
Reacts on process variable dimension changes.
References impl.
Referenced by addColumn(), and clearColumns().
|
signal |
|
virtual |
Implements the Model interface.
References impl.
| unsigned int TableModel::getRowCapacity | ( | ) | const |
References impl.
| bool TableModel::hasVisibleRowsVariable | ( | ) | const |
References impl.
|
virtual |
Implements the Model interface.
References impl.
|
privateslot |
References impl.
Referenced by TableModel().
|
slot |
updates the visibleRowCount variable.
References impl.
|
slot |
Reverts all edited data.
References editingChanged(), and impl.
|
virtual |
|
virtual |
References editingChanged(), impl, and isEditing().
| void TableModel::setDisabledColor | ( | QColor | dc, |
| int | idx = -1 |
||
| ) |
References impl.
| void TableModel::setHighlightColor | ( | QColor | hc, |
| int | idx = -1 |
||
| ) |
References impl.
| void TableModel::setHighlightRowVariable | ( | PdCom::Process * | process, |
| const QString & | path, | ||
| const PdCom::Selector & | selector = {}, |
||
| const Transmission & | transmission = QtPdCom::event_mode |
||
| ) |
Subscribe to a process variable for highlighting a row.
The variable value determines the highlighted row.
| process | Process variable. |
| path | Variable path. |
| selector | Selector. |
| transmission | Transmission. |
References clearHighlightRowVariable(), and impl.
| void TableModel::setHighlightRowVariable | ( | PdCom::Variable | pv, |
| const PdCom::Selector & | selector = {}, |
||
| const Transmission & | transmission = QtPdCom::event_mode |
||
| ) |
Subscribe to a process variable for highlighting a row.
The variable value determines the highlighted row.
| pv | Process variable. |
| selector | Selector. |
| transmission | Transmission. |
References clearHighlightRowVariable(), and impl.
| void TableModel::setVisibleRowsVariable | ( | PdCom::Variable | pv | ) |
Subscribe to a process variable for setting the visible rows of the Table, this is most often a parameter which also gets updated if the Table row count gets changed by editing.
| pv | Process variable. |
References clearVisibleRowsVariable(), and impl.
|
privateslot |
Reacts on process variable changes.
References QtPdCom::TableColumn::getRows(), and impl.
Referenced by addColumn(), clearColumns(), and TableModel().
|
privateslot |
References impl.
Referenced by TableModel().
|
private |
|
private |
Referenced by addColumn(), addRow(), clearColumns(), clearHighlightRowVariable(), clearVisibleRowsVariable(), columnCount(), columnHeaderChanged(), commit(), data(), dimensionChanged(), flags(), getRowCapacity(), hasVisibleRowsVariable(), headerData(), highlightRowChanged(), isEditing(), remRow(), revert(), rowCount(), setData(), setDisabledColor(), setHighlightColor(), setHighlightRowVariable(), setVisibleRowsVariable(), TableModel(), valueChanged(), visibleRowCountChanged(), and ~TableModel().