OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::GraphicsItem Class Referenceabstract

Base class for all OpenTwin GraphicsItems GraphicsItems should be created by the GraphicsFactory and be setup from the corresponding configuration. More...

#include "GraphicsItem.h"

Inheritance diagram for ot::GraphicsItem:
ot::GraphicsElement ot::CustomGraphicsItem ot::GraphicsGroupItem ot::GraphicsLayoutItem ot::GraphicsLayoutItemWrapper ot::GraphicsStackItem ot::GraphicsArcItem ot::GraphicsEllipseItem ot::GraphicsInvisibleItem ot::GraphicsLineItem ot::GraphicsPixmapItem ot::GraphicsPolygonItem ot::GraphicsRectangularItem ot::GraphicsShapeItem ot::GraphicsTextItem ot::GraphicsTriangleItem ot::GraphicsBoxLayoutItem ot::GraphicsGridLayoutItem ot::VersionGraphItem

Public Types

enum  GraphicsItemEvent { ItemMoved , ItemResized }
 The GraphicsItemEvent is used to describe the type of an event that occured. More...
 
- Public Types inherited from ot::GraphicsElement
enum  GraphicsElementState { NoState = 0x00 , HoverState = 0x01 , SelectedState = 0x02 }
 The GraphicsElementState is used to describe the current state of a GraphicsElement. More...
 
typedef Flags< GraphicsElementStateGraphicsElementStateFlags
 

Public Member Functions

 GraphicsItem (GraphicsItemCfg *_configuration)
 Constructor.
 
virtual ~GraphicsItem ()
 Destructor.
 
virtual void callPaint (QPainter *_painter, const QStyleOptionGraphicsItem *_opt, QWidget *_widget)=0
 Calls QGraphicsItem::paint().
 
virtual QGraphicsLayoutItem * getQGraphicsLayoutItem (void)=0
 Returns the QGraphicsLayoutItem.
 
virtual void prepareGraphicsItemGeometryChange (void)=0
 Calls QGraphicsLayoutItem::prepareGeometryChange().
 
virtual QSizeF graphicsItemSizeHint (Qt::SizeHint _hint, const QSizeF &_constrains) const =0
 Calls QGraphicsLayoutItem::sizeHint().
 
virtual bool setupFromConfig (const GraphicsItemCfg *_cfg)
 Will setup the item from the provided configuration and store a copy. The previously stored configuration will be destroyed. Default 0.
 
virtual void graphicsItemEventHandler (GraphicsItem *_sender, GraphicsItemEvent _event)
 Will be called when this item was registered as an event handler and the child raised an event.
 
virtual void graphicsItemFlagsChanged (const GraphicsItemCfg::GraphicsItemFlags &_flags)
 Will be called whenever the GraphicsItem flags have changed.
 
virtual void graphicsItemConfigurationChanged (const GraphicsItemCfg *_config)
 Will be called whenever the GraphicsItem configuration has changed.
 
virtual ot::GraphicsItemfindItem (const std::string &_itemName)
 Will return any child item that matches the _itemName.
 
virtual void removeAllConnections (void)
 Removes all connections to or from this item.
 
virtual bool graphicsItemRequiresHover (void) const
 
virtual void finalizeGraphicsItem (void)
 Will be called after setupFromConfig (i.e. if the item is completely created). Here the item structure is complete and the item may adjust settings that depend on parent items (e.g. Text reference for GraphicsTextItem). Container items must override this method to forward the call to their child items.
 
void handleMousePressEvent (QGraphicsSceneMouseEvent *_event)
 
bool handleMouseMoveEvent (QGraphicsSceneMouseEvent *_event)
 General event handler for mouse move events.
 
void handleMouseReleaseEvent (QGraphicsSceneMouseEvent *_event)
 
void handleHoverEnterEvent (QGraphicsSceneHoverEvent *_event)
 
void handleToolTip (QGraphicsSceneHoverEvent *_event)
 
void handleHoverLeaveEvent (QGraphicsSceneHoverEvent *_event)
 
QSizeF handleGetGraphicsItemSizeHint (Qt::SizeHint _hint, const QSizeF &_sizeHint) const
 Will expand the size according to the margins.
 
QRectF handleGetGraphicsItemBoundingRect (const QRectF &_rect) const
 Calculates the actual bounding rect including margins and requested size.
 
void handleItemChange (QGraphicsItem::GraphicsItemChange _change, const QVariant &_value)
 Handles general item updates. The selected state will be forwarded to the GraphicsHighlightItem. Position updates will update the connections and call GraphicsItem::graphicsItemEventHandler() with GraphicsItem::ItemMoved.
 
void handleSetItemGeometry (const QRectF &_geom)
 
void raiseEvent (ot::GraphicsItem::GraphicsItemEvent _event)
 
virtual qreal calculateShortestDistanceToPoint (const QPointF &_pt) const override
 Calculates and returns the shortest distance to the given point. Returns -1 if the distance is invalid (e.g. maximum distance exceeded).
 
QRectF calculatePaintArea (const QSizeF &_innerSize)
 Calculates the draw rect for the item The inner rect takes into account the item geometry, alignment, margins and the actual inner size.
 
virtual GraphicsScenegetGraphicsScene (void) const override
 Returns the GraphicsScene this item is placed at.
 
GraphicsItemgetRootItem (void)
 
const GraphicsItemgetRootItem (void) const
 
void setConfiguration (GraphicsItemCfg *_config)
 Replaces the current configuration with the configuration prvided. The item takes ownership of the configuration.
 
const GraphicsItemCfg *const getConfiguration (void) const
 Returns the current configuration.
 
void setGraphicsItemPos (const QPointF &_pos)
 This function will update the position in the configuration and call QGraphicsItem::setPos.
 
void setGraphicsItemPos (const Point2DD &_pos)
 This function will update the position in the configuration and call QGraphicsItem::setPos.
 
const Point2DDgetGraphicsItemPos (void) const
 Returns the current position set in the configuration.
 
virtual void setParentGraphicsItem (GraphicsItem *_itm)
 
GraphicsItemgetParentGraphicsItem (void) const
 
void setGraphicsItemFlag (ot::GraphicsItemCfg::GraphicsItemFlag _flag, bool _active=true)
 Sets the provided flag.
 
void setGraphicsItemFlags (ot::GraphicsItemCfg::GraphicsItemFlags _flags)
 Replaces the flags with the flags provided.
 
const GraphicsItemCfg::GraphicsItemFlagsgetGraphicsItemFlags (void) const
 Returns the current GraphicsItemFlags set.
 
void setGraphicsItemUid (const ot::UID &_uid)
 Sets the GraphicsItem UID.
 
const ot::UIDgetGraphicsItemUid (void) const
 
virtual void setGraphicsItemName (const std::string &_name)
 
const std::string & getGraphicsItemName (void) const
 
void setGraphicsItemToolTip (const std::string &_toolTip)
 
const std::string & getGraphicsItemToolTip (void) const
 
void setAdditionalTriggerDistance (const ot::MarginsD &_distance)
 
const ot::MarginsDgetAdditionalTriggerDistance (void) const
 
virtual double getMaxAdditionalTriggerDistance (void) const
 Returns the maximum trigger distance in any direction of this item and its childs.
 
void setGraphicsItemMinimumSize (double _width, double _height)
 
void setGraphicsItemMinimumSize (const QSizeF &_size)
 
QSizeF getGraphicsItemMinimumSize (void) const
 
void setGraphicsItemMaximumSize (double _width, double _height)
 
void setGraphicsItemMaximumSize (const QSizeF &_size)
 
QSizeF getGraphicsItemMaximumSize (void) const
 
void setGraphicsItemSizePolicy (ot::SizePolicy _policy)
 
