Version: 8.3.0
YACS::HMI::SceneHeaderNodeItem Class Reference

#include <SceneHeaderNodeItem.hxx>

Inheritance diagram for YACS::HMI::SceneHeaderNodeItem:
Collaboration diagram for YACS::HMI::SceneHeaderNodeItem:

Public Member Functions

 SceneHeaderNodeItem (QGraphicsScene *scene, SceneItem *parent, QString label)
 
virtual ~SceneHeaderNodeItem ()
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
virtual void setText (QString label)
 
virtual qreal getHeaderBottom () const
 
virtual void autoPosControl (AbstractSceneItem *item)
 
virtual void autoPosNewPort (AbstractSceneItem *item)
 
virtual void reorganizePorts (shownState ss)
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos)
 
virtual void adjustGeometry ()
 
virtual void adjustPosPorts ()
 
virtual QRectF getMinimalBoundingRect () const
 
virtual void adaptComposedNode (SceneItem *port, qreal deltaY)
 
virtual void setEdited (bool isEdited)
 
virtual void setValid (bool isValid)
 
virtual void setExecState (int execState)
 
virtual SceneCtrlPortItemgetCtrlInPortItem ()
 
virtual SceneCtrlPortItemgetCtrlOutPortItem ()
 
QColor getValidColor ()
 
- Public Member Functions inherited from YACS::HMI::SceneHeaderItem
 SceneHeaderItem (QGraphicsScene *scene, SceneItem *parent, QString label)
 
virtual ~SceneHeaderItem ()
 
- 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 setTopLeft (QPointF topLeft)
 
virtual void checkGeometryChange ()
 
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)
 
SceneItemgetParent ()
 

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
- Protected Member Functions inherited from YACS::HMI::SceneHeaderItem
QColor getPenColor ()
 
QColor getBrushColor ()
 
- 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

SceneNodeItem_fatherNode
 
SceneHeaderItem_header
 
SceneCtrlPortItem_controlIn
 
SceneCtrlPortItem_controlOut
 
std::list< SceneInPortItem * > _inPorts
 
std::list< SceneOutPortItem * > _outPorts
 
int _maxPorts
 
QColor _sc
 
QString _stateDef
 
int _execState
 
bool _isProc
 
bool _isValid
 
bool _isEdited
 
- Protected Attributes inherited from YACS::HMI::SceneHeaderItem
SceneTextItem_text
 
- 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
 

Additional Inherited Members

- Public Attributes inherited from YACS::HMI::SceneItem
bool _blocX
 
bool _blocY
 

Detailed Description

Definition at line 34 of file SceneHeaderNodeItem.hxx.

Constructor & Destructor Documentation

SceneHeaderNodeItem::SceneHeaderNodeItem ( QGraphicsScene scene,
SceneItem parent,
QString  label 
)

Definition at line 46 of file SceneHeaderNodeItem.cxx.

References YACS::HMI::AbstractSceneItem::_brushColor, _controlIn, _controlOut, _execState, _fatherNode, YACS::HMI::AbstractSceneItem::_hasHeader, _header, YACS::HMI::AbstractSceneItem::_height, _isEdited, _isProc, _isValid, YACS::HMI::AbstractSceneItem::_label, _maxPorts, YACS::HMI::AbstractSceneItem::_parent, _sc, YACS::HMI::AbstractSceneItem::_scene, _stateDef, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::Resource::Corner_Margin, YACS::HMI::Resource::CtrlPort_Width, YACS::HMI::Resource::DataPort_Width, YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::Resource::Header_Height, YACS::HMI::Resource::normalNodeBrushColor, YACS::HMI::Resource::runNodeBrushColor, YACS::HMI::SceneHeaderItem::SceneHeaderItem(), YACS::HMI::SceneHeaderItem::setText(), YACS::HMI::SceneItem::setTopLeft(), YACS::HMI::Resource::Space_Margin, YACS::UNDEFINED, and YACS::HMI::Resource::validNodeColor.

