Multi diag tools
|
Item of a VariantTableModel. More...
#include <VariantTableModelItem.h>
Public Member Functions | |
VariantTableModelItem (VariantTableModelStorageRule storageRule) | |
Construct a item. | |
bool | isEditRoleDataSeparate () const |
Check if edit role data is stored separately from display role data. | |
void | setDisplayRoleData (const QVariant &data) |
Set data for display role. | |
QVariant | displayRoleData () const |
Get data for display role. | |
void | setEditRoleData (const QVariant &data) |
Set data for edit role. More... | |
QVariant | editRoleData () const |
Get data for edit role. More... | |
void | setData (const QVariant &data, int role) |
Set data. More... | |
QVariant | data (int role) const |
Get data. More... | |
void | setEnabled (bool enable) |
Set item enabled/disabled. More... | |
bool | isEnabled () const |
Check if item is enabled. | |
void | setEditable (bool editable) |
Set item editable/read only. More... | |
bool | isEditable () const |
Check if item is editable. | |
Qt::ItemFlags | flags (Qt::ItemFlags currentFlags) const |
Get flags. More... | |
Item of a VariantTableModel.
Definition at line 32 of file VariantTableModelItem.h.
|
inline |
Get data.
Definition at line 92 of file VariantTableModelItem.h.
|
inline |
Get data for edit role.
If isEditRoleDataSeparate() is true, returns data set by setEditRoleData(), else it returns the same as displayRoleData()
Definition at line 74 of file VariantTableModelItem.h.
Qt::ItemFlags Mdt::ItemModel::VariantTableModelItem::flags | ( | Qt::ItemFlags | currentFlags | ) | const |
Get flags.
Returns currentFlags with Qt::ItemIsEditable and ItemIsEnabled set or unset regarding isEditable() and isEnabled().
Definition at line 53 of file VariantTableModelItem.cpp.
void Mdt::ItemModel::VariantTableModelItem::setData | ( | const QVariant & | data, |
int | role | ||
) |
Set data.
Definition at line 42 of file VariantTableModelItem.cpp.
|
inline |
Set item editable/read only.
Default id editable
Definition at line 123 of file VariantTableModelItem.h.
void Mdt::ItemModel::VariantTableModelItem::setEditRoleData | ( | const QVariant & | data | ) |
Set data for edit role.
If isEditRoleDataSeparate() is false, this will be the same as setDisplayRoleData()
Definition at line 33 of file VariantTableModelItem.cpp.
|
inline |
Set item enabled/disabled.
Default is enabled
Definition at line 107 of file VariantTableModelItem.h.