OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsItemDesignerPropertyHandler.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTCore/Logger.h"
10#include "OTGui/PropertyInt.h"
11#include "OTGui/PropertyBool.h"
12#include "OTGui/PropertyColor.h"
13#include "OTGui/PropertyGroup.h"
30
31// Qt header
32#include <QtCore/qobject.h>
33
34class QTreeWidgetItem;
36
40 Q_OBJECT
42public:
45
46 void setNavigation(GraphicsItemDesignerNavigation* _navigation) { m_navigation = _navigation; };
47 GraphicsItemDesignerNavigation* getNavigation(void) const { return m_navigation; };
48
49 void setNavigationItem(QTreeWidgetItem* _item) { m_navigationItem = _item; };
50 QTreeWidgetItem* getNavigationItem(void) const { return m_navigationItem; };
51
53 void unsetPropertyGrid(void);
54 ot::PropertyGrid* getPropertyGrid(void) const { return m_propertyGrid; };
55
56 virtual void itemAboutToBeDestroyed(void) {};
57
58protected:
60 virtual void fillPropertyGrid(void) = 0;
61
62 virtual void propertyChanged(const ot::Property* _property) = 0;
63 virtual void propertyDeleteRequested(const ot::Property* _property) = 0;
64
65private Q_SLOTS:
66 void slotPropertyChanged(const ot::Property* _property);
67 void slotPropertyDeleteRequested(const ot::Property* _property);
68
69private:
70 QTreeWidgetItem* m_navigationItem;
71 ot::PropertyGrid* m_propertyGrid;
73};
OpenTwin Logging system.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition GraphicsItemDesignerNavigation.h:30
The GraphicsItemDesignerPropertyHandler is used to receive property grid notifications and requests.
Definition GraphicsItemDesignerPropertyHandler.h:39
virtual void propertyDeleteRequested(const ot::Property *_property)=0
virtual void itemAboutToBeDestroyed(void)
Definition GraphicsItemDesignerPropertyHandler.h:56
virtual ~GraphicsItemDesignerPropertyHandler()
Definition GraphicsItemDesignerPropertyHandler.cpp:17
void setPropertyGrid(ot::PropertyGrid *_grid)
Definition GraphicsItemDesignerPropertyHandler.cpp:21
void setNavigationItem(QTreeWidgetItem *_item)
Definition GraphicsItemDesignerPropertyHandler.h:49
void unsetPropertyGrid(void)
Definition GraphicsItemDesignerPropertyHandler.cpp:32
virtual void propertyChanged(const ot::Property *_property)=0
ot::PropertyGrid * getPropertyGrid(void) const
Definition GraphicsItemDesignerPropertyHandler.h:54
QTreeWidgetItem * getNavigationItem(void) const
Definition GraphicsItemDesignerPropertyHandler.h:50
void setNavigation(GraphicsItemDesignerNavigation *_navigation)
Definition GraphicsItemDesignerPropertyHandler.h:46
GraphicsItemDesignerNavigation * getNavigation(void) const
Definition GraphicsItemDesignerPropertyHandler.h:47
virtual void fillPropertyGrid(void)=0
Is called when the property grid needs to be filled.
GraphicsItemDesignerPropertyHandler()
Definition GraphicsItemDesignerPropertyHandler.cpp:13
Definition PropertyGrid.h:29
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21