21 #ifndef VSHORTCUTROPERTY_H
22 #define VSHORTCUTROPERTY_H
24 #include <qcompilerdetection.h>
25 #include <QMetaObject>
28 #include <QStyleOptionViewItem>
33 #include "../vproperty.h"
49 virtual QVariant
data (
int column =
DPC_Name,
int role = Qt::DisplayRole)
const Q_DECL_OVERRIDE;
56 virtual QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& options,
57 const QAbstractItemDelegate* delegate) Q_DECL_OVERRIDE;
63 virtual QVariant
getEditorData(
const QWidget* editor)
const Q_DECL_OVERRIDE;
66 virtual QString
type()
const Q_DECL_OVERRIDE;
73 Q_REQUIRED_RESULT
virtual VProperty*
clone(
bool include_children =
true,
74 VProperty* container =
nullptr)
const Q_DECL_OVERRIDE;
77 virtual void setValue(
const QVariant& value) Q_DECL_OVERRIDE;
This property can be used to handle key shortcuts.
virtual void setValue(const QVariant &value) Q_DECL_OVERRIDE
Sets the value of the 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 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 ~VShortcutProperty() Q_DECL_OVERRIDE
The destructor.
VShortcutProperty(const QString &name)
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 Q_DECL_OVERRIDE
Clones this property.
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)