28 #include "../vproperty_p.h"
40 if (column == DPC_Data && (Qt::DisplayRole == role))
44 else if (Qt::EditRole == role)
48 else if (column == DPC_Data && (Qt::DecorationRole == role))
58 const QAbstractItemDelegate *delegate)
64 tmpWidget->setLocale(parent->locale());
65 tmpWidget->
setLineColor(d_ptr->VariantValue.value<QColor>());
75 tmpWidget->
setLineColor(d_ptr->VariantValue.value<QColor>());
static QString GetColorString(const QColor &color)
A helper function to convert a color into a string.
static QPixmap GetColorPixmap(const QColor &color, quint32 size=16)
A little helper function generating an image to represent a color.
QColor getLineColor() const
Returns the color currently set.
void setLineColor(const QColor &color_)
Sets the color of the widget.
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE
Get the data how it should be displayed.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
virtual VProperty * clone(bool include_children=true, VProperty *container=NULL) const Q_DECL_OVERRIDE
Clones this 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 bool setEditorData(QWidget *editor) Q_DECL_OVERRIDE
Sets the property's data to the editor (returns false, if the standard delegate should do that)
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
VColorProperty(const QString &name)
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.