21 #ifndef VBOOLPROPERTY_H
22 #define VBOOLPROPERTY_H
24 #include <qcompilerdetection.h>
26 #include <QMetaObject>
33 #include "../vproperty.h"
50 virtual QVariant
data (
int column =
DPC_Name,
int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
56 virtual bool setData (
const QVariant&
data,
int role = Qt::EditRole) Q_DECL_OVERRIDE;
59 virtual Qt::ItemFlags
flags(
int column =
DPC_Name)
const Q_DECL_OVERRIDE;
62 virtual QString
type() const Q_DECL_OVERRIDE;
The VBoolProperty can take two states: True or False.
virtual bool setData(const QVariant &data, int role=Qt::EditRole) Q_DECL_OVERRIDE
This is used by the model to set the data.
virtual ~VBoolProperty() Q_DECL_OVERRIDE
Destructor.
virtual VProperty * clone(bool include_children=true, VProperty *container=NULL) const Q_DECL_OVERRIDE
Clones this property.
virtual Qt::ItemFlags flags(int column=DPC_Name) const Q_DECL_OVERRIDE
Returns item flags.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
static QVariant FalseText
The (translatable) text displayed when the property is set to false (default: "False")
VBoolProperty(const QString &name)
Default constructor.
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE
Get the data how it should be displayed.
static QVariant TrueText
The (translatable) text displayed when the property is set to true (default: "True")