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 PROPERTYEDITOR_H
00029 #define PROPERTYEDITOR_H
00030
00031 #include "ExpandTabWidget.h"
00032 #include "Application.h"
00033
00034 namespace QGpGuiTools {
00035
00036 class PropertyProxy;
00037 class PropertyWidget;
00038 class PropertyCategorySettings;
00039 class PropertyArea;
00040
00041 class PropertyEditor : public QWidget, public GlobalObject
00042 {
00043 Q_OBJECT
00044 public:
00045 PropertyEditor(QWidget * parent=0);
00046 ~PropertyEditor();
00047
00048 void setProxy(PropertyProxy * proxy);
00049 PropertyProxy * proxy() const {return _proxy;}
00050
00051 void addCategory(QIcon icon, QString caption, ExpandTabWidget * w);
00052 void removeCategory(QString category);
00053 void addTab(QString category, QString title, PropertyWidget * w);
00054 ExpandTabWidget * widget(QString category);
00055 void takeWidgets();
00056
00057 void saveStates();
00058 void restoreStates();
00059
00060 static PropertyEditor * instance() {return _instance;}
00061 protected:
00062 virtual bool eventFilter (QObject * watched, QEvent * event);
00063 virtual void resizeEvent(QResizeEvent * );
00064 virtual void moveEvent(QMoveEvent * );
00065 private slots:
00066 void currentCategoryChanged(int index);
00067 private:
00068 void saveState(int index);
00069 void restoreState(int index);
00070
00071 QTabWidget * _tab;
00072 QMap<QString, QWidget *> _categories;
00073 QMap<ExpandTabWidget *, PropertyArea *> _propertyAreas;
00074 PropertyProxy * _proxy;
00075 QMap<QString, PropertyCategorySettings *> _categorySettings;
00076 static PropertyEditor * _instance;
00077 };
00078
00079 }
00080
00081 #endif // PROPERTYEDITOR_H