ot::SizePolicy getGraphicsItemSizePolicy (void) const
 
void setGraphicsItemAlignment (ot::Alignment _align)
 
ot::Alignment getGraphicsItemAlignment (void) const
 
void setGraphicsItemMargins (const ot::MarginsD &_margins)
 
const ot::MarginsDgetGraphicsItemMargins (void) const
 
void setConnectionDirection (ot::ConnectionDirection _direction)
 
ot::ConnectionDirection getConnectionDirection (void) const
 
void setStringMap (const std::map< std::string, std::string > &_map)
 
const std::map< std::string, std::string > & getStringMap (void) const
 
void setGraphicsItemTransform (const Transform &_transform)
 
const TransformgetGraphicsItemTransform (void) const
 
void setForwardSizeChanges (bool _forward)
 
bool getForwardSizeChanges (void) const
 
void storeConnection (GraphicsConnectionItem *_connection)
 
void forgetConnection (GraphicsConnectionItem *_connection)
 Removes the collection from the list (item will not be destroyed)
 
void addGraphicsItemEventHandler (ot::GraphicsItem *_handler)
 
void removeGraphicsItemEventHandler (ot::GraphicsItem *_handler)
 
QSizeF applyGraphicsItemMargins (const QSizeF &_size) const
 
QSizeF removeGraphicsItemMargins (const QSizeF &_size) const
 
virtual void setGraphicsItemRequestedSize (const QSizeF &_size)
 
const QSizeF & graphicsItemRequestedSize (void) const
 
std::list< ot::GraphicsConnectionCfggetConnectionCfgs ()
 
void setGraphicsItemSelected (bool _selected)
 
bool getGraphicsItemSelected (void) const
 
void setBlockFlagNotifications (bool _block)
 
bool getBlockFlagNotifications (void) const
 If enabled the item will not call graphicsItemFlagsChanged() when the flags have changed.
 
void setBlockConfigurationNotifications (bool _block)
 
bool getBlockConfigurationNotifications (void) const
 If enabled the item will not call graphicsItemConfigurationChanged() when the flags have changed.
 
void setCurrentPosAsMoveStart (void)
 Sets the current item position as move start point.
 
void notifyMoveIfRequired (void)
 Notifies the view if the items current position changed relative to the move start point.
 
void parentItemTransformChanged (const QTransform &_parentTransform)
 
QRectF getTriggerBoundingRect (void) const
 Returns the bounding rect in scene coordinates which was expanded by the additional trigger distance according to the config.
 
- Public Member Functions inherited from ot::GraphicsElement
 GraphicsElement ()
 
virtual ~GraphicsElement ()
 
virtual QGraphicsItem * getQGraphicsItem (void)=0
 Returns the QGraphicsItem.
 
virtual const QGraphicsItem * getQGraphicsItem (void) const =0
 Returns the const QGraphicsItem.
 
virtual void setGraphicsScene (GraphicsScene *_scene)
 Set the GraphicsScene this element is placed at.
 
void setGraphicsElementState (GraphicsElementState _state, bool _active=true)
 Sets the provided state flag.
 
void setGraphicsElementStateFlags (const GraphicsElementStateFlags &_state)
 Replaces the flags with the flags provided.
 
const GraphicsElementStateFlagsgetGraphicsElementState (void) const
 Returns the current GraphicsItemStateFlags set.
 
virtual std::list< GraphicsElement * > getAllGraphicsElements (void)
 Returns all graphics elements nested in this element. The result contains this element and all of its childs.
 
virtual std::list< GraphicsElement * > getAllDirectChildElements (void)
 

Static Public Member Functions

static Painter2DcreateSelectionBorderPainter (void)
 Creates a StyleRefPainter2D painter referencing ot::ColorStyleValueEntry::GraphicsItemSelectionBorder. The caller takes ownership of the painter.
 
