|
swift
|
Format as bool LED value. More...
Public Member Functions | |
| CBoolLedFormatter (int alignment=alignDefault()) | |
| Constructor. | |
| CBoolLedFormatter (const QString &onName, const QString &offName, int alignment=alignDefault()) | |
| Constructor. | |
| swift::misc::CVariant | displayRole (const swift::misc::CVariant &dataCVariant) const |
| Value provided as CVariant, formatter converts to standard types or string. Used with Qt::DisplayRole displaying a text. More... | |
| swift::misc::CVariant | decorationRole (const swift::misc::CVariant &dataCVariant) const |
| Display the LED. | |
| swift::misc::CVariant | tooltipRole (const swift::misc::CVariant &dataCVariant) const |
| Value provided as CVariant, formatter converts to QString. Used with Qt::ToolTipRole displaying a text. More... | |
Public Member Functions inherited from swift::gui::models::CBoolTextFormatter | |
| CBoolTextFormatter (int alignment=alignDefault(), const QString &trueName="true", const QString &falseName="false", const QList< int > &supportedRoles=roleDisplay()) | |
| Constructor. | |
| Qt::ItemFlags | flags (Qt::ItemFlags flags, bool editable) const |
| Flags. More... | |
Public Member Functions inherited from swift::gui::models::CDefaultFormatter | |
| CDefaultFormatter (int alignment=alignDefault(), bool i18n=true, const QList< int > &supportedRoles={ Qt::DisplayRole }) | |
| Constructor. | |
| virtual | ~CDefaultFormatter ()=default |
| Virtual destructor. | |
| CDefaultFormatter (const CDefaultFormatter &)=default | |
| Copy constructor. | |
| CDefaultFormatter & | operator= (const CDefaultFormatter &)=default |
| Copy assignment operator. | |
| virtual swift::misc::CVariant | editRole (const swift::misc::CVariant &dataCVariant) const |
| Value provided as CVariant, formatter converts to standard types or string. Used with Qt::DisplayRole displaying a text. | |
| virtual swift::misc::CVariant | alignmentRole () const |
| Qt::Alignment (as CVariant) | |
| virtual swift::misc::CVariant | checkStateRole (const swift::misc::CVariant &value) const |
| Value provided as CVariant (expecting a bool), returning as Qt::CheckStae. | |
| virtual bool | hasAlignment () const |
| Alignment available? | |
| bool | supportsRole (int role) const |
| Is given role supported by formatter. | |
| virtual swift::misc::CVariant | data (int role, const swift::misc::CVariant &inputData) const |
| Receives CVariant of column data, and returns CVariant wrapping string, pixmap, or other values depending on role. | |
Protected Attributes | |
| swift::misc::CVariant | m_pixmapOnLedVariant |
| Pixmap used when on. | |
| swift::misc::CVariant | m_pixmapOffLedVariant |
| Pixmap used when off. | |
Protected Attributes inherited from swift::gui::models::CBoolTextFormatter | |
| const swift::misc::CVariant | m_trueNameVariant = "true" |
| displayed when true | |
| const swift::misc::CVariant | m_falseNameVariant = "false" |
| displayed when false | |
Protected Attributes inherited from swift::gui::models::CDefaultFormatter | |
| QList< int > | m_supportedRoles = roleDisplay() |
| supports decoration roles | |
| int | m_alignment = -1 |
| alignment horizontal/vertically / Qt::Alignment | |
| bool | m_useI18n = true |
| i18n? | |
Additional Inherited Members | |
Static Public Member Functions inherited from swift::gui::models::CDefaultFormatter | |
| static int | alignDefault () |
| Default value. | |
| static int | alignLeftVCenter () |
| Align left/vertically centered. | |
| static int | alignLeftTop () |
| Align left/vertically on top. | |
| static int | alignCentered () |
| Align centered. | |
| static int | alignRightVCenter () |
| Align right/vertically centered. | |
| static const QList< int > & | roleDisplay () |
| Display role. | |
| static const QList< int > & | rolesDisplayAndEdit () |
| Display role. | |
| static const QList< int > & | rolesDecorationAndToolTip () |
| Decoration + ToolTip role. | |
| static const QList< int > & | roleCheckState () |
| CheckState role. | |
| static const QList< int > & | rolesNone () |
| No roles. | |
Protected Member Functions inherited from swift::gui::models::CDefaultFormatter | |
| virtual swift::misc::CVariant | keepStandardTypesConvertToStringOtherwise (const swift::misc::CVariant &inputData) const |
| Standard conversion. | |
Static Protected Member Functions inherited from swift::gui::models::CDefaultFormatter | |
| static const swift::misc::CVariant & | emptyStringVariant () |
| Empty string CVariant. | |
| static const swift::misc::CVariant & | emptyPixmapVariant () |
| Empty pixmap CVariant. | |
Format as bool LED value.
Definition at line 251 of file columnformatters.h.
|
virtual |
Value provided as CVariant, formatter converts to standard types or string. Used with Qt::DisplayRole displaying a text.
Reimplemented from swift::gui::models::CBoolTextFormatter.
Definition at line 316 of file columnformatters.cpp.
|
inlinevirtual |
Value provided as CVariant, formatter converts to QString. Used with Qt::ToolTipRole displaying a text.
Reimplemented from swift::gui::models::CDefaultFormatter.
Definition at line 267 of file columnformatters.h.