#include <SceneLinkItem.hxx>
Public Member Functions | |
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 QPointF | start () |
virtual QPointF | goal () |
virtual void | updateShape () |
virtual SceneNodeItem * | getFromNode () |
virtual SceneNodeItem * | getToNode () |
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 Subject * | getSubject () |
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) |
SceneItem * | getParent () |
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 | |
void | setShape (int thickness=1) |
void | addArrow (QPointF pfrom, QPointF pto, HMI::Direction dir, int thickness=1) |
virtual QColor | getBrushColor () |
virtual QColor | getPenColor () |
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 |
Protected Attributes | |
QPainterPath | _path |
ScenePortItem * | _from |
ScenePortItem * | _to |
std::vector< QPointF > | _lp |
std::vector< Direction > | _directions |
int | _nbPoints |
Protected Attributes inherited from YACS::HMI::SceneObserverItem | |
Subject * | _subject |
bool | _draging |
bool | _dragModifier |
bool | _emphasized |
Protected Attributes inherited from YACS::HMI::SceneItem | |
bool | _hover |
bool | _ancestorShrinked |
QPointF | _eventPos |
Protected Attributes inherited from YACS::HMI::AbstractSceneItem | |
SceneItem * | _parent |
YACS::HMI::Scene * | _scene |
QString | _label |
int | _level |
qreal | _width |
qreal | _height |
qreal | _incHeight |
QColor | _penColor |
QColor | _brushColor |
QColor | _hiPenColor |
QColor | _hiBrushColor |
bool | _hasHeader |
bool | _optimize |
bool | _dragable |
enum Qt::MouseButton | _dragButton |
Protected Attributes inherited from YACS::HMI::GuiObserver | |
std::set< Subject * > | _subjectSet |
bool | _destructible |
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 |
Static Protected Attributes inherited from YACS::HMI::GuiObserver | |
static std::map< int, std::string > | _eventNameMap |
Definition at line 52 of file SceneLinkItem.hxx.
SceneLinkItem::SceneLinkItem | ( | QGraphicsScene * | scene, |
SceneItem * | parent, | ||
ScenePortItem * | from, | ||
ScenePortItem * | to, | ||
QString | label, | ||
Subject * | subject | ||
) |
Definition at line 43 of file SceneLinkItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, _directions, _from, YACS::HMI::AbstractSceneItem::_hiBrushColor, YACS::HMI::AbstractSceneItem::_hiPenColor, YACS::HMI::AbstractSceneItem::_level, _lp, _nbPoints, _path, YACS::HMI::AbstractSceneItem::_penColor, _to, DEBTRACE, YACS::HMI::Resource::link_draw_color, YACS::HMI::Resource::link_pen_darkness, and YACS::HMI::Resource::link_select_color.
|
virtual |
Definition at line 63 of file SceneLinkItem.cxx.
|
protected |
Definition at line 128 of file SceneLinkItem.cxx.
References YACS::HMI::_DOWN, YACS::HMI::_LEFT, _path, YACS::HMI::_RIGHT, YACS::HMI::_UP, and YACS::HMI::Resource::link_thickness.
Referenced by setShape().
|
virtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 77 of file SceneLinkItem.cxx.
References _path.
|
virtual |
Definition at line 492 of file SceneLinkItem.cxx.
References _directions, YACS::HMI::_DOWN, _lp, _nbPoints, YACS::HMI::_RIGHT, YACS::HMI::_UP, gui.CONNECTOR::a, gui.CONNECTOR::b, goal(), CORBAEngineTest::i, and start().
Referenced by setPath().
|
protectedvirtual |
Reimplemented from YACS::HMI::SceneObserverItem.
Reimplemented in YACS::HMI::SceneCtrlLinkItem, and YACS::HMI::SceneDSLinkItem.
Definition at line 569 of file SceneLinkItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, YACS::HMI::AbstractSceneItem::_hiBrushColor, YACS::HMI::SceneObserverItem::getBrushColor(), YACS::HMI::Resource::link_draw_color, and YACS::HMI::Resource::link_select_color.
Referenced by paint().
|
virtual |
Definition at line 577 of file SceneLinkItem.cxx.
References _from, YACS::HMI::SceneCtrlPortItem::getParentNode(), and p.
Referenced by YACS::HMI::SceneComposedNodeItem::updateControlLinks().
|
protectedvirtual |
Reimplemented from YACS::HMI::SceneItem.
Reimplemented in YACS::HMI::SceneCtrlLinkItem, and YACS::HMI::SceneDSLinkItem.
Definition at line 562 of file SceneLinkItem.cxx.
References YACS::HMI::AbstractSceneItem::_hiPenColor, YACS::HMI::AbstractSceneItem::_penColor, YACS::HMI::SceneItem::getPenColor(), YACS::HMI::Resource::link_draw_color, YACS::HMI::Resource::link_pen_darkness, and YACS::HMI::Resource::link_select_color.
Referenced by paint().
|
virtual |
Definition at line 587 of file SceneLinkItem.cxx.
References _to, YACS::HMI::SceneCtrlPortItem::getParentNode(), and p.
Referenced by YACS::HMI::SceneComposedNodeItem::updateControlLinks().
|
virtual |
Reimplemented in YACS::HMI::SceneCtrlLinkItem.
Definition at line 536 of file SceneLinkItem.cxx.
References _to, DEBTRACE, YACS::HMI::AbstractSceneItem::getHeight(), and YACS::HMI::AbstractSceneItem::getWidth().
Referenced by force2points(), setPath(), setShape(), and updateShape().
|
virtual |
replace patterns like (right, down, right, down) with (right, right, down, down) if new path is OK (no obstacle in the modified rectangle), then combine the segments.
Definition at line 365 of file SceneLinkItem.cxx.
References _directions, YACS::HMI::_LEFT, _lp, _nbPoints, YACS::HMI::_RIGHT, DEBTRACE, and CORBAEngineTest::i.
Referenced by setPath().
|
virtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 213 of file SceneLinkItem.cxx.
References YACS::HMI::SceneObserverItem::_emphasized, _path, getBrushColor(), getPenColor(), and setShape().
|
virtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 261 of file SceneLinkItem.cxx.
References gui.GraphViewer::m, and YACS::HMI::LinkMenu::popupMenu().
|
virtual |
Reimplemented from YACS::HMI::SceneObserverItem.
Definition at line 67 of file SceneLinkItem.cxx.
References YACS::HMI::AbstractSceneItem::_level, DEBTRACE, and YACS::HMI::SceneObserverItem::select().
|
virtual |
Definition at line 267 of file SceneLinkItem.cxx.
References _directions, YACS::HMI::_DOWN, YACS::HMI::SceneObserverItem::_emphasized, YACS::HMI::Scene::_force2NodesLink, YACS::HMI::_LEFT, _lp, _nbPoints, YACS::HMI::_RIGHT, YACS::HMI::Scene::_simplifyLinks, YACS::HMI::_UP, CHRONO, CHRONOSTOP, DEBTRACE, force2points(), goal(), minimizeDirectionChanges(), p, setShape(), and start().
Referenced by YACS::HMI::SceneComposedNodeItem::rebuildLinks().
|
protected |
Definition at line 88 of file SceneLinkItem.cxx.
References _directions, _lp, _nbPoints, _path, YACS::HMI::_RIGHT, YACS::HMI::Scene::_straightLinks, addArrow(), DEBTRACE, goal(), YACS::HMI::Resource::link_thickness, and start().
Referenced by paint(), setPath(), update(), and updateShape().
|
virtual |
Definition at line 82 of file SceneLinkItem.cxx.
References _path.
|
virtual |
Reimplemented in YACS::HMI::SceneCtrlLinkItem.
Definition at line 528 of file SceneLinkItem.cxx.
References _from, DEBTRACE, YACS::HMI::AbstractSceneItem::getHeight(), and YACS::HMI::AbstractSceneItem::getWidth().
Referenced by force2points(), setPath(), setShape(), and updateShape().
Reimplemented from YACS::HMI::SceneObserverItem.
Definition at line 228 of file SceneLinkItem.cxx.
References YACS::HMI::SceneObserverItem::_emphasized, YACS::HMI::AbstractSceneItem::_level, DEBTRACE, YACS::HMI::EMPHASIZE, YACS::HMI::GuiObserver::eventName(), setShape(), and YACS::HMI::SWITCHSHAPE.
Referenced by gui.graph.MyCanvas::customEvent().
|
virtual |
Definition at line 544 of file SceneLinkItem.cxx.
References _directions, YACS::HMI::_DOWN, YACS::HMI::SceneObserverItem::_emphasized, _lp, _nbPoints, YACS::HMI::_UP, goal(), setShape(), and start().
Referenced by YACS::HMI::SceneComposedNodeItem::update(), YACS::HMI::SceneDataPortItem::updateChildItems(), YACS::HMI::SceneDataPortItem::updateLinks(), and YACS::HMI::SceneNodeItem::updateLinks().
|
protected |
Definition at line 90 of file SceneLinkItem.hxx.
Referenced by force2points(), minimizeDirectionChanges(), SceneLinkItem(), setPath(), setShape(), and updateShape().
|
protected |
Definition at line 87 of file SceneLinkItem.hxx.
Referenced by getFromNode(), SceneLinkItem(), YACS::HMI::SceneCtrlLinkItem::start(), and start().
|
protected |
Definition at line 89 of file SceneLinkItem.hxx.
Referenced by force2points(), minimizeDirectionChanges(), SceneLinkItem(), setPath(), setShape(), and updateShape().
|
protected |
Definition at line 91 of file SceneLinkItem.hxx.
Referenced by force2points(), minimizeDirectionChanges(), SceneLinkItem(), setPath(), setShape(), and updateShape().
|
protected |
Definition at line 86 of file SceneLinkItem.hxx.
Referenced by addArrow(), boundingRect(), paint(), SceneLinkItem(), setShape(), and shape().
|
protected |
Definition at line 88 of file SceneLinkItem.hxx.
Referenced by getToNode(), YACS::HMI::SceneCtrlLinkItem::goal(), goal(), and SceneLinkItem().