#include <SceneObserverItem.hxx>
Public Member Functions | |
SceneObserverItem (QGraphicsScene *scene, SceneItem *parent, QString label, Subject *subject) | |
virtual | ~SceneObserverItem () |
virtual void | update (GuiEvent event, int type, Subject *son) |
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 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) |
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 | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
virtual QColor | getBrushColor () |
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) |
virtual QColor | getPenColor () |
QColor | hoverColor (QColor origColor) |
Protected Member Functions inherited from YACS::HMI::AbstractSceneItem | |
virtual QRectF | childBoundingRect (AbstractSceneItem *child) const |
Protected Attributes | |
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 31 of file SceneObserverItem.hxx.
SceneObserverItem::SceneObserverItem | ( | QGraphicsScene * | scene, |
SceneItem * | parent, | ||
QString | label, | ||
Subject * | subject | ||
) |
Definition at line 42 of file SceneObserverItem.cxx.
References _draging, _dragModifier, _emphasized, YACS::HMI::QtGuiContext::_mapOfSceneItem, _subject, YACS::HMI::Subject::attach(), and YACS::HMI::QtGuiContext::getQtCurrent().
|
virtual |
Definition at line 54 of file SceneObserverItem.cxx.
References YACS::HMI::QtGuiContext::_mapOfSceneItem, _subject, and YACS::HMI::QtGuiContext::getQtCurrent().
|
virtual |
Reimplemented from YACS::HMI::AbstractSceneItem.
Definition at line 190 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, _subject, DEBTRACE, and YACS::HMI::Subject::select().
|
protectedvirtual |
Reimplemented from YACS::HMI::SceneItem.
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneComposedNodeItem, YACS::HMI::SceneCtrlLinkItem, YACS::HMI::SceneInPortItem, and YACS::HMI::SceneDSLinkItem.
Definition at line 177 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_brushColor, _emphasized, YACS::HMI::AbstractSceneItem::_hiBrushColor, YACS::HMI::SceneItem::_hover, YACS::HMI::Resource::emphasizeBrushColor, and YACS::HMI::SceneItem::hoverColor().
Referenced by YACS::HMI::SceneDSLinkItem::getBrushColor(), YACS::HMI::SceneCtrlLinkItem::getBrushColor(), YACS::HMI::SceneLinkItem::getBrushColor(), YACS::HMI::SceneElementaryNodeItem::paint(), and YACS::HMI::SceneDataPortItem::paint().
|
protectedvirtual |
Reimplemented in YACS::HMI::SceneNodeItem, and YACS::HMI::SceneOutPortItem.
Definition at line 201 of file SceneObserverItem.cxx.
Referenced by mouseMoveEvent().
|
virtual |
Definition at line 196 of file SceneObserverItem.cxx.
References _subject.
Referenced by YACS::HMI::SceneBlocItem::arrangeChildNodes(), YACS::HMI::SceneComposedNodeItem::arrangeNodes(), YACS::HMI::SceneCtrlInPortItem::dropEvent(), YACS::HMI::SceneInPortItem::dropEvent(), YACS::HMI::SceneComposedNodeItem::dropEvent(), YACS::HMI::SceneNodeItem::getHeaderLabel(), YACS::HMI::SceneCtrlPortItem::getSubjectNode(), YACS::HMI::SceneDataPortItem::SceneDataPortItem(), and YACS::HMI::SceneComposedNodeItem::updateControlLinks().
|
virtual |
generic behaviour for headers: obtain the tooltip from parent. Method to be redefined in derived classes.
Reimplemented from YACS::HMI::SceneItem.
Definition at line 89 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, YACS::HMI::QtGuiContext::_mapOfSchemaItem, _subject, YACS::HMI::SchemaItem::data(), DEBTRACE, and YACS::HMI::QtGuiContext::getQtCurrent().
|
protectedvirtual |
creation of mime data if drag detected. setData mime type must be coherent with SchemaModel::mimeTypes to allow drop on port item in tree view
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 123 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_dragButton, _draging, _dragModifier, _subject, DEBTRACE, getMimeFormat(), YACS::HMI::SceneItem::paint(), and YACS::HMI::ItemMimeData::setSubject().
Referenced by YACS::HMI::SceneNodeItem::mouseMoveEvent().
|
protectedvirtual |
When Zooming, filter all mouse events to items: do not work, scene do not receive...
Reimplemented from YACS::HMI::SceneItem.
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 102 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_dragable, YACS::HMI::AbstractSceneItem::_dragButton, _draging, _dragModifier, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::_scene, _subject, DEBTRACE, YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::isEdition(), YACS::HMI::Scene::isZooming(), and YACS::HMI::Subject::select().
Referenced by YACS::HMI::SceneNodeItem::mousePressEvent().
|
protectedvirtual |
Reimplemented in YACS::HMI::SceneNodeItem.
Definition at line 167 of file SceneObserverItem.cxx.
References _draging, and _dragModifier.
Referenced by YACS::HMI::SceneNodeItem::mouseReleaseEvent().
|
virtual |
Reimplemented from YACS::HMI::GuiObserver.
Reimplemented in YACS::HMI::SceneLinkItem.
Definition at line 77 of file SceneObserverItem.cxx.
References YACS::HMI::AbstractSceneItem::_label, _subject, DEBTRACE, YACS::HMI::QtGuiContext::getQtCurrent(), and YACS::HMI::QtGuiContext::setSelectedSubject().
Referenced by YACS::HMI::SceneLinkItem::select().
Reimplemented from YACS::HMI::GuiObserver.
Reimplemented in YACS::HMI::SceneLinkItem, YACS::HMI::SceneNodeItem, YACS::HMI::SceneDataPortItem, YACS::HMI::SceneElementaryNodeItem, and YACS::HMI::SceneComposedNodeItem.
Definition at line 59 of file SceneObserverItem.cxx.
References _emphasized, DEBTRACE, YACS::HMI::EMPHASIZE, and YACS::HMI::GuiObserver::eventName().
Referenced by gui.graph.MyCanvas::customEvent(), YACS::HMI::SceneDataPortItem::update(), and YACS::HMI::SceneNodeItem::update().
|
protected |
Definition at line 49 of file SceneObserverItem.hxx.
Referenced by mouseMoveEvent(), mousePressEvent(), YACS::HMI::SceneNodeItem::mousePressEvent(), mouseReleaseEvent(), and SceneObserverItem().
|
protected |
Definition at line 50 of file SceneObserverItem.hxx.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and SceneObserverItem().
|
protected |
Definition at line 51 of file SceneObserverItem.hxx.
Referenced by YACS::HMI::SceneInPortItem::getBrushColor(), getBrushColor(), YACS::HMI::SceneComposedNodeItem::getBrushColor(), YACS::HMI::SceneLinkItem::paint(), SceneObserverItem(), YACS::HMI::SceneLinkItem::setPath(), update(), YACS::HMI::SceneLinkItem::update(), and YACS::HMI::SceneLinkItem::updateShape().
|
protected |
Definition at line 48 of file SceneObserverItem.hxx.
Referenced by activateSelection(), YACS::HMI::SceneNodeItem::getHeaderLabel(), getSubject(), getToolTip(), mouseMoveEvent(), mousePressEvent(), YACS::HMI::SceneElementaryNodeItem::reorganize(), SceneObserverItem(), select(), YACS::HMI::SceneNodeItem::showOutScopeLinks(), YACS::HMI::SceneDataPortItem::shrinkExpandLink(), YACS::HMI::SceneComposedNodeItem::update(), YACS::HMI::SceneNodeItem::update(), YACS::HMI::SceneDataPortItem::updateChildItems(), YACS::HMI::SceneDataPortItem::updateLinks(), YACS::HMI::SceneNodeItem::updateLinks(), YACS::HMI::SceneNodeItem::updateState(), and ~SceneObserverItem().