#include <SceneItem.hxx>
Public Member Functions | |
SceneItem (QGraphicsScene *scene, SceneItem *parent, QString label) | |
virtual | ~SceneItem () |
virtual QRectF | boundingRect () const |
virtual QRectF | childrenBoundingRect () const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
virtual void | setTopLeft (QPointF topLeft) |
virtual void | checkGeometryChange () |
virtual void | popupMenu (QWidget *caller, const QPoint &globalPos) |
void | setParent (SceneItem *parent) |
virtual QString | getToolTip () |
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 | activateSelection (bool selected) |
virtual void | setGeometryOptimization (bool optimize) |
SceneItem * | getParent () |
Public Attributes | |
bool | _blocX |
bool | _blocY |
Protected Member Functions | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
virtual void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
virtual QColor | getPenColor () |
virtual QColor | getBrushColor () |
QColor | hoverColor (QColor origColor) |
Protected Member Functions inherited from YACS::HMI::AbstractSceneItem | |
virtual QRectF | childBoundingRect (AbstractSceneItem *child) const |
Protected Attributes | |
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 |
Generic class for 2D graphics item, inherits QGraphicsItem, specialised in 2 kind of classes, with or without inheritance from GuiObserver.
Definition at line 120 of file SceneItem.hxx.
SceneItem::SceneItem | ( | QGraphicsScene * | scene, |
SceneItem * | parent, | ||
QString | label | ||
) |
Definition at line 191 of file SceneItem.cxx.
References _ancestorShrinked, _hover, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::_level, YACS::HMI::AbstractSceneItem::_parent, and DEBTRACE.
|
virtual |
Definition at line 203 of file SceneItem.cxx.
|
virtual |
Implements YACS::HMI::AbstractSceneItem.
Reimplemented in YACS::HMI::SceneLinkItem.
Definition at line 215 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_height, and YACS::HMI::AbstractSceneItem::_width.
Referenced by YACS::HMI::SceneBlocItem::arrangeCanvasNodes(), YACS::HMI::SceneComposedNodeItem::autoPosNewChild(), YACS::HMI::LinkMatrix::cellFrom(), YACS::HMI::LinkMatrix::cellTo(), YACS::HMI::SceneComposedNodeItem::collisionResolv(), YACS::HMI::LinkMatrix::getBoundingBox(), YACS::HMI::GraphicsView::onViewFitAll(), and YACS::HMI::GraphicsView::onZoomToBloc().
|
virtual |
Implements YACS::HMI::AbstractSceneItem.
Definition at line 248 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_height, YACS::HMI::AbstractSceneItem::_incHeight, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::_optimize, YACS::HMI::AbstractSceneItem::_parent, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::SceneNodeItem::adjustHeader(), checkGeometryChange(), childrenBoundingRect(), DEBTRACE, YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::isLoadingPresentation(), YACS::HMI::SceneNodeItem::setExpandedWH(), and YACS::HMI::SceneNodeItem::updateLinks().
Referenced by YACS::HMI::SceneNodeItem::addHeader(), YACS::HMI::SceneNodeItem::addProgressItem(), YACS::HMI::SceneBlocItem::arrangeCanvasNodes(), checkGeometryChange(), YACS::HMI::GuiEditor::PutGraphInBloc(), YACS::HMI::SceneNodeItem::setTopLeft(), and setTopLeft().
|
virtual |
Reimplemented in YACS::HMI::SceneComposedNodeItem.
Definition at line 224 of file SceneItem.cxx.
Referenced by checkGeometryChange().
|
protectedvirtual |
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneComposedNodeItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneObserverItem, YACS::HMI::SceneCtrlLinkItem, YACS::HMI::SceneInPortItem, and YACS::HMI::SceneDSLinkItem.
Definition at line 404 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, YACS::HMI::AbstractSceneItem::_hiBrushColor, _hover, and hoverColor().
|
protectedvirtual |
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneComposedNodeItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneCtrlLinkItem, YACS::HMI::SceneDSLinkItem, and YACS::HMI::SceneInPortItem.
Definition at line 364 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_hiPenColor, and YACS::HMI::AbstractSceneItem::_penColor.
Referenced by YACS::HMI::SceneDSLinkItem::getPenColor(), YACS::HMI::SceneCtrlLinkItem::getPenColor(), YACS::HMI::SceneLinkItem::getPenColor(), YACS::HMI::SceneElementaryNodeItem::paint(), YACS::HMI::SceneDataPortItem::paint(), and YACS::HMI::SceneCtrlPortItem::paint().
|
virtual |
generic behaviour for headers: obtain the tooltip from parent. Method to be redefined in derived classes.
Reimplemented in YACS::HMI::SceneProgressItem, and YACS::HMI::SceneObserverItem.
Definition at line 336 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::getParent(), and getToolTip().
Referenced by YACS::HMI::SceneTextItem::getToolTip(), and getToolTip().
|
protected |
Definition at line 372 of file SceneItem.cxx.
References gui.CONNECTOR::a, and gui.CONNECTOR::b.
Referenced by YACS::HMI::SceneInPortItem::getBrushColor(), YACS::HMI::SceneObserverItem::getBrushColor(), YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneProgressItem::getBrushColor(), YACS::HMI::SceneComposedNodeItem::getBrushColor(), and getBrushColor().
|
protectedvirtual |
Definition at line 388 of file SceneItem.cxx.
References _hover.
|
protectedvirtual |
Definition at line 398 of file SceneItem.cxx.
References _hover.
|
protectedvirtual |
Definition at line 394 of file SceneItem.cxx.
|
inline |
|
protectedvirtual |
When Zooming, filter all mouse events to items: do not work, scene do not receive...
Reimplemented in YACS::HMI::SceneNodeItem, YACS::HMI::SceneHeaderNodeItem, YACS::HMI::SceneCtrlPortItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneHeaderItem, and YACS::HMI::SceneObserverItem.
Definition at line 357 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::_scene, YACS::HMI::AbstractSceneItem::activateSelection(), DEBTRACE, and YACS::HMI::Scene::isZooming().
|
virtual |
Implements YACS::HMI::AbstractSceneItem.
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneNodeItem, YACS::HMI::SceneCtrlPortItem, YACS::HMI::SceneHeaderNodeItem, YACS::HMI::SceneDataPortItem, YACS::HMI::SceneElementaryNodeItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneProgressItem, and YACS::HMI::SceneComposedNodeItem.
Definition at line 229 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneObserverItem::mouseMoveEvent().
|
virtual |
Implements YACS::HMI::AbstractSceneItem.
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneNodeItem, YACS::HMI::SceneHeaderNodeItem, YACS::HMI::SceneComposedNodeItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneElementaryNodeItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneCtrlInPortItem, YACS::HMI::SceneCtrlOutPortItem, YACS::HMI::SceneInPortItem, YACS::HMI::SceneOutPortItem, and YACS::HMI::SceneProcItem.
Definition at line 416 of file SceneItem.cxx.
References gui.GraphViewer::m, and YACS::HMI::MenusBase::popupMenu().
Referenced by YACS::HMI::GraphicsView::contextMenuEvent(), YACS::HMI::SceneHeaderItem::popupMenu(), YACS::HMI::SceneTextItem::popupMenu(), YACS::HMI::SceneProgressItem::popupMenu(), and YACS::HMI::SceneHeaderNodeItem::popupMenu().
void SceneItem::setEventPos | ( | QPointF | point | ) |
Definition at line 422 of file SceneItem.cxx.
References _eventPos, and YACS::HMI::AbstractSceneItem::getHeaderBottom().
Referenced by YACS::HMI::GraphicsView::contextMenuEvent(), and YACS::HMI::SceneComposedNodeItem::dropEvent().
void SceneItem::setParent | ( | SceneItem * | parent | ) |
Definition at line 207 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_level, YACS::HMI::AbstractSceneItem::_parent, and YACS::HMI::AbstractSceneItem::getLevel().
Referenced by YACS::HMI::SceneComposedNodeItem::update().
|
virtual |
Implements YACS::HMI::AbstractSceneItem.
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 241 of file SceneItem.cxx.
References YACS::HMI::AbstractSceneItem::_parent, and checkGeometryChange().
Referenced by YACS::HMI::SceneHeaderNodeItem::adjustPosPorts(), YACS::HMI::SceneComposedNodeItem::collisionResolv(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), and YACS::HMI::SceneProgressItem::SceneProgressItem().
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem, YACS::HMI::SceneComposedNodeItem, and YACS::HMI::SceneDataPortItem.
Definition at line 434 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().
|
virtual |
Reimplemented in YACS::HMI::SceneComposedNodeItem, and YACS::HMI::SceneElementaryNodeItem.
Definition at line 439 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneComposedNodeItem::reorganizeShrinkExpand(), and YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem, YACS::HMI::SceneComposedNodeItem, and YACS::HMI::SceneDataPortItem.
Definition at line 430 of file SceneItem.cxx.
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem, and YACS::HMI::SceneDataPortItem.
Definition at line 443 of file SceneItem.cxx.
|
protected |
Definition at line 156 of file SceneItem.hxx.
Referenced by isAncestorShrinked(), YACS::HMI::SceneComposedNodeItem::reorganizeShrinkExpand(), SceneItem(), YACS::HMI::SceneElementaryNodeItem::setShownState(), YACS::HMI::SceneComposedNodeItem::setShownState(), YACS::HMI::SceneElementaryNodeItem::shrinkExpandRecursive(), and YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().
bool YACS::HMI::SceneItem::_blocX |
Definition at line 142 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneComposedNodeItem::collisionResolv(), YACS::HMI::SceneNodeItem::mouseMoveEvent(), and YACS::HMI::SceneNodeItem::SceneNodeItem().
bool YACS::HMI::SceneItem::_blocY |
Definition at line 144 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneComposedNodeItem::collisionResolv(), YACS::HMI::SceneNodeItem::mouseMoveEvent(), and YACS::HMI::SceneNodeItem::SceneNodeItem().
|
protected |
Definition at line 157 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneComposedNodeItem::autoPosNewChild(), and setEventPos().
|
protected |
Definition at line 155 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneInPortItem::getBrushColor(), YACS::HMI::SceneObserverItem::getBrushColor(), YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneProgressItem::getBrushColor(), YACS::HMI::SceneComposedNodeItem::getBrushColor(), getBrushColor(), hoverEnterEvent(), hoverLeaveEvent(), and SceneItem().