itom
Loading...
Searching...
No Matches
EnumProperty Class Reference

#include <EnumProperty.h>

Inheritance diagram for EnumProperty:
Property Property

Public Member Functions

 EnumProperty (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
virtual QVariant value (int role=Qt::UserRole) const
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 
virtual bool setEditorData (QWidget *editor, const QVariant &data)
 
virtual QVariant editorData (QWidget *editor)
 
 EnumProperty (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
virtual QVariant value (int role=Qt::UserRole) const
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 
virtual bool setEditorData (QWidget *editor, const QVariant &data)
 
virtual QVariant editorData (QWidget *editor)
 
- Public Member Functions inherited from Property
 Property (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
virtual QString displayValue (int role=Qt::UserRole) const
 
virtual void setValue (const QVariant &value)
 
QObject * propertyObject ()
 
bool isRoot ()
 
bool isReadOnly ()
 
int row ()
 
QString editorHints ()
 
virtual void setEditorHints (const QString &hints)
 
QString info ()
 
virtual void setInfo (const QString &info)
 
bool enabled ()
 
virtual void setEnabled (bool enabled)
 
PropertyfindPropertyObject (QObject *propertyObject)
 
 Property (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0)
 
virtual void setValue (const QVariant &value)
 
QObject * propertyObject ()
 
bool isRoot ()
 
bool isReadOnly ()
 
int row ()
 
QString editorHints ()
 
virtual void setEditorHints (const QString &hints)
 
PropertyfindPropertyObject (QObject *propertyObject)
 

Private Slots

void valueChanged (const QString item)
 
void valueChanged (const QString item)
 

Private Attributes

QStringList m_enum
 

Additional Inherited Members

- Protected Attributes inherited from Property
QObject * m_propertyObject
 
QString m_hints
 
QString m_info
 
bool m_enabled
 

Detailed Description

The Enum Property Class extends a Property to add enum functionality to the QPropertyEditor. Enum Properties are automatically created in the QPropertyModel for objects that have an enum as property value.

Author
Roman Schmid

Member Function Documentation

◆ createEditor() [1/2]

QWidget * EnumProperty::createEditor ( QWidget * parent,
const QStyleOptionViewItem & option )
virtual
See also
Property::createEditor

Reimplemented from Property.

◆ createEditor() [2/2]

virtual QWidget * EnumProperty::createEditor ( QWidget * parent,
const QStyleOptionViewItem & option )
virtual
See also
Property::createEditor

Reimplemented from Property.

◆ editorData() [1/2]

QVariant EnumProperty::editorData ( QWidget * editor)
virtual
See also
Property::editorData

Reimplemented from Property.

◆ editorData() [2/2]

virtual QVariant EnumProperty::editorData ( QWidget * editor)
virtual
See also
Property::editorData

Reimplemented from Property.

◆ setEditorData() [1/2]

bool EnumProperty::setEditorData ( QWidget * editor,
const QVariant & data )
virtual
See also
Property::setEditorData

Reimplemented from Property.

◆ setEditorData() [2/2]

virtual bool EnumProperty::setEditorData ( QWidget * editor,
const QVariant & data )
virtual
See also
Property::setEditorData

Reimplemented from Property.

◆ value() [1/2]

QVariant EnumProperty::value ( int role = Qt::UserRole) const
virtual
See also
Property::value

Reimplemented from Property.

◆ value() [2/2]

virtual QVariant EnumProperty::value ( int role = Qt::UserRole) const
virtual
See also
Property::value

Reimplemented from Property.

◆ valueChanged [1/2]

void EnumProperty::valueChanged ( const QString item)
privateslot

slot that is being called by the editor widget

◆ valueChanged [2/2]

void EnumProperty::valueChanged ( const QString item)
privateslot

slot that is being called by the editor widget

Member Data Documentation

◆ m_enum

QStringList EnumProperty::m_enum
private

QStringList with possible enum values


The documentation for this class was generated from the following files: