#include <SceneItem.hxx>
Public Member Functions | |
AbstractSceneItem (QGraphicsScene *scene, SceneItem *parent, QString label) | |
virtual | ~AbstractSceneItem () |
virtual QRectF | boundingRect () const =0 |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)=0 |
virtual void | setTopLeft (QPointF topLeft)=0 |
int | getLevel () |
void | setLevel () |
virtual void | checkGeometryChange ()=0 |
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 | popupMenu (QWidget *caller, const QPoint &globalPos)=0 |
virtual void | activateSelection (bool selected) |
virtual void | setGeometryOptimization (bool optimize) |
SceneItem * | getParent () |
Protected Member Functions | |
virtual QRectF | childBoundingRect (AbstractSceneItem *child) const |
Protected Attributes | |
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 |
Base class for 2D graphics item, does not herit neither from QGraphicsItem, nor from GuiObserver. not instantiable. See derived classes.
Definition at line 64 of file SceneItem.hxx.
AbstractSceneItem::AbstractSceneItem | ( | QGraphicsScene * | scene, |
SceneItem * | parent, | ||
QString | label | ||
) |
|
virtual |
Definition at line 112 of file SceneItem.cxx.
|
virtual |
Reimplemented in YACS::HMI::SceneObserverItem.
Definition at line 180 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneItem::mousePressEvent().
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 140 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneComposedNodeItem::update().
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 144 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneComposedNodeItem::update().
|
pure virtual |
Implemented in YACS::HMI::SceneItem, YACS::HMI::SceneLinkItem, and YACS::HMI::SceneTextItem.
|
pure virtual |
Implemented in YACS::HMI::SceneItem, and YACS::HMI::SceneTextItem.
|
protectedvirtual |
Definition at line 173 of file SceneItem.cxx.
References YASSERT.
Referenced by YACS::HMI::SceneComposedNodeItem::autoPosNewChild(), and YACS::HMI::SceneComposedNodeItem::childrenBoundingRect().
|
virtual |
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 148 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneItem::setEventPos().
qreal AbstractSceneItem::getHeight | ( | ) |
Definition at line 158 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneBlocItem::getNodesInfo(), YACS::HMI::SceneCtrlLinkItem::goal(), YACS::HMI::SceneLinkItem::goal(), YACS::HMI::SceneTextItem::paint(), YACS::HMI::SceneCtrlLinkItem::start(), YACS::HMI::SceneLinkItem::start(), and YACS::HMI::VisitorSaveGuiSchema::writeItem().
|
virtual |
Definition at line 135 of file SceneItem.cxx.
Referenced by YACS::HMI::LinkMatrix::getListOfCtrlLinkDef(), YACS::HMI::LinkMatrix::getListOfDataLinkDef(), YACS::HMI::Scene::mousePressEvent(), YACS::HMI::SceneComposedNodeItem::rebuildLinks(), and YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().
int AbstractSceneItem::getLevel | ( | ) |
Definition at line 116 of file SceneItem.cxx.
Referenced by AbstractSceneItem(), and YACS::HMI::SceneItem::setParent().
|
inline |
Definition at line 92 of file SceneItem.hxx.
References _parent.
Referenced by YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneProgressItem::getBrushColor(), YACS::HMI::SceneCtrlPortItem::getParentNode(), YACS::HMI::SceneHeaderItem::getPenColor(), YACS::HMI::SceneTextItem::getToolTip(), and YACS::HMI::SceneItem::getToolTip().
qreal AbstractSceneItem::getWidth | ( | ) |
Definition at line 153 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneHeaderItem::adjustGeometry(), YACS::HMI::SceneProgressItem::adjustGeometry(), YACS::HMI::SceneHeaderNodeItem::adjustGeometry(), YACS::HMI::SceneHeaderNodeItem::adjustPosPorts(), YACS::HMI::SceneHeaderNodeItem::autoPosNewPort(), YACS::HMI::SceneBlocItem::getNodesInfo(), YACS::HMI::SceneCtrlLinkItem::goal(), YACS::HMI::SceneLinkItem::goal(), YACS::HMI::SceneTextItem::paint(), YACS::HMI::SceneProgressItem::paint(), YACS::HMI::SceneHeaderNodeItem::paint(), YACS::HMI::SceneHeaderNodeItem::reorganizePorts(), YACS::HMI::SceneCtrlLinkItem::start(), YACS::HMI::SceneLinkItem::start(), and YACS::HMI::VisitorSaveGuiSchema::writeItem().
|
pure virtual |
Implemented in YACS::HMI::SceneItem, YACS::HMI::SceneLinkItem, YACS::HMI::SceneNodeItem, YACS::HMI::SceneCtrlPortItem, YACS::HMI::SceneHeaderNodeItem, YACS::HMI::SceneDataPortItem, YACS::HMI::SceneElementaryNodeItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneComposedNodeItem, and YACS::HMI::SceneTextItem.
|
pure virtual |
Implemented in YACS::HMI::SceneItem, YACS::HMI::SceneLinkItem, YACS::HMI::SceneNodeItem, YACS::HMI::SceneHeaderNodeItem, YACS::HMI::SceneComposedNodeItem, YACS::HMI::SceneProgressItem, YACS::HMI::SceneTextItem, YACS::HMI::SceneElementaryNodeItem, YACS::HMI::SceneHeaderItem, YACS::HMI::SceneCtrlInPortItem, YACS::HMI::SceneCtrlOutPortItem, YACS::HMI::SceneInPortItem, YACS::HMI::SceneOutPortItem, and YACS::HMI::SceneProcItem.
|
virtual |
Reimplemented in YACS::HMI::SceneComposedNodeItem, and YACS::HMI::SceneElementaryNodeItem.
Definition at line 131 of file SceneItem.cxx.
|
virtual |
Definition at line 185 of file SceneItem.cxx.
|
virtual |
AbstractSceneItem cannot be resized (only ComposedNodeItem can)
Reimplemented in YACS::HMI::SceneNodeItem, and YACS::HMI::SceneElementaryNodeItem.
Definition at line 169 of file SceneItem.cxx.
void AbstractSceneItem::setLevel | ( | ) |
Definition at line 121 of file SceneItem.cxx.
Referenced by YACS::HMI::SceneComposedNodeItem::update().
|
pure virtual |
|
virtual |
AbstractSceneItem cannot be resized (only ComposedNodeItem can)
Reimplemented in YACS::HMI::SceneNodeItem, and YACS::HMI::SceneElementaryNodeItem.
Definition at line 164 of file SceneItem.cxx.
|
protected |
Definition at line 105 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneComposedNodeItem::adjustColors(), YACS::HMI::SceneDSLinkItem::getBrushColor(), YACS::HMI::SceneInPortItem::getBrushColor(), YACS::HMI::SceneCtrlLinkItem::getBrushColor(), YACS::HMI::SceneObserverItem::getBrushColor(), YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneProgressItem::getBrushColor(), YACS::HMI::SceneComposedNodeItem::getBrushColor(), YACS::HMI::SceneLinkItem::getBrushColor(), YACS::HMI::SceneItem::getBrushColor(), YACS::HMI::SceneCtrlLinkItem::SceneCtrlLinkItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneDSLinkItem::SceneDSLinkItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneLinkItem::SceneLinkItem(), YACS::HMI::SceneNodeItem::SceneNodeItem(), YACS::HMI::SceneProgressItem::SceneProgressItem(), and YACS::HMI::SceneHeaderNodeItem::setEdited().
|
protected |
Definition at line 110 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneObserverItem::mousePressEvent(), YACS::HMI::SceneCtrlPortItem::mousePressEvent(), YACS::HMI::SceneCtrlOutPortItem::SceneCtrlOutPortItem(), YACS::HMI::SceneNodeItem::SceneNodeItem(), and YACS::HMI::SceneOutPortItem::SceneOutPortItem().
|
protected |
Definition at line 111 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneObserverItem::mouseMoveEvent(), YACS::HMI::SceneCtrlPortItem::mouseMoveEvent(), YACS::HMI::SceneObserverItem::mousePressEvent(), YACS::HMI::SceneCtrlPortItem::mousePressEvent(), and YACS::HMI::SceneNodeItem::SceneNodeItem().
|
protected |
Definition at line 108 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneNodeItem::addHeader(), YACS::HMI::SceneHeaderNodeItem::getHeaderBottom(), YACS::HMI::SceneNodeItem::getHeaderBottom(), and YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem().
|
protected |
Definition at line 102 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneElementaryNodeItem::autoPosNewPort(), YACS::HMI::SceneItem::boundingRect(), YACS::HMI::SceneItem::checkGeometryChange(), YACS::HMI::SceneHeaderItem::getMinimalBoundingRect(), YACS::HMI::SceneProgressItem::getMinimalBoundingRect(), YACS::HMI::SceneComposedNodeItem::paint(), YACS::HMI::SceneElementaryNodeItem::paint(), YACS::HMI::SceneComposedNodeItem::reorganizeShrinkExpand(), YACS::HMI::SceneComposedNodeItem::SceneComposedNodeItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneNodeItem::SceneNodeItem(), YACS::HMI::SceneProgressItem::SceneProgressItem(), YACS::HMI::SceneNodeItem::setExpandedWH(), YACS::HMI::SceneNodeItem::setHeight(), and YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().
|
protected |
Definition at line 107 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneDSLinkItem::getBrushColor(), YACS::HMI::SceneInPortItem::getBrushColor(), YACS::HMI::SceneCtrlLinkItem::getBrushColor(), YACS::HMI::SceneObserverItem::getBrushColor(), YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneProgressItem::getBrushColor(), YACS::HMI::SceneComposedNodeItem::getBrushColor(), YACS::HMI::SceneLinkItem::getBrushColor(), YACS::HMI::SceneItem::getBrushColor(), YACS::HMI::SceneComposedNodeItem::SceneComposedNodeItem(), YACS::HMI::SceneCtrlLinkItem::SceneCtrlLinkItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneDSLinkItem::SceneDSLinkItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneLinkItem::SceneLinkItem(), and YACS::HMI::SceneProgressItem::SceneProgressItem().
|
protected |
Definition at line 106 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneDSLinkItem::getPenColor(), YACS::HMI::SceneInPortItem::getPenColor(), YACS::HMI::SceneCtrlLinkItem::getPenColor(), YACS::HMI::SceneHeaderItem::getPenColor(), YACS::HMI::SceneProgressItem::getPenColor(), YACS::HMI::SceneComposedNodeItem::getPenColor(), YACS::HMI::SceneLinkItem::getPenColor(), YACS::HMI::SceneItem::getPenColor(), YACS::HMI::SceneComposedNodeItem::SceneComposedNodeItem(), YACS::HMI::SceneCtrlLinkItem::SceneCtrlLinkItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneDSLinkItem::SceneDSLinkItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneLinkItem::SceneLinkItem(), and YACS::HMI::SceneProgressItem::SceneProgressItem().
|
protected |
Definition at line 103 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneElementaryNodeItem::autoPosNewPort(), and YACS::HMI::SceneItem::checkGeometryChange().
|
protected |
Definition at line 99 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneObserverItem::activateSelection(), YACS::HMI::SceneNodeItem::addHeader(), YACS::HMI::SceneHeaderNodeItem::adjustGeometry(), YACS::HMI::SceneElementaryNodeItem::autoPosNewPort(), YACS::HMI::SceneItem::checkGeometryChange(), YACS::HMI::SceneObserverItem::getToolTip(), YACS::HMI::SceneTextItem::getToolTip(), YACS::HMI::SceneItem::getToolTip(), YACS::HMI::SceneObserverItem::mousePressEvent(), YACS::HMI::SceneCtrlPortItem::mousePressEvent(), YACS::HMI::SceneNodeItem::mousePressEvent(), YACS::HMI::SceneItem::mousePressEvent(), YACS::HMI::SceneTextItem::paint(), YACS::HMI::SceneElementaryNodeItem::reorganize(), YACS::HMI::SceneComposedNodeItem::reorganize(), YACS::HMI::SceneHeaderNodeItem::reorganizePorts(), YACS::HMI::SceneElementaryNodeItem::reorganizeShrinkExpand(), YACS::HMI::SceneComposedNodeItem::reorganizeShrinkExpand(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneItem::SceneItem(), YACS::HMI::SceneObserverItem::select(), YACS::HMI::SceneTextItem::setPlainTextTrunc(), YACS::HMI::SceneComposedNodeItem::shrinkExpandLink(), YACS::HMI::SceneElementaryNodeItem::shrinkExpandRecursive(), YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive(), YACS::HMI::SceneDataPortItem::updateChildItems(), and YACS::HMI::SceneDataPortItem::updateLinks().
|
protected |
Definition at line 100 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneComposedNodeItem::adjustColors(), YACS::HMI::SceneItem::SceneItem(), YACS::HMI::SceneLinkItem::SceneLinkItem(), YACS::HMI::SceneTextItem::SceneTextItem(), YACS::HMI::SceneLinkItem::select(), YACS::HMI::SceneItem::setParent(), and YACS::HMI::SceneLinkItem::update().
|
protected |
Definition at line 109 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneItem::checkGeometryChange().
|
protected |
Definition at line 97 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneHeaderNodeItem::adaptComposedNode(), YACS::HMI::SceneHeaderItem::adjustGeometry(), YACS::HMI::SceneProgressItem::adjustGeometry(), YACS::HMI::SceneHeaderNodeItem::adjustGeometry(), YACS::HMI::SceneHeaderNodeItem::adjustPosPorts(), YACS::HMI::SceneHeaderNodeItem::autoPosNewPort(), YACS::HMI::SceneItem::checkGeometryChange(), YACS::HMI::SceneNodeItem::getHeaderLabel(), YACS::HMI::SceneDataPortItem::getParent(), YACS::HMI::SceneNodeItem::getParent(), getParent(), YACS::HMI::SceneCtrlPortItem::getParentNode(), YACS::HMI::SceneNodeItem::mouseMoveEvent(), YACS::HMI::SceneTextItem::paint(), YACS::HMI::SceneProgressItem::paint(), YACS::HMI::SceneCtrlPortItem::paint(), YACS::HMI::SceneHeaderNodeItem::paint(), YACS::HMI::SceneHeaderItem::popupMenu(), YACS::HMI::SceneTextItem::popupMenu(), YACS::HMI::SceneProgressItem::popupMenu(), YACS::HMI::SceneHeaderNodeItem::popupMenu(), YACS::HMI::SceneHeaderNodeItem::reorganizePorts(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneItem::SceneItem(), YACS::HMI::SceneProgressItem::SceneProgressItem(), YACS::HMI::SceneTextItem::SceneTextItem(), YACS::HMI::SceneHeaderNodeItem::setEdited(), YACS::HMI::SceneHeaderNodeItem::setExecState(), YACS::HMI::SceneNodeItem::setMoving(), YACS::HMI::SceneItem::setParent(), YACS::HMI::SceneNodeItem::setTopLeft(), YACS::HMI::SceneItem::setTopLeft(), and YACS::HMI::SceneHeaderNodeItem::setValid().
|
protected |
Definition at line 104 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneDSLinkItem::getPenColor(), YACS::HMI::SceneInPortItem::getPenColor(), YACS::HMI::SceneCtrlLinkItem::getPenColor(), YACS::HMI::SceneHeaderItem::getPenColor(), YACS::HMI::SceneComposedNodeItem::getPenColor(), YACS::HMI::SceneLinkItem::getPenColor(), YACS::HMI::SceneItem::getPenColor(), YACS::HMI::SceneComposedNodeItem::SceneComposedNodeItem(), YACS::HMI::SceneCtrlLinkItem::SceneCtrlLinkItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneDSLinkItem::SceneDSLinkItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneLinkItem::SceneLinkItem(), and YACS::HMI::SceneProgressItem::SceneProgressItem().
|
protected |
Definition at line 98 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneNodeItem::addHeader(), YACS::HMI::SceneNodeItem::addProgressItem(), YACS::HMI::SceneObserverItem::mousePressEvent(), YACS::HMI::SceneCtrlPortItem::mousePressEvent(), YACS::HMI::SceneNodeItem::mousePressEvent(), YACS::HMI::SceneItem::mousePressEvent(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneDataPortItem::setText(), YACS::HMI::SceneCtrlPortItem::setText(), YACS::HMI::SceneHeaderItem::setText(), YACS::HMI::SceneProgressItem::setText(), YACS::HMI::SceneComposedNodeItem::update(), and YACS::HMI::SceneElementaryNodeItem::update().
|
protected |
Definition at line 101 of file SceneItem.hxx.
Referenced by YACS::HMI::SceneHeaderItem::adjustGeometry(), YACS::HMI::SceneProgressItem::adjustGeometry(), YACS::HMI::SceneHeaderNodeItem::adjustGeometry(), YACS::HMI::SceneItem::boundingRect(), YACS::HMI::SceneItem::checkGeometryChange(), YACS::HMI::SceneProgressItem::getMinimalBoundingRect(), YACS::HMI::SceneComposedNodeItem::paint(), YACS::HMI::SceneElementaryNodeItem::paint(), YACS::HMI::SceneComposedNodeItem::reorganizeShrinkExpand(), YACS::HMI::SceneComposedNodeItem::SceneComposedNodeItem(), YACS::HMI::SceneCtrlPortItem::SceneCtrlPortItem(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), YACS::HMI::SceneElementaryNodeItem::SceneElementaryNodeItem(), YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneHeaderNodeItem::SceneHeaderNodeItem(), YACS::HMI::SceneNodeItem::SceneNodeItem(), YACS::HMI::SceneProgressItem::SceneProgressItem(), YACS::HMI::SceneNodeItem::setExpandedWH(), YACS::HMI::SceneNodeItem::setWidth(), and YACS::HMI::SceneComposedNodeItem::shrinkExpandRecursive().