Drake Designer
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
ddPropertiesPanel.h
Go to the documentation of this file.
1 #ifndef __ddPropertiesPanel_h
2 #define __ddPropertiesPanel_h
3 
4 #include <QWidget>
5 #include "ddAppConfigure.h"
6 
7 class QtVariantPropertyManager;
8 class QtAbstractPropertyBrowser;
9 class QtVariantProperty;
10 class QtProperty;
11 
12 class DD_APP_EXPORT ddPropertiesPanel : public QWidget
13 {
14  Q_OBJECT
15 
16 public:
17 
18  ddPropertiesPanel(QWidget* parent=0);
19  virtual ~ddPropertiesPanel();
20 
21  void setBrowserModeToTree();
22  void setBrowserModeToWidget();
23 
24  QtVariantPropertyManager* propertyManager() const;
25  QtAbstractPropertyBrowser* propertyBrowser() const;
26 
27  QtVariantProperty* addGroup(const QString& name, const QString& description);
28  QtVariantProperty* addProperty(const QString& name, const QVariant& value);
29  QtVariantProperty* addEnumProperty(const QString& name, const QVariant& value);
30  QtVariantProperty* addSubProperty(const QString& name, const QVariant& value, QtVariantProperty* parent);
31  QtVariantProperty* getProperty(const QString& name) const;
32  QtVariantProperty* getSubProperty(QtVariantProperty* parent, const QString& name) const;
33  QtVariantProperty* getSubProperty(QtVariantProperty* parent, int childIndex) const;
34  int getSubPropertyIndex(QtVariantProperty* property) const;
35  QtVariantProperty* getParentProperty(QtVariantProperty* parent) const;
36 
37 public slots:
38 
39  void clear();
40 
41 signals:
42 
43  void propertyValueChanged(QtVariantProperty* property);
44 
45 protected slots:
46 
47  void onPropertyValueChanged(QtProperty* property);
48 
49 protected:
50 
51  class ddInternal;
52  ddInternal* Internal;
53 
54  Q_DISABLE_COPY(ddPropertiesPanel);
55 };
56 
57 #endif
ddInternal * Internal
#define DD_APP_EXPORT