48  : SceneHeaderItem(scene, parent, label)
49 {
50  _fatherNode= dynamic_cast<SceneNodeItem*>(parent);
53  _maxPorts = 0;
54 
55  _header = 0;
56  _controlIn = 0;
57  _controlOut = 0;
58  _label = "H_" + _label;
59  _hasHeader = true;
60 
61  _controlIn = new SceneCtrlInPortItem(_scene, this, "in");
63 
64  _header = new SceneHeaderItem(_scene, this, "header_"+_label);
65  _header->setText(label);
67 
68  _controlOut = new SceneCtrlOutPortItem(_scene, this, "out");
70 
71  if (QtGuiContext::getQtCurrent()->isEdition())
73  else
77  _stateDef = "";
78  _isProc = dynamic_cast<SceneProcItem*>(_parent);
79  _isValid = true;
80  _isEdited = false;
81 }
SceneHeaderNodeItem::~SceneHeaderNodeItem ( )
virtual

Definition at line 83 of file SceneHeaderNodeItem.cxx.

84 {
85 }

Member Function Documentation

void SceneHeaderNodeItem::adaptComposedNode ( SceneItem port,
qreal  deltaY 
)
virtual

Definition at line 274 of file SceneHeaderNodeItem.cxx.

References YACS::HMI::AbstractSceneItem::_parent, and DEBTRACE.

Referenced by autoPosNewPort().

275 {
276  DEBTRACE("SceneHeaderNodeItem::adaptComposedNode " << deltaY);
277  QPointF oldPos(x(),y() - deltaY);
278  if (_parent)
279  {
280  if (SceneComposedNodeItem *bloc = dynamic_cast<SceneComposedNodeItem*>(_parent))
281  bloc->collisionResolv(port, oldPos);
282  //_parent->checkGeometryChange();
283  }
284 }
void SceneHeaderNodeItem::adjustGeometry ( )
virtual

Reimplemented from YACS::HMI::SceneHeaderItem.

Definition at line 237 of file SceneHeaderNodeItem.cxx.

References _header, YACS::HMI::AbstractSceneItem::_label, YACS::HMI::AbstractSceneItem::_parent, YACS::HMI::AbstractSceneItem::_width, YACS::HMI::SceneHeaderItem::adjustGeometry(), adjustPosPorts(), DEBTRACE, and YACS::HMI::AbstractSceneItem::getWidth().

Referenced by YACS::HMI::SceneNodeItem::adjustHeader().

238 {
239  DEBTRACE("SceneHeaderNodeItem::adjustGeometry() " << _label.toStdString());
240  prepareGeometryChange();
241  _width = _parent->getWidth();
243  adjustPosPorts();
244  update();
245 }
void SceneHeaderNodeItem::autoPosControl ( AbstractSceneItem item)
virtual

Definition at line 153 of file SceneHeaderNodeItem.cxx.

154 {
155 }
void SceneHeaderNodeItem::autoPosNewPort ( AbstractSceneItem item)
virtual

Definition at line 157 of file SceneHeaderNodeItem.cxx.

References _fatherNode, _inPorts, _maxPorts, _outPorts, YACS::HMI::AbstractSceneItem::_parent, adaptComposedNode(), YACS::HMI::Resource::Corner_Margin, YACS::HMI::Resource::DataPort_Height, YACS::HMI::Resource::DataPort_Width, DEBTRACE, YACS::HMI::AbstractSceneItem::getWidth(), YACS::HMI::SceneNodeItem::hasProgressBar(), YACS::HMI::Resource::Header_Height, YACS::HMI::Resource::progressBar_Height, YACS::HMI::AbstractSceneItem::setTopLeft(), and YACS::HMI::Resource::Space_Margin.

Referenced by YACS::HMI::SceneComposedNodeItem::update().

158 {
159  DEBTRACE("SceneHeaderNodeItem::autoPosNewPort");
160  SceneInPortItem* inPortItem = dynamic_cast<SceneInPortItem*>(item);
161 
162  int nbPorts;
163  qreal xLeft;
164  if (inPortItem) {
165  xLeft = Resource::Corner_Margin;
166  nbPorts = _inPorts.size();
167  _inPorts.push_back(inPortItem);
168  } else {
171  } else {
173  };
174  nbPorts = _outPorts.size();
175  _outPorts.push_back(dynamic_cast<SceneOutPortItem*>(item));
176  };
177  qreal yTop = Resource::Header_Height;
181  yTop += nbPorts * deltaY;
182  if (nbPorts >=_maxPorts) {
183  _maxPorts = nbPorts+1;
184  };
185  //DEBTRACE("left, top " << xLeft << " " << yTop);
186  QPointF topLeft(xLeft, yTop);
187  item->setTopLeft(topLeft);
188  adaptComposedNode(dynamic_cast<SceneItem*>(item), deltaY);
189 }
SceneCtrlPortItem * SceneHeaderNodeItem::getCtrlInPortItem ( )
virtual

