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

#include <FlagsProperty.h>

Inheritance diagram for FlagsProperty:
Property

Public Member Functions

 FlagsProperty (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 checkedIndexesChanged ()
 

Private Attributes

QStringList m_enum
 
QVector< int > m_enumIndices
 
QWidget * m_comboBox
 
bool m_inModification
 

Additional Inherited Members

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

Detailed Description

The Flags Property Class extends a Property to add flag / enum functionality to the QPropertyEditor. Flags Properties are automatically created in the QPropertyModel for objects that have an enum as property value which is a flag (or-combination of its own enumeration).

Author
Marc Gronle

Member Function Documentation

◆ checkedIndexesChanged

void FlagsProperty::checkedIndexesChanged ( )
privateslot

slot that is being called by the editor widget

◆ createEditor()

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

Reimplemented from Property.

◆ editorData()

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

Reimplemented from Property.

◆ setEditorData()

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

Reimplemented from Property.

◆ value()

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

Reimplemented from Property.

Member Data Documentation

◆ m_enum

QStringList FlagsProperty::m_enum
private

QStringList with possible enum values


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