29 #include "../vproperty.h"
32 class VPropertyPrivate;
55 if (column == DPC_Data && (Qt::DisplayRole == role || Qt::EditRole == role))
59 else if (role == Qt::BackgroundRole)
61 return QBrush(QColor(217, 217, 217));
63 else if (role == Qt::FontRole)
65 QFont tmpFont; tmpFont.setBold(
true);
return tmpFont;
73 const QAbstractItemDelegate* delegate)
96 return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
VEmptyProperty(const QString &name)
Standard constructor, takes a name and a parent property as argument.
virtual Qt::ItemFlags flags(int column=DPC_Name) const Q_DECL_OVERRIDE
Returns item flags.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE
Get the data how it should be displayed.
virtual ~VEmptyProperty() Q_DECL_OVERRIDE
Destructor.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &options, const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE
Returns an editor widget, or NULL if it doesn't supply one.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const
Clones this property.
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const
Get the data how it should be displayed.