Definition at line 358 of file SceneHeaderNodeItem.cxx.

References _controlIn.

Referenced by YACS::HMI::LinkMatrix::cellTo(), and YACS::HMI::SceneNodeItem::getCtrlInPortItem().

359 {
360  return _controlIn;
361 }
SceneCtrlPortItem * SceneHeaderNodeItem::getCtrlOutPortItem ( )
virtual

Definition at line 363 of file SceneHeaderNodeItem.cxx.

References _controlOut.

Referenced by YACS::HMI::LinkMatrix::cellFrom(), and YACS::HMI::SceneNodeItem::getCtrlOutPortItem().

364 {
365  return _controlOut;
366 }
QRectF SceneHeaderNodeItem::getMinimalBoundingRect ( ) const
virtual
QColor SceneHeaderNodeItem::getValidColor ( )

Definition at line 380 of file SceneHeaderNodeItem.cxx.

References _isValid, _sc, and YACS::HMI::Resource::invalidNodeColor.

Referenced by YACS::HMI::SceneCtrlPortItem::paint().

381 {
382  if (_isValid)
383  return _sc;
384  else
386 }
void SceneHeaderNodeItem::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Definition at line 375 of file SceneHeaderNodeItem.cxx.

376 {
377  event->ignore();
378 }
void SceneHeaderNodeItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

When Zooming, filter all mouse events to items: do not work, scene do not receive...

Reimplemented from YACS::HMI::SceneHeaderItem.

Definition at line 370 of file SceneHeaderNodeItem.cxx.

371 {
372  event->ignore();
373 }
void SceneHeaderNodeItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget widget 
)
virtual

Reimplemented from YACS::HMI::SceneHeaderItem.

Definition at line 87 of file SceneHeaderNodeItem.cxx.

References _fatherNode, YACS::HMI::AbstractSceneItem::_parent, gui.CONNECTOR::a, YACS::HMI::Resource::Border_Margin, YACS::HMI::Resource::Corner_Margin, YACS::HMI::Resource::CtrlPort_Height, YACS::HMI::Resource::CtrlPort_Width, YACS::HMI::Resource::DataPort_Width, DEBTRACE, YACS::HMI::SceneHeaderItem::getBrushColor(), YACS::HMI::SceneHeaderItem::getPenColor(), YACS::HMI::AbstractSceneItem::getWidth(), gui.graph::h(), YACS::HMI::SceneNodeItem::hasProgressBar(), YACS::HMI::Resource::Header_Height, YACS::HMI::SceneNodeItem::isExpanded(), YACS::HMI::Resource::Line_Space, YACS::HMI::Resource::Line_Width, YACS::HMI::Resource::progressBar_Height, YACS::HMI::Resource::Radius, YACS::HMI::Resource::Space_Margin, YACS::HMI::Resource::Thickness, and gui.logview::w.

90 {
91  //DEBTRACE("SceneHeaderNodeItem::paint");
92  painter->save();
93 
94  int x = Resource::Border_Margin + 1;
100  QPen pen(getPenColor());
101  pen.setWidth(Resource::Line_Width);
102  painter->setPen(pen);
103  painter->drawLine(x, y, w, y);
104 
107  w = w - 2*Resource::CtrlPort_Width - 3*Resource::Space_Margin - Resource::Corner_Margin;
109  pen.setWidth(Resource::Thickness);
110  painter->setPen(pen);
111 
112  bool expanded = (_fatherNode && _fatherNode->isExpanded());
113  QColor baseColor = getBrushColor();
114  if (expanded)
115  painter->setBrush(baseColor);
116  else
117  {
118  int h, s, v, a, h2;
119  baseColor.getHsv(&h, &s, &v, &a);
120  DEBTRACE("h="<<h<<" s="<<s<<" v="<<v);
121  h2 = h+60;
122  if (h>359) h2 = h2-359;
123  QLinearGradient gradient;
124  gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
125  gradient.setColorAt(0, baseColor.darker(200));
126  //gradient.setColorAt(1, baseColor.lighter(150));
127  //gradient.setColorAt(0, QColor::fromHsv(h-60, s, v, a));
128  gradient.setColorAt(1, QColor::fromHsv(h2, s, v, a));
129  QBrush brush(gradient);
130  painter->setBrush(brush);
131  }
132  painter->drawRoundedRect(QRect(x, y, w, h), Resource::Radius, Resource::Radius);
133 
134  painter->restore();
135 }
void SceneHeaderNodeItem::popupMenu ( QWidget caller,
const QPoint &  globalPos 
)
virtual

