28 #ifndef LINEWEIGHT_PROPERTY_H
29 #define LINEWEIGHT_PROPERTY_H
31 #include <qcompilerdetection.h>
34 #include <QMetaObject>
37 #include <QStyleOptionViewItem>
43 #include "../vproperty.h"
59 virtual QVariant
data (
int column =
DPC_Name,
int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
66 virtual QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &options,
67 const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE;
70 virtual QVariant
getEditorData(
const QWidget *editor)
const Q_DECL_OVERRIDE;
79 virtual void setValue(
const QVariant &value) Q_DECL_OVERRIDE;
82 virtual QString
type() const Q_DECL_OVERRIDE;
89 Q_REQUIRED_RESULT virtual
VProperty *
clone(
bool include_children = true,
90 VProperty *container =
nullptr) const Q_DECL_OVERRIDE;
LineWeightProperty(const QString &name)
Constructor.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the property.
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.
virtual ~LineWeightProperty() Q_DECL_OVERRIDE
Destructor.
virtual void setLineWeights(const QMap< QString, QString > &weights)
Sets the line styles.
void currentIndexChanged(int index)
virtual QVariant data(int column=DPC_Name, int role=Qt::DisplayRole) const Q_DECL_OVERRIDE
Get the data how it should be displayed.
QMap< QString, QString > m_lineWeights
static int indexOfLineWeight(const QMap< QString, QString > &lineWeights, const QString &weight)
QIcon createIcon(const qreal &width)
QVector< QString > m_indexList
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 QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
virtual QMap< QString, QString > getLineWeights() const
Get the settings. This function has to be implemented in a subclass in order to have an effect.