RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
qpropertyeditorwidget.h
Go to the documentation of this file.
1 // *************************************************************************************************
2 //
3 // QPropertyEditor v 0.3
4 //
5 // --------------------------------------
6 // Copyright (C) 2007 Volker Wiendl
7 // Acknowledgements to Roman alias banal from qt-apps.org for the Enum enhancement
8 //
9 //
10 // The QPropertyEditor Library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation version 3 of the License
13 //
14 // The Horde3D Scene Editor is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //
22 // *************************************************************************************************
23 #ifndef QPROPERTYEDITORWIDGET_H_
24 #define QPROPERTYEDITORWIDGET_H_
25 
26 #include <QtWidgets/QTreeView>
27 #include <QItemDelegate>
28 
29 class QPropertyModel;
30 class Property;
31 
55 class QPropertyEditorWidget : public QTreeView
56 {
57  Q_OBJECT
58 public:
59 
63  typedef Property* (*UserTypeCB)(const QString& name, QObject* propertyObject, Property* parent);
64 
71  QPropertyEditorWidget(QWidget* parent = 0);
72 
74  virtual ~QPropertyEditorWidget();
75 
82  void addObject(QObject* propertyObject);
83 
92  void setObject(QObject* propertyObject);
93 
99  void updateObject(QObject* propertyObject);
100  void updateObject();
101 
107  void registerCustomPropertyCB(UserTypeCB callback);
108 
113  void unregisterCustomPropertyCB(UserTypeCB callback);
114 
115 
116 private:
118  QPropertyModel* m_model;
119  QObject* m_currentObject;
120 
121 };
122 
123 #endif
virtual ~QPropertyEditorWidget()
Destructor.
void registerCustomPropertyCB(UserTypeCB callback)
The QPropertyEditorWidget offers an easy to use mechanism to visualize properties of a class inherite...
void unregisterCustomPropertyCB(UserTypeCB callback)
void addObject(QObject *propertyObject)
QPropertyEditorWidget(QWidget *parent=0)
Constructor.
Property *(* UserTypeCB)(const QString &name, QObject *propertyObject, Property *parent)
void setObject(QObject *propertyObject)