Reimplemented from YACS::HMI::SceneHeaderItem.

Definition at line 230 of file SceneHeaderNodeItem.cxx.

References YACS::HMI::AbstractSceneItem::_parent, and YACS::HMI::SceneItem::popupMenu().

231 {
232  if (_parent) _parent->popupMenu(caller, globalPos);
233 // HeaderNodeMenu m;
234 // m.popupMenu(caller, globalPos);
235 }
void SceneHeaderNodeItem::reorganizePorts ( shownState  ss)
virtual

Definition at line 191 of file SceneHeaderNodeItem.cxx.

References _fatherNode, _inPorts, YACS::HMI::AbstractSceneItem::_label, _outPorts, YACS::HMI::AbstractSceneItem::_parent, YACS::HMI::Resource::Corner_Margin, YACS::HMI::Resource::DataPort_Height, YACS::HMI::Resource::DataPort_Width, DEBTRACE, YACS::HMI::expandShown, YACS::HMI::AbstractSceneItem::getWidth(), YACS::HMI::SceneNodeItem::hasProgressBar(), YACS::HMI::Resource::Header_Height, YACS::HMI::Resource::progressBar_Height, YACS::HMI::shrinkHidden, and YACS::HMI::Resource::Space_Margin.

Referenced by adjustPosPorts().

192 {
193  DEBTRACE("SceneHeaderNodeItem::reorganizePorts() " << ss << " " << _label.toStdString());
194 
195  qreal yTop;
196  qreal href = Resource::Header_Height;
199  bool isShown = (ss != shrinkHidden);
200  if (!isShown) href = Resource::Corner_Margin;
201 
202  std::list<SceneInPortItem*>::iterator iti = _inPorts.begin();
203  int nbPorts = 0;
204  for (; iti != _inPorts.end(); ++iti)
205  {
206  yTop = href + nbPorts * (Resource::DataPort_Height + Resource::Space_Margin);
207  QPointF topLeft(Resource::Corner_Margin, yTop);
208  (*iti)->setTopLeft(topLeft);
209  if (isShown) nbPorts++; // otherwise (shrink from ancestor) put all ports at the same position
210  }
211 
212  std::list<SceneOutPortItem*>::iterator ito = _outPorts.begin();
213  nbPorts = 0;
214  qreal xLeft;
215  if (ss == expandShown) {
217  } else {
219  };
220  for (; ito != _outPorts.end(); ++ito)
221  {
222  yTop = href + nbPorts * (Resource::DataPort_Height + Resource::Space_Margin);
223  QPointF topLeft(xLeft, yTop);
224  (*ito)->setTopLeft(topLeft);
225  if (isShown) nbPorts++; // otherwise (shrink from ancestor) put all ports at the same position
226  }
227  //updateLinks();
228 }
void SceneHeaderNodeItem::setEdited ( bool  isEdited)
virtual
void SceneHeaderNodeItem::setExecState ( int  execState)
virtual

Definition at line 313 of file SceneHeaderNodeItem.cxx.