static Painter2DcreateHoverBorderPainter (void)
 Creates a StyleRefPainter2D painter referencing ot::ColorStyleValueEntry::GraphicsItemHoverBorder. The caller takes ownership of the painter.
 

Protected Member Functions

virtual void graphicsElementStateChanged (const GraphicsElementStateFlags &_state) override
 
template<class T >
T * getItemConfiguration (void)
 Returns the configuration for the current item. The configuration may be modified. The function will cast the current configuration to the type provided. The method will return 0 if the cast failed.
 
template<class T >
const T * getItemConfiguration (void) const
 Returns the configuration for the current item. The configuration may be modified. The function will cast the current configuration to the type provided. The method will return 0 if the cast failed.
 
virtual void applyGraphicsItemTransform (void)
 
virtual void notifyChildsAboutTransformChange (const QTransform &_newTransform)
 

Detailed Description

Base class for all OpenTwin GraphicsItems GraphicsItems should be created by the GraphicsFactory and be setup from the corresponding configuration.

Member Enumeration Documentation

◆ GraphicsItemEvent

The GraphicsItemEvent is used to describe the type of an event that occured.

Enumerator
ItemMoved 
ItemResized 

Constructor & Destructor Documentation

◆ GraphicsItem()

ot::GraphicsItem::GraphicsItem ( GraphicsItemCfg * _configuration)

Constructor.

Parameters
_configurationInitial configuration
_stateFlagsInitial state flags.

◆ ~GraphicsItem()

ot::GraphicsItem::~GraphicsItem ( )
virtual

Destructor.

Member Function Documentation

◆ addGraphicsItemEventHandler()

void ot::GraphicsItem::addGraphicsItemEventHandler ( ot::GraphicsItem * _handler)

◆ applyGraphicsItemMargins()

QSizeF ot::GraphicsItem::applyGraphicsItemMargins ( const QSizeF & _size) const

◆ applyGraphicsItemTransform()

void ot::GraphicsItem::applyGraphicsItemTransform ( void )
protectedvirtual

◆ calculatePaintArea()

QRectF ot::GraphicsItem::calculatePaintArea ( const QSizeF & _innerSize)

Calculates the draw rect for the item The inner rect takes into account the item geometry, alignment, margins and the actual inner size.

◆ calculateShortestDistanceToPoint()

qreal ot::GraphicsItem::calculateShortestDistanceToPoint ( const QPointF & _pt) const
overridevirtual

Calculates and returns the shortest distance to the given point. Returns -1 if the distance is invalid (e.g. maximum distance exceeded).

Parameters
_ptPoint in scene coordinates.

Reimplemented from ot::GraphicsElement.

◆ callPaint()

virtual void ot::GraphicsItem::callPaint ( QPainter * _painter,
const QStyleOptionGraphicsItem * _opt,
QWidget * _widget )
pure virtual

◆ createHoverBorderPainter()

ot::Painter2D * ot::GraphicsItem::createHoverBorderPainter ( void )
static

Creates a StyleRefPainter2D painter referencing ot::ColorStyleValueEntry::GraphicsItemHoverBorder. The caller takes ownership of the painter.

◆ createSelectionBorderPainter()

ot::Painter2D * ot::GraphicsItem::createSelectionBorderPainter ( void )
static

Creates a StyleRefPainter2D painter referencing ot::ColorStyleValueEntry::GraphicsItemSelectionBorder. The caller takes ownership of the painter.

◆ finalizeGraphicsItem()

virtual void ot::GraphicsItem::finalizeGraphicsItem ( void )
inlinevirtual

Will be called after setupFromConfig (i.e. if the item is completely created). Here the item structure is complete and the item may adjust settings that depend on parent items (e.g. Text reference for GraphicsTextItem). Container items must override this method to forward the call to their child items.

Reimplemented in ot::GraphicsGroupItem, ot::GraphicsLayoutItem, ot::GraphicsLayoutItemWrapper, ot::GraphicsStackItem, and ot::GraphicsTextItem.

◆ findItem()

ot::GraphicsItem * ot::GraphicsItem::findItem ( const std::string & _itemName)
virtual

Will return any child item that matches the _itemName.

Parameters
_itemNameThe name of the item to find.

Reimplemented in ot::GraphicsGroupItem, ot::GraphicsLayoutItem, and ot::GraphicsStackItem.

◆ forgetConnection()

void ot::GraphicsItem::forgetConnection ( GraphicsConnectionItem * _connection)

Removes the collection from the list (item will not be destroyed)

◆ getAdditionalTriggerDistance()

const ot::MarginsD & ot::GraphicsItem::getAdditionalTriggerDistance ( void ) const

◆ getBlockConfigurationNotifications()

bool ot::GraphicsItem::getBlockConfigurationNotifications ( void ) const
inline

If enabled the item will not call graphicsItemConfigurationChanged() when the flags have changed.

◆ getBlockFlagNotifications()

bool ot::GraphicsItem::getBlockFlagNotifications ( void ) const
inline

If enabled the item will not call graphicsItemFlagsChanged() when the flags have changed.

◆ getConfiguration()

const GraphicsItemCfg *const ot::GraphicsItem::getConfiguration ( void ) const
inline

Returns the current configuration.

◆ getConnectionCfgs()

std::list< ot::GraphicsConnectionCfg > ot::GraphicsItem::getConnectionCfgs ( )

◆ getConnectionDirection()

ot::ConnectionDirection ot::GraphicsItem::getConnectionDirection ( void ) const

◆ getForwardSizeChanges()

bool ot::GraphicsItem::getForwardSizeChanges ( void ) const
inline

◆ getGraphicsItemAlignment()

ot::Alignment ot::GraphicsItem::getGraphicsItemAlignment ( void ) const

◆ getGraphicsItemFlags()

const ot::GraphicsItemCfg::GraphicsItemFlags & ot::GraphicsItem::getGraphicsItemFlags ( void ) const

Returns the current GraphicsItemFlags set.

See also
GraphicsItem, GraphicsItemFlag

◆ getGraphicsItemMargins()

const ot::MarginsD & ot::GraphicsItem::getGraphicsItemMargins ( void ) const

◆ getGraphicsItemMaximumSize()

QSizeF ot::GraphicsItem::getGraphicsItemMaximumSize ( void ) const

◆ getGraphicsItemMinimumSize()

QSizeF ot::GraphicsItem::getGraphicsItemMinimumSize ( void ) const

◆ getGraphicsItemName()

const std::string & ot::GraphicsItem::getGraphicsItemName ( void ) const

◆ getGraphicsItemPos()

const ot::Point2DD & ot::GraphicsItem::getGraphicsItemPos ( void ) const

Returns the current position set in the configuration.

◆ getGraphicsItemSelected()

bool ot::GraphicsItem::getGraphicsItemSelected ( void ) const

◆ getGraphicsItemSizePolicy()

ot::SizePolicy ot::GraphicsItem::getGraphicsItemSizePolicy ( void ) const

◆ getGraphicsItemToolTip()

const std::string & ot::GraphicsItem::getGraphicsItemToolTip ( void ) const

◆ getGraphicsItemTransform()

const ot::Transform & ot::GraphicsItem::getGraphicsItemTransform ( void ) const

◆ getGraphicsItemUid()

const ot::UID & ot::GraphicsItem::getGraphicsItemUid ( void ) const

◆ getGraphicsScene()

ot::GraphicsScene * ot::GraphicsItem::getGraphicsScene ( void ) const
overridevirtual

Returns the GraphicsScene this item is placed at.

Reimplemented from ot::GraphicsElement.

◆ getItemConfiguration() [1/2]

template<class T >
T * ot::GraphicsItem::getItemConfiguration ( void )
protected

Returns the configuration for the current item. The configuration may be modified. The function will cast the current configuration to the type provided. The method will return 0 if the cast failed.

◆ getItemConfiguration() [2/2]

template<class T >
const T * ot::GraphicsItem::getItemConfiguration ( void ) const
protected

Returns the configuration for the current item. The configuration may be modified. The function will cast the current configuration to the type provided. The method will return 0 if the cast failed.

◆ getMaxAdditionalTriggerDistance()

double ot::GraphicsItem::getMaxAdditionalTriggerDistance ( void ) const
virtual

Returns the maximum trigger distance in any direction of this item and its childs.

Reimplemented in ot::GraphicsGroupItem, ot::GraphicsLayoutItem, ot::GraphicsLayoutItemWrapper, and ot::GraphicsStackItem.

◆ getParentGraphicsItem()

GraphicsItem * ot::GraphicsItem::getParentGraphicsItem ( void ) const
inline

◆ getQGraphicsLayoutItem()

virtual QGraphicsLayoutItem * ot::GraphicsItem::getQGraphicsLayoutItem ( void )
pure virtual

◆ getRootItem() [1/2]

ot::GraphicsItem * ot::GraphicsItem::getRootItem ( void )

◆ getRootItem() [2/2]

const ot::GraphicsItem * ot::GraphicsItem::getRootItem ( void ) const

◆ getStringMap()

const std::map< std::string, std::string > & ot::GraphicsItem::getStringMap ( void ) const

◆ getTriggerBoundingRect()

QRectF ot::GraphicsItem::getTriggerBoundingRect ( void ) const

Returns the bounding rect in scene coordinates which was expanded by the additional trigger distance according to the config.

See also
GraphicsItemCfg::setAdditionalTriggerDistance(const MarginsD& _d)

◆ graphicsElementStateChanged()

void ot::GraphicsItem::graphicsElementStateChanged ( const GraphicsElementStateFlags & _state)
overrideprotectedvirtual

◆ graphicsItemConfigurationChanged()

void ot::GraphicsItem::graphicsItemConfigurationChanged ( const GraphicsItemCfg * _config)
virtual

Will be called whenever the GraphicsItem configuration has changed.

Reimplemented in ot::GraphicsLayoutItem.

◆ graphicsItemEventHandler()

virtual void ot::GraphicsItem::graphicsItemEventHandler ( GraphicsItem * _sender,
GraphicsItemEvent _event )
inlinevirtual

Will be called when this item was registered as an event handler and the child raised an event.

Reimplemented in ot::GraphicsStackItem.

◆ graphicsItemFlagsChanged()

void ot::GraphicsItem::graphicsItemFlagsChanged ( const GraphicsItemCfg::GraphicsItemFlags & _flags)
virtual

Will be called whenever the GraphicsItem flags have changed.

Reimplemented in ot::GraphicsLayoutItem.

◆ graphicsItemRequestedSize()

const QSizeF & ot::GraphicsItem::graphicsItemRequestedSize ( void ) const
inline

◆ graphicsItemRequiresHover()

bool ot::GraphicsItem::graphicsItemRequiresHover ( void ) const
virtual

◆ graphicsItemSizeHint()

virtual QSizeF ot::GraphicsItem::graphicsItemSizeHint ( Qt::SizeHint _hint,
const QSizeF & _constrains ) const
pure virtual

◆ handleGetGraphicsItemBoundingRect()

QRectF ot::GraphicsItem::handleGetGraphicsItemBoundingRect ( const QRectF & _rect) const

Calculates the actual bounding rect including margins and requested size.

Parameters
_rectThe default item rect (the size should be the prefferred item size)

◆ handleGetGraphicsItemSizeHint()

QSizeF ot::GraphicsItem::handleGetGraphicsItemSizeHint ( Qt::SizeHint _hint,
const QSizeF & _sizeHint ) const

Will expand the size according to the margins.

◆ handleHoverEnterEvent()

