OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
WrappedArcItem.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OToolkit header
10
11// OpenTwin header
13
14namespace ot { class Painter2D; }
15
18public:
20 virtual ~WrappedArcItem();
21
22 // ###########################################################################################################################################################################################################################################################################################################################
23
24 // Public base class methods
25
26 virtual bool isDesignedItemCompleted(void) const override { return this->getControlPoints().size() == 2; };
27
28 virtual bool isDesignedItemValid(void) const override { return this->getControlPoints().size() == 2; };
29
30 virtual ot::GraphicsItem* getGraphicsItem(void) override { return this; };
31
32 virtual QString getDefaultItemName(void) const override { return "Arc"; };
33
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};
#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 WrappedArcItem.h:16
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 WrappedArcItem.h:28
virtual ot::GraphicsItem * getGraphicsItem(void) override
Returns the actual GraphicsItem.
Definition WrappedArcItem.h:30
virtual void propertyDeleteRequested(const ot::Property *_property) override
Definition WrappedArcItem.cpp:197
virtual void propertyChanged(const ot::Property *_property) override
Definition WrappedArcItem.cpp:97
virtual ~WrappedArcItem()
Definition WrappedArcItem.cpp:24
virtual void controlPointsChanged(void) override
Is called whenever the control points have changed (except when calling updateControlPoints()).
Definition WrappedArcItem.cpp:53
virtual void setupDesignerItemFromConfig(const ot::GraphicsItemCfg *_config) override
Definition WrappedArcItem.cpp:38
WrappedArcItem()
Definition WrappedArcItem.cpp:20
virtual QString getDefaultItemName(void) const override
Returns the default item name.
Definition WrappedArcItem.h:32
virtual void fillPropertyGrid(void) override
Is called when the property grid needs to be filled.
Definition WrappedArcItem.cpp:73
virtual bool isDesignedItemCompleted(void) const override
Returns true if the current item is completed. A completed item has all required control points set (...
Definition WrappedArcItem.h:26
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange _change, const QVariant &_constrains) override
Definition WrappedArcItem.cpp:202
virtual ot::TreeWidgetItemInfo createNavigationInformation(void) override
Creates the navigation information for this item and its childs.
Definition WrappedArcItem.cpp:30
Definition GraphicsArcItem.h:16
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
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
Definition Connector.h:8