References _execState, _isProc, _isValid, YACS::HMI::AbstractSceneItem::_parent, _sc, _stateDef, YACS::ACTIVATED, YACS::HMI::Resource::ACTIVATED, DEBTRACE, YACS::HMI::Resource::DEFAULT, YACS::DESACTIVATED, YACS::HMI::Resource::DESACTIVATED, YACS::DISABLED, YACS::HMI::Resource::DISABLED, YACS::DONE, YACS::HMI::Resource::DONE, YACS::ERROR, YACS::HMI::Resource::ERROR, YACS::EXECFAILED, YACS::HMI::Resource::EXECFAILED, YACS::FAILED, YACS::HMI::Resource::FAILED, YACS::FINISHED, YACS::HMI::Resource::FINISHED, YACS::INITIALISED, YACS::HMI::Resource::INITIALISED, YACS::INTERNALERR, YACS::HMI::Resource::INTERNALERR, YACS::INVALID, YACS::HMI::Resource::INVALID, YACS::LOADED, YACS::HMI::Resource::LOADED, YACS::LOADFAILED, YACS::HMI::Resource::LOADFAILED, YACS::NOTYETINITIALIZED, YACS::HMI::Resource::NOTYETINITIALIZED, YACS::PAUSE, YACS::HMI::Resource::PAUSE, YACS::PAUSED, YACS::HMI::Resource::PAUSED, YACS::READY, YACS::HMI::Resource::READY, YACS::RUNNING, YACS::HMI::Resource::RUNNING, YACS::STOPPED, YACS::HMI::Resource::STOPPED, YACS::SUSPENDED, YACS::HMI::Resource::SUSPENDED, YACS::TOACTIVATE, YACS::HMI::Resource::TOACTIVATE, YACS::TOLOAD, YACS::HMI::Resource::TOLOAD, YACS::UNDEFINED, YACS::HMI::Resource::UNDEFINED, YACS::HMI::Resource::UNKNOWN, YACS::WAITINGTASKS, and YACS::HMI::Resource::WAITINGTASKS.

Referenced by YACS::HMI::SceneNodeItem::setExecState().

314 {
315  DEBTRACE("SceneHeaderNodeItem::setExecState " << execState);
316  _execState = execState;
317  if (!_isValid) return;
318  QColor oldsc = _sc;
319  if (_isProc)
320  switch (_execState)
321  {
322  case YACS::NOTYETINITIALIZED: _sc = Resource::NOTYETINITIALIZED; _stateDef = "Not Yet Initialized"; break;
323  case YACS::INITIALISED: _sc = Resource::INITIALISED ; _stateDef = "Initialized" ; break;
324  case YACS::RUNNING: _sc = Resource::RUNNING ; _stateDef = "Running" ; break;
325  case YACS::WAITINGTASKS: _sc = Resource::WAITINGTASKS ; _stateDef = "Waiting Tasks" ; break;
326  case YACS::PAUSED: _sc = Resource::PAUSED ; _stateDef = "Paused" ; break;
327  case YACS::FINISHED: _sc = Resource::FINISHED ; _stateDef = "Finished" ; break;
328  case YACS::STOPPED: _sc = Resource::STOPPED ; _stateDef = "Stopped" ; break;
329  default: _sc = Resource::UNKNOWN ; _stateDef = "Unknown Status" ;
330  }
331  else
332  switch (_execState)
333  {
334  case YACS::UNDEFINED: _sc = Resource::UNDEFINED ; _stateDef = "UNDEFINED" ; break;
335  case YACS::INVALID: _sc = Resource::INVALID ; _stateDef = "INVALID" ; break;
336  case YACS::READY: _sc = Resource::READY ; _stateDef = "READY" ; break;
337  case YACS::TOLOAD: _sc = Resource::TOLOAD ; _stateDef = "TOLOAD" ; break;
338  case YACS::LOADED: _sc = Resource::LOADED ; _stateDef = "LOADED" ; break;
339  case YACS::TOACTIVATE: _sc = Resource::TOACTIVATE ; _stateDef = "TOACTIVATE" ; break;
340  case YACS::ACTIVATED: _sc = Resource::ACTIVATED ; _stateDef = "ACTIVATED" ; break;
341  case YACS::DESACTIVATED: _sc = Resource::DESACTIVATED ; _stateDef = "DESACTIVATED" ; break;
342  case YACS::DONE: _sc = Resource::DONE ; _stateDef = "DONE" ; break;
343  case YACS::SUSPENDED: _sc = Resource::SUSPENDED ; _stateDef = "SUSPENDED" ; break;
344  case YACS::LOADFAILED: _sc = Resource::LOADFAILED ; _stateDef = "LOADFAILED" ; break;
345  case YACS::EXECFAILED: _sc = Resource::EXECFAILED ; _stateDef = "EXECFAILED" ; break;
346  case YACS::PAUSE: _sc = Resource::PAUSE ; _stateDef = "PAUSE" ; break;
347  case YACS::INTERNALERR: _sc = Resource::INTERNALERR ; _stateDef = "INTERNALERR" ; break;
348  case YACS::DISABLED: _sc = Resource::DISABLED ; _stateDef = "DISABLED" ; break;
349  case YACS::FAILED: _sc = Resource::FAILED ; _stateDef = "FAILED" ; break;
350  case YACS::ERROR: _sc = Resource::ERROR ; _stateDef = "ERROR" ; break;
351  default: _sc = Resource::DEFAULT ; _stateDef = "---" ;
352  }
353  DEBTRACE(" - stateDef = " << _stateDef.toStdString());
354  if(oldsc != _sc)
355  _parent->update();
356 }
void SceneHeaderNodeItem::setText ( QString  label)
virtual

