52 #ifndef VLINECOLORPROPERTY_H
53 #define VLINECOLORPROPERTY_H
55 #include <qcompilerdetection.h>
57 #include <QMetaObject>
60 #include <QStyleOptionViewItem>
66 #include "../vproperty.h"
82 virtual QVariant
data (
int column =
DPC_Name,
int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
89 virtual QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &options,
90 const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE;
93 virtual QVariant
getEditorData(
const QWidget *editor)
const Q_DECL_OVERRIDE;
102 virtual void setValue(
const QVariant &value) Q_DECL_OVERRIDE;
105 virtual QString
type() const Q_DECL_OVERRIDE;
113 Q_REQUIRED_RESULT virtual
VProperty *
clone(
bool include_children = true,
114 VProperty *container =
nullptr) const Q_DECL_OVERRIDE;
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
VLineColorProperty(const QString &name)
Constructor.
virtual QMap< QString, QString > getColors() const
Get the settings. This function has to be implemented in a subclass in order to have an effect.
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE
Get the data how it should be displayed.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.
QMap< QString, QString > colors
The list of possible options to choose from.
virtual ~VLineColorProperty() Q_DECL_OVERRIDE
Destructor.
static int indexOfColor(const QMap< QString, QString > &colors, const QString &color)
QVector< QString > indexList
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
virtual void setColors(const QMap< QString, QString > &colors)
Sets the colors.
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.
void currentIndexChanged(int index)