void ot::GraphicsItem::handleHoverEnterEvent ( QGraphicsSceneHoverEvent * _event)

◆ handleHoverLeaveEvent()

void ot::GraphicsItem::handleHoverLeaveEvent ( QGraphicsSceneHoverEvent * _event)

◆ handleItemChange()

void ot::GraphicsItem::handleItemChange ( QGraphicsItem::GraphicsItemChange _change,
const QVariant & _value )

Handles general item updates. The selected state will be forwarded to the GraphicsHighlightItem. Position updates will update the connections and call GraphicsItem::graphicsItemEventHandler() with GraphicsItem::ItemMoved.

◆ handleMouseMoveEvent()

bool ot::GraphicsItem::handleMouseMoveEvent ( QGraphicsSceneMouseEvent * _event)

General event handler for mouse move events.

Returns
Returns true if the event should be processed.

◆ handleMousePressEvent()

void ot::GraphicsItem::handleMousePressEvent ( QGraphicsSceneMouseEvent * _event)

◆ handleMouseReleaseEvent()

void ot::GraphicsItem::handleMouseReleaseEvent ( QGraphicsSceneMouseEvent * _event)

◆ handleSetItemGeometry()

void ot::GraphicsItem::handleSetItemGeometry ( const QRectF & _geom)

◆ handleToolTip()

void ot::GraphicsItem::handleToolTip ( QGraphicsSceneHoverEvent * _event)

◆ notifyChildsAboutTransformChange()

virtual void ot::GraphicsItem::notifyChildsAboutTransformChange ( const QTransform & _newTransform)
inlineprotectedvirtual

◆ notifyMoveIfRequired()

void ot::GraphicsItem::notifyMoveIfRequired ( void )

Notifies the view if the items current position changed relative to the move start point.

◆ parentItemTransformChanged()

void ot::GraphicsItem::parentItemTransformChanged ( const QTransform & _parentTransform)

◆ prepareGraphicsItemGeometryChange()

virtual void ot::GraphicsItem::prepareGraphicsItemGeometryChange ( void )
pure virtual

Calls QGraphicsLayoutItem::prepareGeometryChange().

Implemented in ot::CustomGraphicsItem, ot::GraphicsGroupItem, ot::GraphicsLayoutItem, ot::GraphicsLayoutItemWrapper, and ot::GraphicsStackItem.

◆ raiseEvent()

void ot::GraphicsItem::raiseEvent ( ot::GraphicsItem::GraphicsItemEvent _event)

◆ removeAllConnections()

void ot::GraphicsItem::removeAllConnections ( void )
virtual

Removes all connections to or from this item.

Reimplemented in ot::GraphicsGroupItem, ot::GraphicsLayoutItem, ot::GraphicsLayoutItemWrapper, and ot::GraphicsStackItem.

◆ removeGraphicsItemEventHandler()

void ot::GraphicsItem::removeGraphicsItemEventHandler ( ot::GraphicsItem * _handler)

◆ removeGraphicsItemMargins()

QSizeF ot::GraphicsItem::removeGraphicsItemMargins ( const QSizeF & _size) const

◆ setAdditionalTriggerDistance()

void ot::GraphicsItem::setAdditionalTriggerDistance ( const ot::MarginsD & _distance)

◆ setBlockConfigurationNotifications()

void ot::GraphicsItem::setBlockConfigurationNotifications ( bool _block)
inline

◆ setBlockFlagNotifications()

void ot::GraphicsItem::setBlockFlagNotifications ( bool _block)
inline

◆ setConfiguration()

void ot::GraphicsItem::setConfiguration ( GraphicsItemCfg * _config)

Replaces the current configuration with the configuration prvided. The item takes ownership of the configuration.

◆ setConnectionDirection()

void ot::GraphicsItem::setConnectionDirection ( ot::ConnectionDirection _direction)

◆ setCurrentPosAsMoveStart()