Reimplemented from YACS::HMI::SceneHeaderItem.

Definition at line 137 of file SceneHeaderNodeItem.cxx.

References _header, and YACS::HMI::SceneHeaderItem::setText().

Referenced by YACS::HMI::SceneNodeItem::updateName().

138 {
139  if (_header) _header->setText(label);
140 }
void SceneHeaderNodeItem::setValid ( bool  isValid)
virtual

Definition at line 303 of file SceneHeaderNodeItem.cxx.

References _isValid, YACS::HMI::AbstractSceneItem::_parent, and DEBTRACE.

Referenced by YACS::HMI::SceneNodeItem::updateState().

304 {
305  DEBTRACE("SceneHeaderNodeItem::setValid " << isValid);
306  if (_isValid != isValid)
307  {
308  _isValid = isValid;
309  _parent->update();
310  }
311 }

Member Data Documentation

SceneCtrlPortItem* YACS::HMI::SceneHeaderNodeItem::_controlIn
protected

Definition at line 67 of file SceneHeaderNodeItem.hxx.

Referenced by getCtrlInPortItem(), and SceneHeaderNodeItem().

SceneCtrlPortItem* YACS::HMI::SceneHeaderNodeItem::_controlOut
protected

Definition at line 68 of file SceneHeaderNodeItem.hxx.

Referenced by adjustPosPorts(), getCtrlOutPortItem(), and SceneHeaderNodeItem().

int YACS::HMI::SceneHeaderNodeItem::_execState
protected

Definition at line 75 of file SceneHeaderNodeItem.hxx.

Referenced by SceneHeaderNodeItem(), and setExecState().

SceneNodeItem* YACS::HMI::SceneHeaderNodeItem::_fatherNode
protected
SceneHeaderItem* YACS::HMI::SceneHeaderNodeItem::_header
protected

Definition at line 66 of file SceneHeaderNodeItem.hxx.

Referenced by adjustGeometry(), SceneHeaderNodeItem(), and setText().

std::list<SceneInPortItem*> YACS::HMI::SceneHeaderNodeItem::_inPorts
protected

Definition at line 69 of file SceneHeaderNodeItem.hxx.

Referenced by autoPosNewPort(), getMinimalBoundingRect(), and reorganizePorts().

bool YACS::HMI::SceneHeaderNodeItem::_isEdited
protected

Definition at line 79 of file SceneHeaderNodeItem.hxx.

Referenced by SceneHeaderNodeItem(), and setEdited().

bool YACS::HMI::SceneHeaderNodeItem::_isProc
protected

Definition at line 76 of file SceneHeaderNodeItem.hxx.

Referenced by SceneHeaderNodeItem(), and setExecState().

bool YACS::HMI::SceneHeaderNodeItem::_isValid
protected

Definition at line 78 of file SceneHeaderNodeItem.hxx.

Referenced by getValidColor(), SceneHeaderNodeItem(), setExecState(), and setValid().

int YACS::HMI::SceneHeaderNodeItem::_maxPorts
protected

Definition at line 71 of file SceneHeaderNodeItem.hxx.

Referenced by autoPosNewPort(), getHeaderBottom(), and SceneHeaderNodeItem().

std::list<SceneOutPortItem*> YACS::HMI::SceneHeaderNodeItem::_outPorts
protected

Definition at line 70 of file SceneHeaderNodeItem.hxx.

Referenced by autoPosNewPort(), getMinimalBoundingRect(), and reorganizePorts().

QColor YACS::HMI::SceneHeaderNodeItem::_sc
protected

Definition at line 73 of file SceneHeaderNodeItem.hxx.

Referenced by getValidColor(), SceneHeaderNodeItem(), and setExecState().

QString YACS::HMI::SceneHeaderNodeItem::_stateDef
protected

Definition at line 74 of file SceneHeaderNodeItem.hxx.

Referenced by SceneHeaderNodeItem(), and setExecState().


The documentation for this class was generated from the following files: