17#include <QtCore/qlist.h>
18#include <QtCore/qpoint.h>
22 class GraphicsItemCfg;
52 void setLastPos(
const QPointF& _pos) { m_lastPos = _pos; };
57 const QPointF&
getLastPos(
void)
const {
return m_lastPos; };
125 QList<QPointF> m_controlPoints;
#define OT_ADD_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided private 32/64 bit bitfield....
Definition Flags.h:129
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition GraphicsItemDesignerItemBase.h:25
bool basePropertyDeleteRequested(const ot::Property *_property)
Handles base properties. Returns true if the requested property was handled.
Definition GraphicsItemDesignerItemBase.cpp:290
virtual ~GraphicsItemDesignerItemBase()
Definition GraphicsItemDesignerItemBase.cpp:19
virtual void setupDesignerItemFromConfig(const ot::GraphicsItemCfg *_config)=0
virtual void fillPropertyGrid(void) override=0
Is called when the property grid needs to be filled.
void setLastPos(const QPointF &_pos)
Sets the last position.
Definition GraphicsItemDesignerItemBase.h:52
virtual ot::TreeWidgetItemInfo createNavigationInformation(void)=0
Creates the navigation information for this item and its childs.
const QList< QPointF > & getControlPoints(void) const
Returns a list containing the currently set control points.
Definition GraphicsItemDesignerItemBase.h:48
void setDesignerItemFlag(DesignerItemFlag _flag, bool _active=true)
Definition GraphicsItemDesignerItemBase.h:59
virtual void propertyDeleteRequested(const ot::Property *_property) override=0
void updateControlPoints(const QList< QPointF > &_points)
Replaces the current list of control points. This method does not call controlPointsChanged().
Definition GraphicsItemDesignerItemBase.h:45
virtual QString getDefaultItemName(void) const =0
Returns the default item name.
void initializeBaseData(const QList< QPointF > &_controlPoints, const QPointF &_pos)
Definition GraphicsItemDesignerItemBase.cpp:51
GraphicsItemDesignerItemBase()
Definition GraphicsItemDesignerItemBase.cpp:13
virtual bool isDesignedItemValid(void) const =0
Returns true if the current item is valid. A valid item has all required control points set (e....
virtual void propertyChanged(const ot::Property *_property) override=0
bool basePropertyChanged(const ot::Property *_property)
Handles base properties. Returns true if the changed property was handled.
Definition GraphicsItemDesignerItemBase.cpp:113
virtual void makeItemTransparent(void)
Will make the item transparent.
Definition GraphicsItemDesignerItemBase.h:91
void setControlPoints(const QList< QPointF > &_points)
Sets the current list of control points and calls controlPointsChanged().
Definition GraphicsItemDesignerItemBase.cpp:28
virtual ot::GraphicsItem * getGraphicsItem(void)=0
Returns the actual GraphicsItem.
void fillBasePropertyGrid(ot::PropertyGridCfg &_config)
Adds the default properties. Creates the "General" and "Transform" groups.
Definition GraphicsItemDesignerItemBase.cpp:56
const DesignerItemFlags & getDesignerItemFlags(void) const
Definition GraphicsItemDesignerItemBase.h:61
ot::Flags< DesignerItemFlag > DesignerItemFlags
Definition GraphicsItemDesignerItemBase.h:32
void addControlPoint(const QPointF &_pt)
\breif Adds the provided control point and calls controlPointsChanged().
Definition GraphicsItemDesignerItemBase.cpp:23
DesignerItemFlag
Definition GraphicsItemDesignerItemBase.h:28
@ DesignerItemIgnoreEvents
virtual void controlPointsChanged(void)=0
Is called whenever the control points have changed (except when calling updateControlPoints()).
virtual bool isDesignedItemCompleted(void) const =0
Returns true if the current item is completed. A completed item has all required control points set (...
void setDesignerItemFlags(const DesignerItemFlags &_flags)
Definition GraphicsItemDesignerItemBase.h:60
void graphicsItemWasMoved(const QPointF &_newPos)
Will move all control points by the move delta (lastPos - newPos). The method will set the last pos a...
Definition GraphicsItemDesignerItemBase.cpp:33
const QPointF & getLastPos(void) const
Returns the last position. The last position ist the last position of this graphics item....
Definition GraphicsItemDesignerItemBase.h:57
The GraphicsItemDesignerPropertyHandler is used to receive property grid notifications and requests.
Definition GraphicsItemDesignerPropertyHandler.h:39
The Flags class is a wrapper around a enum that allows bitwise operations (flags)....
Definition Flags.h:214
void setFlag(T _flag)
Set the provided flag.
Definition Flags.h:257
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 PropertyGridCfg.h:21
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21