|
QtPdCom
1.5.2
|
Table Column. More...
#include <TableColumn.h>


Classes | |
| struct | Exception |
| Exception type. More... | |
Public Types | |
| enum | Roles { HighlightRole = Qt::UserRole + 1, ValidRole, IsEnabledRole, IsEditingRole, DecimalsRole, LowerLimitRole, UpperLimitRole } |
Signals | |
| void | dimensionChanged () |
| void | headerChanged () |
| void | valueChanged () |
Public Member Functions | |
| TableColumn (const QString &=QString(), QObject *parent=nullptr) | |
| Constructor. More... | |
| ~TableColumn () | |
| Destructor. More... | |
| void | setHeader (const QString &) |
| Sets the column header. More... | |
| const QString & | getHeader () const |
| void | setVariable (PdCom::Variable, const Transmission &=QtPdCom::event_mode, double=1.0, double=0.0) |
| Subscribes to a ProcessVariable. More... | |
| void | setVariable (PdCom::Process *, const QString &, const Transmission &=QtPdCom::event_mode, double=1.0, double=0.0) |
| Subscribes to a ProcessVariable. More... | |
| void | clearVariable () |
| Unsubscribe from a Variable. More... | |
| void | clearData () |
| quint32 | getDecimals () const |
| Returns the number of decimals. More... | |
| void | setDecimals (quint32) |
| Sets the number of decimals. More... | |
| double | getLowerLimit () const |
| Limits are hints for the input delegate. More... | |
| void | setLowerLimit (double) |
| Sets the lowerlimit for the values of the col. More... | |
| double | getUpperLimit () const |
| Returns the upperlimit for the values of the col. More... | |
| void | setUpperLimit (double) |
| Sets the upperlimit for the values of the col. More... | |
| unsigned int | getRows () const |
| Get number of rows. More... | |
| QVariant | data (unsigned int, int) const |
| Get display text. More... | |
| QVariant | headerData (int) const |
| Get header data. More... | |
| Qt::ItemFlags | flags (unsigned int) const |
| Implements the Model interface. More... | |
| bool | setData (unsigned int, const QString &, int) |
| Set an edit value. More... | |
| void | setEnabled (bool, int=-1) |
| Set enabled for a column. More... | |
| bool | isEditing () const |
| bool | isEnabled () const |
| void | commit () |
| Write edited data to the process. More... | |
| void | revert () |
| Reverts all edited values. More... | |
| void | setHighlightRow (int) |
| void | setHighlightColor (QColor) |
| void | setDisabledColor (QColor) |
| Q_ENUM (Roles) | |
Private Attributes | |
| class Q_DECL_HIDDEN | Impl |
| std::unique_ptr< Impl > | impl |
Friends | |
| class | TableModel |
Table Column.
| TableColumn::TableColumn | ( | const QString & | header = QString(), |
| QObject * | parent = nullptr |
||
| ) |
Constructor.
| TableColumn::~TableColumn | ( | ) |
Destructor.
| void TableColumn::clearData | ( | ) |
References impl, and valueChanged().
| void TableColumn::clearVariable | ( | ) |
Unsubscribe from a Variable.
References dimensionChanged(), impl, and valueChanged().
Referenced by setVariable().
| void TableColumn::commit | ( | ) |
Write edited data to the process.
References impl, and valueChanged().
| QVariant TableColumn::data | ( | unsigned int | row, |
| int | role | ||
| ) | const |
Get display text.
References DecimalsRole, getDecimals(), getLowerLimit(), getUpperLimit(), HighlightRole, impl, isEditing(), IsEditingRole, isEnabled(), IsEnabledRole, LowerLimitRole, UpperLimitRole, and ValidRole.
Referenced by setData().
|
signal |
Referenced by clearVariable(), setVariable(), and QtPdCom::QtPdCom::TableColumn::Impl::stateChanged().
| Qt::ItemFlags TableColumn::flags | ( | unsigned int | row | ) | const |
Implements the Model interface.
References impl.
| quint32 TableColumn::getDecimals | ( | ) | const |
| const QString & TableColumn::getHeader | ( | ) | const |
References impl.
| double TableColumn::getLowerLimit | ( | ) | const |
| unsigned int TableColumn::getRows | ( | ) | const |
| double TableColumn::getUpperLimit | ( | ) | const |
|
signal |
Referenced by setHeader().
| QVariant TableColumn::headerData | ( | int | role | ) | const |
Get header data.
References impl.
| QtPdCom::TableColumn::Q_ENUM | ( | Roles | ) |
| void TableColumn::revert | ( | ) |
Reverts all edited values.
References impl, and valueChanged().
| bool TableColumn::setData | ( | unsigned int | row, |
| const QString & | valueString, | ||
| int | role | ||
| ) |
Set an edit value.
References data(), impl, and valueChanged().
| void TableColumn::setDecimals | ( | quint32 | value | ) |
Sets the number of decimals.
References impl, and valueChanged().
| void TableColumn::setDisabledColor | ( | QColor | dc | ) |
References impl, and valueChanged().
| void TableColumn::setEnabled | ( | bool | value, |
| int | row = -1 |
||
| ) |
Set enabled for a column.
References impl, and valueChanged().
| void TableColumn::setHeader | ( | const QString & | h | ) |
Sets the column header.
References headerChanged(), and impl.
| void TableColumn::setHighlightColor | ( | QColor | hc | ) |
References impl, and valueChanged().
| void TableColumn::setHighlightRow | ( | int | value | ) |
References impl, and valueChanged().
| void TableColumn::setLowerLimit | ( | double | value | ) |
Sets the lowerlimit for the values of the col.
References impl, and valueChanged().
| void TableColumn::setUpperLimit | ( | double | value | ) |
Sets the upperlimit for the values of the col.
References impl, and valueChanged().
| void TableColumn::setVariable | ( | PdCom::Variable | pv, |
| const Transmission & | transmission = QtPdCom::event_mode, |
||
| double | scale = 1.0, |
||
| double | offset = 0.0 |
||
| ) |
Subscribes to a ProcessVariable.
References clearVariable(), dimensionChanged(), impl, QtPdCom::Transmission::toString(), and valueChanged().
| void TableColumn::setVariable | ( | PdCom::Process * | process, |
| const QString & | path, | ||
| const Transmission & | transmission = QtPdCom::event_mode, |
||
| double | scale = 1.0, |
||
| double | offset = 0.0 |
||
| ) |
Subscribes to a ProcessVariable.
References clearVariable(), dimensionChanged(), impl, QtPdCom::Transmission::toString(), and valueChanged().
|
signal |
|
friend |
|
private |
|
private |
Referenced by clearData(), clearVariable(), commit(), data(), flags(), getDecimals(), getHeader(), getLowerLimit(), getRows(), getUpperLimit(), headerData(), isEditing(), isEnabled(), revert(), setData(), setDecimals(), setDisabledColor(), setEnabled(), setHeader(), setHighlightColor(), setHighlightRow(), setLowerLimit(), setUpperLimit(), and setVariable().