RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <property.h>
Signals | |
void | propertyChanged (QObject *, QString, QVariant, QVariant) |
Public Member Functions | |
Property (const QString &name=QString(), QObject *propertyObject=0, QObject *parent=0) | |
virtual QVariant | value (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) |
virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option) |
virtual QVariant | editorData (QWidget *editor) |
virtual bool | setEditorData (QWidget *editor, const QVariant &data) |
Property * | findPropertyObject (QObject *propertyObject) |
Protected Attributes | |
QObject * | m_propertyObject |
QString | m_hints |
The Property class is the base class for all properties in the QPropertyEditor You can implement custom properties inherited from this class to further enhence the functionality of the QPropertyEditor
Definition at line 36 of file property.h.
Property::Property | ( | const QString & | name = QString() , |
QObject * | propertyObject = 0 , |
||
QObject * | parent = 0 |
||
) |
Constructor
name | the name of the property within the propertyObject (will be used in the QPropertyEditorWidget view too) |
propertyObject | the object that contains the property |
parent | optional parent object |
Definition at line 31 of file property.cpp.
|
virtual |
Creates an editor for the data managed by this instance
parent | widget the newly created editor widget will be child of |
option | currently not used |
Reimplemented in EnumProperty.
Definition at line 71 of file property.cpp.
|
virtual |
Returns the data of the editor widget used to manipulate this instance
Reimplemented in EnumProperty.
Definition at line 122 of file property.cpp.
|
inline |
returns optional settings for the editor widget that is used to manipulate the properties value
Definition at line 90 of file property.h.
Property * Property::findPropertyObject | ( | QObject * | propertyObject | ) |
Tries to find the first property that manages the given propertyObject
propertyObject |
Definition at line 139 of file property.cpp.
bool Property::isReadOnly | ( | ) |
Flag if the property can be set
Definition at line 61 of file property.cpp.
|
inline |
Flag if property is used for indicating a group or really manages a property
Definition at line 72 of file property.h.
|
signal |
|
inline |
Returns the QObject which contains the property managed by this instance
Definition at line 66 of file property.h.
|
inline |
Returns the row of this instance within the QPropertyModel
Definition at line 84 of file property.h.
|
virtual |
Changes the editor widget's data to a specific value
editor | the editor widget |
data | the data to set in the editor widget |
Reimplemented in EnumProperty.
Definition at line 98 of file property.cpp.
|
inlinevirtual |
Sets properties for the editor widget that is used to manipulate the data value managed by this instance
hints | a string containing property settings for the editor widget that manipulates this property |
Reimplemented in Vec3fProperty.
Definition at line 96 of file property.h.
|
virtual |
Sets the value stored by this property
value | the data converted to a QVariant |
Reimplemented in Vec3fProperty.
Definition at line 51 of file property.cpp.
|
virtual |
The value stored by this property
Reimplemented in EnumProperty, CObjectTypesEnumProperty, and Vec3fProperty.
Definition at line 43 of file property.cpp.
|
protected |
Definition at line 143 of file property.h.
|
protected |
Definition at line 142 of file property.h.