OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
WrappedRectItem.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OToolkit header
10
11// OpenTwin header
13
16public:
18 virtual ~WrappedRectItem();
19
20 // ###########################################################################################################################################################################################################################################################################################################################
21
22 // Public base class methods
23
24 virtual bool isDesignedItemCompleted(void) const override { return this->getControlPoints().size() == 2; };
25
26 virtual bool isDesignedItemValid(void) const override { return this->getControlPoints().size() == 2; };
27
28 virtual ot::GraphicsItem* getGraphicsItem(void) override { return this; };
29
30 virtual QString getDefaultItemName(void) const override { return "Rect"; };
31
33
34 virtual void makeItemTransparent(void) override;
35
36 virtual void setupDesignerItemFromConfig(const ot::GraphicsItemCfg* _config) override;
37
38 // ###########################################################################################################################################################################################################################################################################################################################
39
40 // Protected base class methods
41
42protected:
43 virtual void controlPointsChanged(void) override;
44 virtual void fillPropertyGrid(void) override;
45 virtual void propertyChanged(const ot::Property* _property) override;
46 virtual void propertyDeleteRequested(const ot::Property* _property) override;
47 virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange _change, const QVariant& _constrains) override;
48
49private:
50
51};
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition GraphicsItemDesignerItemBase.h:25
const QList< QPointF > & getControlPoints(void) const
Returns a list containing the currently set control points.
Definition GraphicsItemDesignerItemBase.h:48
Definition WrappedRectItem.h:14
virtual bool isDesignedItemCompleted(void) const override
Returns true if the current item is completed. A completed item has all required control points set (...
Definition WrappedRectItem.h:24
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange _change, const QVariant &_constrains) override
Definition WrappedRectItem.cpp:181
virtual void makeItemTransparent(void) override
Will make the item transparent.
Definition WrappedRectItem.cpp:40
virtual void propertyDeleteRequested(const ot::Property *_property) override
Definition WrappedRectItem.cpp:176
virtual bool isDesignedItemValid(void) const override
Returns true if the current item is valid. A valid item has all required control points set (e....
Definition WrappedRectItem.h:26
virtual QString getDefaultItemName(void) const override
Returns the default item name.
Definition WrappedRectItem.h:30
WrappedRectItem()
Definition WrappedRectItem.cpp:19
virtual void controlPointsChanged(void) override
Is called whenever the control points have changed (except when calling updateControlPoints()).
Definition WrappedRectItem.cpp:61
virtual void fillPropertyGrid(void) override
Is called when the property grid needs to be filled.
Definition WrappedRectItem.cpp:84
virtual ~WrappedRectItem()
Definition WrappedRectItem.cpp:24
virtual ot::GraphicsItem * getGraphicsItem(void) override
Returns the actual GraphicsItem.
Definition WrappedRectItem.h:28
virtual void propertyChanged(const ot::Property *_property) override
Definition WrappedRectItem.cpp:102
virtual ot::TreeWidgetItemInfo createNavigationInformation(void) override
Creates the navigation information for this item and its childs.
Definition WrappedRectItem.cpp:32
virtual void setupDesignerItemFromConfig(const ot::GraphicsItemCfg *_config) override
Definition WrappedRectItem.cpp:45
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Base class for all OpenTwin GraphicsItems GraphicsItems should be created by the GraphicsFactory and ...
Definition GraphicsItem.h:35
Definition GraphicsRectangularItem.h:17
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 TreeWidgetItemInfo.h:17