#include <SceneComposedNodeItem.hxx>
Public Member Functions | |
SceneComposedNodeItem (QGraphicsScene *scene, SceneItem *parent, QString label, Subject *subject) | |
virtual | ~SceneComposedNodeItem () |
virtual QRectF | childrenBoundingRect () const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
virtual void | update (GuiEvent event, int type, Subject *son) |
virtual void | autoPosNewChild (AbstractSceneItem *item, const std::list< AbstractSceneItem * > alreadySet, bool isNew=false) |
virtual void | popupMenu (QWidget *caller, const QPoint &globalPos) |
virtual std::list < AbstractSceneItem * > | getChildren () |
virtual void | removeChildFromList (AbstractSceneItem *child) |
virtual void | reorganize () |
virtual void | reorganizeShrinkExpand (ShrinkMode theShrinkMode) |
virtual void | shrinkExpandRecursive (bool isExpanding, bool fromHere, ShrinkMode theShrinkMode) |
virtual void | shrinkExpandLink (bool se) |
virtual void | collisionResolv (SceneItem *child, QPointF oldPos) |
virtual void | rebuildLinks () |
virtual void | updateChildItems () |
virtual void | arrangeNodes (bool isRecursive) |
generic method to compute a graph for child nodes. implemented in some derived classes More... | |
virtual void | arrangeChildNodes () |
virtual void | adjustColors () |
virtual void | setShownState (shownState ss) |
virtual bool | hasExpandedChildren (bool recursively) |
Public Member Functions inherited from YACS::HMI::SceneNodeItem | |
SceneNodeItem (QGraphicsScene *scene, SceneItem *parent, QString label, Subject *subject) | |
virtual | ~SceneNodeItem () |
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 | addHeader () |
virtual SceneHeaderItem * | getHeader () |
virtual void | addProgressItem () |
virtual SceneProgressItem * | getProgressItem () |
virtual qreal | getHeaderBottom () |
virtual void | autoPosNewPort (AbstractSceneItem *item, int nbPorts) |
virtual SceneComposedNodeItem * | getParent () |
virtual void | removeInPortFromList (AbstractSceneItem *inPort) |
virtual void | removeOutPortFromList (AbstractSceneItem *outPort) |
virtual void | setMoving (bool moving) |
virtual void | setTopLeft (QPointF topLeft) |
virtual void | adjustHeader () |
virtual ScenePortItem * | getCtrlInPortItem () |
virtual ScenePortItem * | getCtrlOutPortItem () |
virtual void | updateName () |
virtual void | showOutScopeLinks () |
virtual void | updateLinks () |
bool | isExpanded () |
void | setExpanded (bool e) |
void | setExpandedPos (QPointF epos) |
qreal | getExpandedX () |
qreal | getExpandedY () |
void | setExpandedWH () |
void | setExpandedWH (qreal w, qreal h) |
qreal | getExpandedWidth () |
qreal | getExpandedHeight () |
shownState | getShownState () |
bool | hasProgressBar () const |
Public Member Functions inherited from YACS::HMI::SceneObserverItem | |
SceneObserverItem (QGraphicsScene *scene, SceneItem *parent, QString label, Subject *subject) | |
virtual | ~SceneObserverItem () |
virtual void | select (bool isSelected) |
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 | boundingRect () const |
virtual void | checkGeometryChange () |
void | setParent (SceneItem *parent) |
void | setEventPos (QPointF point) |
bool | isAncestorShrinked () |
Public Member Functions inherited from YACS::HMI::AbstractSceneItem | |
AbstractSceneItem (QGraphicsScene *scene, SceneItem *parent, QString label) | |
virtual | ~AbstractSceneItem () |
int | getLevel () |
void | setLevel () |
virtual QString | getLabel () |
qreal | getWidth () |
qreal | getHeight () |
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 | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) |
void | dropEvent (QGraphicsSceneDragDropEvent *event) |
void | updateControlLinks (bool toExpand) |
virtual QColor | getPenColor () |
virtual QColor | getBrushColor () |
Protected Member Functions inherited from YACS::HMI::SceneNodeItem | |
virtual QString | getMimeFormat () |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
virtual void | updateState () |
virtual void | setExecState (int execState) |
QString | getHeaderLabel () |
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 29 of file SceneComposedNodeItem.hxx.
SceneComposedNodeItem::SceneComposedNodeItem | ( | QGraphicsScene * | scene, |
SceneItem * | parent, | ||
QString | label, | ||
Subject * | subject | ||
) |
Definition at line 59 of file SceneComposedNodeItem.cxx.
References _dragOver, YACS::HMI::AbstractSceneItem::_height, YACS::HMI::AbstractSceneItem::_hiBrushColor, YACS::HMI::AbstractSceneItem::_hiPenColor, YACS::HMI::AbstractSceneItem::_penColor, YACS::HMI::AbstractSceneItem::_width, adjustColors(), YACS::HMI::Resource::ComposedNode_hiBrush, YACS::HMI::Resource::ComposedNode_hiPen, YACS::HMI::Resource::ComposedNode_pen, YACS::HMI::Resource::Corner_Margin, YACS::HMI::Resource::DataPort_Height, YACS::HMI::Resource::DataPort_Width, DEBTRACE, YACS::HMI::Resource::Header_Height, and YACS::HMI::Resource::Space_Margin.
Referenced by update().
|
virtual |
Definition at line 76 of file SceneComposedNodeItem.cxx.
|
virtual |
Definition at line 80 of file SceneComposedNodeItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, _children, YACS::HMI::AbstractSceneItem::_level, and YACS::HMI::Resource::ComposedNode_brush.
Referenced by SceneComposedNodeItem().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Reimplemented in YACS::HMI::SceneBlocItem.
Definition at line 829 of file SceneComposedNodeItem.cxx.
References reorganize().
Referenced by arrangeNodes().
|
virtual |
generic method to compute a graph for child nodes. implemented in some derived classes
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 784 of file SceneComposedNodeItem.cxx.
References YACS::HMI::Scene::_autoComputeLinks, YACS::HMI::QtGuiContext::_delayCalc, YACS::HMI::QtGuiContext::_mapOfSceneItem, YACS::HMI::GuiContext::_mapOfSubjectNode, arrangeChildNodes(), DEBTRACE, YACS::ENGINE::ComposedNode::edGetDirectDescendants(), YACS::HMI::expandShown, YACS::HMI::GuiContext::getCurrent(), YACS::HMI::SubjectNode::getNode(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::SceneObserverItem::getSubject(), rebuildLinks(), and YASSERT.
Referenced by YACS::HMI::GuiEditor::arrangeNodes(), and YACS::HMI::GuiEditor::arrangeProc().
|
virtual |
Definition at line 340 of file SceneComposedNodeItem.cxx.
References YACS::HMI::Scene::_autoComputeLinks, _children, YACS::HMI::SceneItem::_eventPos, YACS::HMI::SceneItem::boundingRect(), YACS::HMI::AbstractSceneItem::childBoundingRect(), collisionResolv(), YACS::HMI::Resource::Corner_Margin, DEBTRACE, YACS::HMI::SceneNodeItem::getHeaderBottom(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::GuiContext::isLoading(), rebuildLinks(), YACS::HMI::AbstractSceneItem::setTopLeft(), YACS::HMI::Resource::Space_Margin, and YASSERT.
Referenced by reorganize(), and update().
|
virtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 90 of file SceneComposedNodeItem.cxx.
References _children, YACS::HMI::SceneNodeItem::_header, YACS::HMI::Resource::Border_Margin, YACS::HMI::AbstractSceneItem::childBoundingRect(), and YACS::HMI::SceneHeaderNodeItem::getMinimalBoundingRect().
|
virtual |
Definition at line 637 of file SceneComposedNodeItem.cxx.
References YACS::HMI::SceneItem::_blocX, YACS::HMI::SceneItem::_blocY, _children, YACS::HMI::SceneItem::boundingRect(), YACS::HMI::SceneNodeItem::getHeaderBottom(), YACS::HMI::SceneNodeItem::setTopLeft(), YACS::HMI::SceneItem::setTopLeft(), and YACS::HMI::Resource::Space_Margin.
Referenced by autoPosNewChild().
|
protected |
|
protected |
Definition at line 853 of file SceneComposedNodeItem.cxx.
References _dragOver.
|
protected |
Definition at line 860 of file SceneComposedNodeItem.cxx.
References _dragOver, YACS::HMI::GenericGui::_guiEditor, YACS::HMI::Resource::COMPONENT_INSTANCE_NEW, YACS::HMI::GuiEditor::CreateNodeFromCatalog(), YACS::HMI::ItemMimeData::getControl(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::SceneObserverItem::getSubject(), YACS::HMI::ItemMimeData::getSubject(), YACS::HMI::SubjectNode::reparent(), and YACS::HMI::SceneItem::setEventPos().
|
protectedvirtual |
Reimplemented from YACS::HMI::SceneObserverItem.
Definition at line 903 of file SceneComposedNodeItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, _dragOver, YACS::HMI::SceneObserverItem::_emphasized, YACS::HMI::AbstractSceneItem::_hiBrushColor, YACS::HMI::SceneItem::_hover, YACS::HMI::Resource::emphasizeBrushColor, and YACS::HMI::SceneItem::hoverColor().
Referenced by paint().
|
virtual |
Definition at line 384 of file SceneComposedNodeItem.cxx.
References _children.
Referenced by YACS::HMI::LinkMatrix::explore().
|
protectedvirtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 893 of file SceneComposedNodeItem.cxx.
References _dragOver, YACS::HMI::AbstractSceneItem::_hiPenColor, YACS::HMI::AbstractSceneItem::_penColor, and YACS::HMI::Resource::dragOver.
Referenced by paint().
|
virtual |
Definition at line 467 of file SceneComposedNodeItem.cxx.
References _children, and YACS::HMI::SceneNodeItem::isExpanded().
Referenced by reorganizeShrinkExpand().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 101 of file SceneComposedNodeItem.cxx.
References YACS::HMI::AbstractSceneItem::_height, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::Resource::Border_Margin, getBrushColor(), and getPenColor().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Reimplemented in YACS::HMI::SceneProcItem.
Definition at line 378 of file SceneComposedNodeItem.cxx.
References gui.GraphViewer::m, and YACS::HMI::ComposedNodeMenu::popupMenu().
|
virtual |
Definition at line 741 of file SceneComposedNodeItem.cxx.
References YACS::HMI::Scene::_addRowCols, YACS::HMI::QtGuiContext::_delayCalc, CHRONO, CHRONOSTOP, YACS::HMI::LinkMatrix::compute(), YACS::HMI::LinkAStar::computePath(), DEBTRACE, YACS::HMI::linkdef::from, YACS::HMI::AbstractSceneItem::getLabel(), YACS::HMI::LinkMatrix::getListOfCtrlLinkDef(), YACS::HMI::LinkMatrix::getListOfDataLinkDef(), YACS::HMI::LinkMatrix::getPath(), YACS::HMI::LinkAStar::givePath(), YACS::HMI::LinkMatrix::incrementCost(), YACS::HMI::linkdef::item, YACS::HMI::SceneLinkItem::setPath(), and YACS::HMI::linkdef::to.
Referenced by YACS::HMI::SceneBlocItem::arrangeCanvasNodes(), arrangeNodes(), autoPosNewChild(), YACS::HMI::SceneNodeItem::mouseReleaseEvent(), YACS::HMI::GuiEditor::rebuildLinks(), YACS::HMI::SceneElementaryNodeItem::reorganizeShrinkExpand(), reorganizeShrinkExpand(), update(), YACS::HMI::SceneElementaryNodeItem::update(), and YACS::HMI::TablePortsEdition::upOrDown().
|
virtual |
Definition at line 389 of file SceneComposedNodeItem.cxx.
References _children.
Referenced by update().
|
virtual |
Reimplemented from YACS::HMI::AbstractSceneItem.
Definition at line 608 of file SceneComposedNodeItem.cxx.
References _children, YACS::HMI::AbstractSceneItem::_label, autoPosNewChild(), and DEBTRACE.
Referenced by arrangeChildNodes().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 429 of file SceneComposedNodeItem.cxx.
References YACS::HMI::SceneItem::_ancestorShrinked, YACS::HMI::Scene::_autoComputeLinks, _children, YACS::HMI::SceneNodeItem::_expanded, YACS::HMI::SceneNodeItem::_expandedHeight, YACS::HMI::SceneNodeItem::_expandedWidth, YACS::HMI::AbstractSceneItem::_height, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::QtGuiContext::_mapOfSceneItem, YACS::HMI::SceneNodeItem::_shownState, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::SceneNodeItem::adjustHeader(), YACS::HMI::CurrentNode, DEBTRACE, YACS::HMI::ElementaryNodes, YACS::HMI::expandShown, YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::GuiContext::getSubjectProc(), hasExpandedChildren(), YACS::HMI::SceneNodeItem::isExpanded(), rebuildLinks(), shrinkExpandRecursive(), YACS::HMI::SceneItem::shrinkExpandRecursive(), and updateControlLinks().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 619 of file SceneComposedNodeItem.cxx.
References YACS::HMI::SceneItem::_ancestorShrinked, YACS::HMI::SceneNodeItem::_progressItem, YACS::HMI::SceneNodeItem::_shownState, YACS::HMI::SceneProgressItem::adjustGeometry(), YACS::HMI::SceneNodeItem::adjustHeader(), and YACS::HMI::shrinkHidden.
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 598 of file SceneComposedNodeItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, DEBTRACE, and YACS::HMI::SceneNodeItem::isExpanded().
|
virtual |
Reimplemented from YACS::HMI::SceneItem.
Definition at line 483 of file SceneComposedNodeItem.cxx.
References YACS::HMI::SceneItem::_ancestorShrinked, _children, YACS::HMI::SceneNodeItem::_expandedHeight, YACS::HMI::SceneNodeItem::_expandedPos, YACS::HMI::SceneNodeItem::_expandedWidth, YACS::HMI::AbstractSceneItem::_height, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::SceneNodeItem::_progressItem, YACS::HMI::SceneNodeItem::_shownState, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::SceneProgressItem::adjustGeometry(), YACS::HMI::SceneNodeItem::adjustHeader(), YACS::HMI::ChildrenNodes, YACS::HMI::Resource::Corner_Margin, YACS::HMI::CurrentNode, YACS::HMI::Resource::DataPort_Width, DEBTRACE, YACS::HMI::ElementaryNodes, YACS::HMI::expandShown, YACS::HMI::SceneNodeItem::getHeaderBottom(), YACS::HMI::AbstractSceneItem::getLabel(), YACS::HMI::Resource::Header_Height, YACS::HMI::SceneNodeItem::isExpanded(), YACS::HMI::SceneNodeItem::setExpanded(), YACS::HMI::SceneItem::shrinkExpandLink(), YACS::HMI::SceneItem::shrinkExpandRecursive(), YACS::HMI::shrinkHidden, YACS::HMI::shrinkShown, YACS::HMI::Resource::Space_Margin, and updateControlLinks().
Referenced by reorganizeShrinkExpand().
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 120 of file SceneComposedNodeItem.cxx.
References YACS::HMI::Scene::_autoComputeLinks, _children, YACS::HMI::SceneNodeItem::_header, YACS::HMI::SceneNodeItem::_inPorts, YACS::HMI::QtGuiContext::_mapOfSceneItem, YACS::HMI::GuiContext::_mapOfSubjectNode, YACS::HMI::SceneNodeItem::_outPorts, YACS::HMI::AbstractSceneItem::_scene, YACS::HMI::SceneObserverItem::_subject, YACS::HMI::ADD, YACS::HMI::ADDCONTROLLINK, YACS::HMI::AbstractSceneItem::addHeader(), YACS::HMI::ADDLINK, YACS::HMI::AbstractSceneItem::addProgressItem(), autoPosNewChild(), YACS::HMI::SceneHeaderNodeItem::autoPosNewPort(), YACS::HMI::BLOC, YACS::HMI::CONTROLLINK, YACS::HMI::CORBANODE, YACS::HMI::CPPNODE, YACS::HMI::CUT, YACS::HMI::DATALINK, DEBTRACE, YACS::ENGINE::Switch::edGetNode(), YACS::HMI::GuiObserver::eventName(), YACS::HMI::FOREACHLOOP, YACS::HMI::FORLOOP, YACS::HMI::SceneNodeItem::getCtrlInPortItem(), YACS::HMI::SceneNodeItem::getCtrlOutPortItem(), YACS::HMI::GuiContext::getCurrent(), YACS::HMI::Subject::getName(), YACS::HMI::SubjectNode::getNode(), YACS::HMI::Subject::getProgress(), YACS::HMI::SceneNodeItem::getProgressItem(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::GuiContext::getSubjectProc(), YACS::HMI::INPUTDATASTREAMPORT, YACS::HMI::INPUTPORT, YACS::HMI::OPTIMIZERLOOP, YACS::HMI::OUTNODE, YACS::HMI::OUTPUTDATASTREAMPORT, YACS::HMI::OUTPUTPORT, YACS::HMI::PASTE, YACS::HMI::PRESETNODE, YACS::HMI::PROGRESS, YACS::HMI::PYFUNCNODE, YACS::HMI::PYTHONNODE, rebuildLinks(), YACS::HMI::REMOVE, removeChildFromList(), YACS::HMI::SALOMENODE, YACS::HMI::SALOMEPYTHONNODE, SceneComposedNodeItem(), YACS::HMI::SETCASE, YACS::HMI::AbstractSceneItem::setLevel(), YACS::HMI::SceneItem::setParent(), YACS::HMI::STUDYINNODE, YACS::HMI::STUDYOUTNODE, YACS::HMI::SWITCH, YACS::HMI::SceneNodeItem::update(), YACS::HMI::SceneNodeItem::updateName(), YACS::HMI::SceneLinkItem::updateShape(), YACS::HMI::WHILELOOP, and YACS::HMI::XMLNODE.
Referenced by gui.graph.MyCanvas::customEvent().
|
virtual |
Reimplemented from YACS::HMI::SceneNodeItem.
Definition at line 921 of file SceneComposedNodeItem.cxx.
References YACS::HMI::SceneNodeItem::_header, and YACS::HMI::SceneNodeItem::updateChildItems().
|
protected |
Definition at line 394 of file SceneComposedNodeItem.cxx.
References YACS::HMI::QtGuiContext::_mapOfSceneItem, YACS::HMI::SceneLinkItem::getFromNode(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::SceneObserverItem::getSubject(), and YACS::HMI::SceneLinkItem::getToNode().
Referenced by reorganizeShrinkExpand(), and shrinkExpandRecursive().
|
protected |
Definition at line 67 of file SceneComposedNodeItem.hxx.
Referenced by adjustColors(), autoPosNewChild(), childrenBoundingRect(), collisionResolv(), getChildren(), hasExpandedChildren(), removeChildFromList(), reorganize(), reorganizeShrinkExpand(), shrinkExpandRecursive(), and update().
|
protected |
Definition at line 68 of file SceneComposedNodeItem.hxx.
Referenced by dragEnterEvent(), dragLeaveEvent(), dropEvent(), getBrushColor(), getPenColor(), and SceneComposedNodeItem().