Version: 8.3.0
YACS::HMI::SceneCtrlLinkItem Class Reference

#include <SceneCtrlLinkItem.hxx>

Inheritance diagram for YACS::HMI::SceneCtrlLinkItem:
Collaboration diagram for YACS::HMI::SceneCtrlLinkItem:

Public Member Functions

 SceneCtrlLinkItem (QGraphicsScene *scene, SceneItem *parent, ScenePortItem *from, ScenePortItem *to, QString label, Subject *subject)
 
virtual ~SceneCtrlLinkItem ()
 
virtual QPointF start ()
 
virtual QPointF goal ()
 
- Public Member Functions inherited from YACS::HMI::SceneLinkItem
 SceneLinkItem (QGraphicsScene *scene, SceneItem *parent, ScenePortItem *from, ScenePortItem *to, QString label, Subject *subject)
 
virtual ~SceneLinkItem ()
 
virtual void select (bool isSelected)
 
virtual QRectF boundingRect () const
 
virtual QPainterPath shape () const
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
virtual void update (GuiEvent event, int type, Subject *son)
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos)
 
virtual void setPath (LinkPath lp)
 
virtual void minimizeDirectionChanges ()
 
virtual void force2points ()
 
virtual void updateShape ()
 
virtual SceneNodeItemgetFromNode ()
 
virtual SceneNodeItemgetToNode ()
 
- Public Member Functions inherited from YACS::HMI::SceneObserverItem
 SceneObserverItem (QGraphicsScene *scene, SceneItem *parent, QString label, Subject *subject)
 
virtual ~SceneObserverItem ()
 
virtual void activateSelection (bool selected)
 
virtual SubjectgetSubject ()
 
virtual QString getToolTip ()
 
- Public Member Functions inherited from YACS::HMI::SceneItem
 SceneItem (QGraphicsScene *scene, SceneItem *parent, QString label)
 
virtual ~SceneItem ()
 
virtual QRectF childrenBoundingRect () const
 
virtual void setTopLeft (QPointF topLeft)
 
virtual void checkGeometryChange ()
 
void setParent (SceneItem *parent)
 
void setEventPos (QPointF point)
 
virtual void updateChildItems ()
 
virtual void updateLinks ()
 
virtual void shrinkExpandLink (bool se)
 
virtual void shrinkExpandRecursive (bool isExpanding, bool fromHere, ShrinkMode theShrinkMode)
 
bool isAncestorShrinked ()
 
- Public Member Functions inherited from YACS::HMI::AbstractSceneItem
 AbstractSceneItem (QGraphicsScene *scene, SceneItem *parent, QString label)
 
virtual ~AbstractSceneItem ()
 
int getLevel ()
 
void setLevel ()
 
virtual void reorganize ()
 
virtual QString getLabel ()
 
virtual void addHeader ()
 
virtual void addProgressItem ()
 
virtual qreal getHeaderBottom ()
 
qreal getWidth ()
 
qreal getHeight ()
 
virtual void setWidth (qreal width)
 AbstractSceneItem cannot be resized (only ComposedNodeItem can) More...
 
virtual void setHeight (qreal height)
 AbstractSceneItem cannot be resized (only ComposedNodeItem can) More...
 
virtual void setGeometryOptimization (bool optimize)
 
SceneItemgetParent ()
 
- Public Member Functions inherited from YACS::HMI::GuiObserver
 GuiObserver ()
 
virtual ~GuiObserver ()
 
virtual void incrementSubjects (Subject *subject)
 
virtual void decrementSubjects (Subject *subject)
 
int getNbSubjects ()
 
bool isDestructible ()
 

Protected Member Functions

virtual QColor getBrushColor ()
 
virtual QColor getPenColor ()
 
- Protected Member Functions inherited from YACS::HMI::SceneLinkItem
void setShape (int thickness=1)
 
void addArrow (QPointF pfrom, QPointF pto, HMI::Direction dir, int thickness=1)
 
- Protected Member Functions inherited from YACS::HMI::SceneObserverItem
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
virtual QString getMimeFormat ()
 
- Protected Member Functions inherited from YACS::HMI::SceneItem
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
QColor hoverColor (QColor origColor)
 
- Protected Member Functions inherited from YACS::HMI::AbstractSceneItem
virtual QRectF childBoundingRect (AbstractSceneItem *child) const
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::HMI::GuiObserver
static std::string eventName (GuiEvent event)
 
static void setEventMap ()
 
- Public Attributes inherited from YACS::HMI::SceneItem
bool _blocX
 
bool _blocY
 
- Protected Attributes inherited from YACS::HMI::SceneLinkItem
QPainterPath _path
 
ScenePortItem_from
 
ScenePortItem_to
 
std::vector< QPointF > _lp
 
std::vector< Direction_directions
 
int _nbPoints
 
- Static Protected Attributes inherited from YACS::HMI::GuiObserver
static std::map< int, std::string > _eventNameMap
 

Detailed Description

Definition at line 33 of file SceneCtrlLinkItem.hxx.

Constructor & Destructor Documentation

SceneCtrlLinkItem::~SceneCtrlLinkItem ( )
virtual

Definition at line 48 of file SceneCtrlLinkItem.cxx.

49 {
50 }

Member Function Documentation

QPointF SceneCtrlLinkItem::goal ( )
virtual

Reimplemented from YACS::HMI::SceneLinkItem.

Definition at line 60 of file SceneCtrlLinkItem.cxx.

References YACS::HMI::SceneLinkItem::_to, DEBTRACE, YACS::HMI::AbstractSceneItem::getHeight(), and YACS::HMI::AbstractSceneItem::getWidth().

61 {
62  SceneCtrlPortItem* dpit = dynamic_cast<SceneCtrlPortItem*>(_to);
63  QPointF localTo(dpit->getWidth()/20, dpit->getHeight()/2);
64  DEBTRACE("localTo(" << localTo.x() << "," << localTo.y() << ")");
65  return mapFromItem(dpit, localTo);
66 }
QPointF SceneCtrlLinkItem::start ( void  )
virtual

Reimplemented from YACS::HMI::SceneLinkItem.

Definition at line 52 of file SceneCtrlLinkItem.cxx.

References YACS::HMI::SceneLinkItem::_from, DEBTRACE, YACS::HMI::AbstractSceneItem::getHeight(), and YACS::HMI::AbstractSceneItem::getWidth().

53 {
54  SceneCtrlPortItem* dpif = dynamic_cast<SceneCtrlPortItem*>(_from);
55  QPointF localFrom(dpif->getWidth()*(9.5/10), dpif->getHeight()/2);
56  DEBTRACE("localFrom(" << localFrom.x() << "," << localFrom.y() << ")");
57  return mapFromItem(dpif, localFrom);
58 }

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