void ot::GraphicsItem::setCurrentPosAsMoveStart ( void )

Sets the current item position as move start point.

◆ setForwardSizeChanges()

void ot::GraphicsItem::setForwardSizeChanges ( bool _forward)
inline

◆ setGraphicsItemAlignment()

void ot::GraphicsItem::setGraphicsItemAlignment ( ot::Alignment _align)

◆ setGraphicsItemFlag()

void ot::GraphicsItem::setGraphicsItemFlag ( ot::GraphicsItemCfg::GraphicsItemFlag _flag,
bool _active = true )

Sets the provided flag.

See also
GraphicsItem, GraphicsItemFlag
Parameters
_flagFlag to set.
_activeIf true will set the flag, otherwise unset it.

◆ setGraphicsItemFlags()

void ot::GraphicsItem::setGraphicsItemFlags ( ot::GraphicsItemCfg::GraphicsItemFlags _flags)

Replaces the flags with the flags provided.

Parameters
_flagsFlags to set.

◆ setGraphicsItemMargins()

void ot::GraphicsItem::setGraphicsItemMargins ( const ot::MarginsD & _margins)

◆ setGraphicsItemMaximumSize() [1/2]

void ot::GraphicsItem::setGraphicsItemMaximumSize ( const QSizeF & _size)

◆ setGraphicsItemMaximumSize() [2/2]

void ot::GraphicsItem::setGraphicsItemMaximumSize ( double _width,
double _height )
inline

◆ setGraphicsItemMinimumSize() [1/2]

void ot::GraphicsItem::setGraphicsItemMinimumSize ( const QSizeF & _size)

◆ setGraphicsItemMinimumSize() [2/2]

void ot::GraphicsItem::setGraphicsItemMinimumSize ( double _width,
double _height )
inline

◆ setGraphicsItemName()

void ot::GraphicsItem::setGraphicsItemName ( const std::string & _name)
virtual

Reimplemented in ot::GraphicsLayoutItem.

◆ setGraphicsItemPos() [1/2]

void ot::GraphicsItem::setGraphicsItemPos ( const Point2DD & _pos)

This function will update the position in the configuration and call QGraphicsItem::setPos.

◆ setGraphicsItemPos() [2/2]

void ot::GraphicsItem::setGraphicsItemPos ( const QPointF & _pos)

This function will update the position in the configuration and call QGraphicsItem::setPos.

◆ setGraphicsItemRequestedSize()

void ot::GraphicsItem::setGraphicsItemRequestedSize ( const QSizeF & _size)
virtual

◆ setGraphicsItemSelected()

void ot::GraphicsItem::setGraphicsItemSelected ( bool _selected)

◆ setGraphicsItemSizePolicy()

void ot::GraphicsItem::setGraphicsItemSizePolicy ( ot::SizePolicy _policy)

◆ setGraphicsItemToolTip()

void ot::GraphicsItem::setGraphicsItemToolTip ( const std::string & _toolTip)

◆ setGraphicsItemTransform()

void ot::GraphicsItem::setGraphicsItemTransform ( const Transform & _transform)

◆ setGraphicsItemUid()

void ot::GraphicsItem::setGraphicsItemUid ( const ot::UID & _uid)

Sets the GraphicsItem UID.

Parameters
_uidUID to set.

◆ setParentGraphicsItem()

virtual void ot::GraphicsItem::setParentGraphicsItem ( GraphicsItem * _itm)
inlinevirtual

Reimplemented in ot::GraphicsLayoutItem.

◆ setStringMap()

void ot::GraphicsItem::setStringMap ( const std::map< std::string, std::string > & _map)

◆ setupFromConfig()

bool ot::GraphicsItem::setupFromConfig ( const GraphicsItemCfg * _cfg)
virtual

◆ storeConnection()

void ot::GraphicsItem::storeConnection ( GraphicsConnectionItem * _connection)

The documentation for this class was generated from the following files: