56 #ifndef VLINETYPEPROPERTY_H
57 #define VLINETYPEPROPERTY_H
59 #include <qcompilerdetection.h>
62 #include <QMetaObject>
65 #include <QStyleOptionViewItem>
71 #include "../vproperty.h"
87 virtual QVariant
data (
int column =
DPC_Name,
int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
94 virtual QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &options,
95 const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE;
98 virtual QVariant
getEditorData(
const QWidget *editor)
const Q_DECL_OVERRIDE;
107 virtual void setValue(
const QVariant &value) Q_DECL_OVERRIDE;
110 virtual QString
type() const Q_DECL_OVERRIDE;
117 Q_REQUIRED_RESULT virtual
VProperty *
clone(
bool include_children = true,
118 VProperty *container =
nullptr) const Q_DECL_OVERRIDE;
static int indexOfLineType(const QMap< QString, QString > &styles, const QString &style)
virtual QMap< QString, QString > getLineTypes() const
Get the settings. This function has to be implemented in a subclass in order to have an effect.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.
void currentIndexChanged(int index)
QIcon createIcon(const QString &type)
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from 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.
LineTypeProperty(const QString &name)
Constructor.
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.
QMap< QString, QString > m_lineTypes
QVector< QString > m_indexList
virtual void setLineTypes(const QMap< QString, QString > &styles)
Sets the line styles.
virtual ~LineTypeProperty() Q_DECL_OVERRIDE
Destructor.