OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertyGridGroup.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
13
14// Qt header
15#include <QtCore/qobject.h>
16#include <QtGui/qbrush.h>
17
18class QLabel;
19class QWidget;
20
21namespace ot {
22
23 class PropertyGridItem;
24
26 Q_OBJECT
28 public:
30 virtual ~PropertyGridGroup();
31
32 void setupFromConfig(const PropertyGroup* _group);
33
34 PropertyGroup* createConfiguration(bool _includeChildAndProperties) const;
35
37 void finishSetup(void);
38
39 void setParentPropertyGroup(PropertyGridGroup* _group) { m_parentGroup = _group; };
40 PropertyGridGroup* getParentPropertyGroup(void) const { return m_parentGroup; };
41
42 void setName(const std::string& _name) { m_name = _name; };
43 const std::string& getName(void) const { return m_name; };
44
45 void setTitle(const QString& _title);
46 QString getTitle(void) const;
47
48 void addProperty(PropertyGridItem* _item);
49
50 void addChildGroup(PropertyGridGroup* _group);
51
52 PropertyGridItem* findChildProperty(const std::string& _propertyName, bool _searchChildGroups) const;
53 std::list<PropertyGridItem*> childProperties(void) const;
54
55 PropertyGridGroup* findChildGroup(const std::string& _name, bool _searchChildGroups) const;
56 std::list<PropertyGridGroup*> childGroups(void) const;
57
58 void updateStateIcon(void);
59
60 Q_SIGNALS:
61 void itemInputValueChanged(const ot::Property* const _property);
62 void itemDeleteRequested(const ot::Property* const _property);
63
64 private Q_SLOTS:
65 void slotColorStyleChanged(const ColorStyle& _style);
66 void slotItemInputValueChanged(const ot::Property* const _property);
67 void slotItemDeleteRequested(const ot::Property* const _property);
68
69 private:
70 void updateStateIcon(const ColorStyle& _style);
71
72 PropertyGridGroup* m_parentGroup;
73
74 std::string m_name;
75 QWidget* m_titleLayoutW;
76 QLabel* m_titleIconLabel;
77 QLabel* m_titleLabel;
78 };
79
80}
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition ColorStyle.h:24
Definition PropertyGridGroup.h:25
void setName(const std::string &_name)
Definition PropertyGridGroup.h:42
PropertyGridGroup * getParentPropertyGroup(void) const
Definition PropertyGridGroup.h:40
void setParentPropertyGroup(PropertyGridGroup *_group)
Definition PropertyGridGroup.h:39
const std::string & getName(void) const
Definition PropertyGridGroup.h:43
void itemInputValueChanged(const ot::Property *const _property)
void itemDeleteRequested(const ot::Property *const _property)
Definition PropertyGridItem.h:31
Definition PropertyGroup.h:23
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21
Definition TreeWidgetItem.h:17
Definition Connector.h:8