Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef PROPERTYPROXY_H
00029 #define PROPERTYPROXY_H
00030
00031 #include <QtGui>
00032 #include <QGpCoreTools.h>
00033 #include "QGpGuiToolsDLLExport.h"
00034
00035 namespace QGpGuiTools {
00036
00037 class PropertyTab;
00038 class PropertyCategory;
00039 class PropertyEditor;
00040 class PropertyItem;
00041 class PropertyWidget;
00042
00043 class QGPGUITOOLS_EXPORT PropertyProxy : public QObject
00044 {
00045 Q_OBJECT
00046 public:
00047 PropertyProxy(QObject * parent=0);
00048 ~PropertyProxy();
00049
00050 void raiseEditor();
00051 void setEditor();
00052
00053 bool setCurrentCategory(uint category);
00054 bool setCurrentTab(uint tab);
00055 PropertyWidget * currentTabWidget() const;
00056
00057 void addCategory(uint category, QString caption, QIcon icon);
00058 void addTab(uint tab, QString title, PropertyWidget * w, PropertyItem * item);
00059 void addReference(PropertyItem * item);
00060 bool hasReference() const;
00061 int referenceCount() const;
00062 void removeTab(uint tab, PropertyItem * item);
00063
00064 void setTitle(QString t) {_title=t;}
00065 QString title() const {return _title;}
00066
00067 void blockUpdates(bool b);
00068 void saveStates();
00069 void restoreStates();
00070 void setValues();
00071 void setCurrentTabValues();
00072
00073 static uint uniqueId();
00074 private:
00075 inline bool isActive() const;
00076
00077 QString _title;
00078 PropertyCategory * _currentCategory;
00079 PropertyTab * _currentTab;
00080 QHash<uint, PropertyCategory *> _categories;
00081 bool _blockUpdates;
00082 static uint _lastUniqueId;
00083 };
00084
00085 }
00086
00087 #endif // PROPERTYPROXY_H