Version: 8.3.0
YACS::HMI::SchemaProcItem Class Reference

#include <SchemaProcItem.hxx>

Inheritance diagram for YACS::HMI::SchemaProcItem:
Collaboration diagram for YACS::HMI::SchemaProcItem:

Public Member Functions

 SchemaProcItem (SchemaItem *parent, QString label, Subject *subject)
 
virtual ~SchemaProcItem ()
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos)
 
- Public Member Functions inherited from YACS::HMI::SchemaComposedNodeItem
 SchemaComposedNodeItem (SchemaItem *parent, QString label, Subject *subject)
 
virtual ~SchemaComposedNodeItem ()
 
virtual void update (GuiEvent event, int type, Subject *son)
 
std::list< YACS::ENGINE::Node * > getDirectDescendants () const
 
virtual Qt::ItemFlags flags (const QModelIndex &index)
 
virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action)
 
virtual void setCaseValue ()
 used in node derived classes More...
 
- Public Member Functions inherited from YACS::HMI::SchemaItem
 SchemaItem (SchemaItem *parent, QString label, Subject *subject)
 
virtual ~SchemaItem ()
 
virtual void appendChild (SchemaItem *child)
 
virtual void removeChild (SchemaItem *child)
 
virtual void insertChild (int row, SchemaItem *child)
 
virtual SchemaItemchild (int row)
 
virtual int childCount () const
 
virtual int columnCount () const
 
virtual QVariant data (int column, int role) const
 
virtual int row () const
 
virtual SchemaItemparent ()
 
virtual SubjectgetSubject ()
 
virtual void select (bool isSelected)
 
virtual void toggleState ()
 
QModelIndex modelIndex (int column=0)
 
virtual ItemMimeDatamimeData (ItemMimeData *mime)
 
virtual void reparent (SchemaItem *parent)
 
bool isEmphasized ()
 
void setEmphasize (bool emphasize)
 
- 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 QVariant editionWhatsThis (int column) const
 
virtual void setExecState (int execState)
 
virtual QVariant editionToolTip (int column) const
 
virtual QVariant runToolTip (int column) const
 
- Protected Member Functions inherited from YACS::HMI::SchemaComposedNodeItem
virtual QString getMimeFormat ()
 
- Protected Member Functions inherited from YACS::HMI::SchemaItem
virtual QVariant runWhatsThis (int column) const
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::HMI::GuiObserver
static std::string eventName (GuiEvent event)
 
static void setEventMap ()
 
- Protected Attributes inherited from YACS::HMI::SchemaComposedNodeItem
SchemaDirTypesItem_dirTypesItem
 
SchemaDirContainersItem_dirContainersItem
 
SchemaDirLinksItem_dirLinksItem
 
- Static Protected Attributes inherited from YACS::HMI::GuiObserver
static std::map< int, std::string > _eventNameMap
 

Detailed Description

Definition at line 29 of file SchemaProcItem.hxx.

Constructor & Destructor Documentation

SchemaProcItem::SchemaProcItem ( SchemaItem parent,
QString  label,
Subject subject 
)

Definition at line 33 of file SchemaProcItem.cxx.

References DEBTRACE.

34  : SchemaComposedNodeItem(parent, label, subject)
35 {
36  DEBTRACE("SchemaProcItem::SchemaProcItem");
37 }
SchemaProcItem::~SchemaProcItem ( )
virtual

Definition at line 39 of file SchemaProcItem.cxx.

References DEBTRACE.

40 {
41  DEBTRACE("SchemaProcItem::~SchemaProcItem");
42 }

Member Function Documentation

QVariant SchemaProcItem::editionToolTip ( int  column) const
protectedvirtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 72 of file SchemaProcItem.cxx.

References YACS::HMI::SchemaItem::_itemData, YACS::HMI::QtGuiContext::getFileName(), and YACS::HMI::QtGuiContext::getQtCurrent().

73 {
74  QString val = QString("Edition: ") + _itemData.value(0).toString();
75  QString val1 = _itemData.value(2).toString();
76  QString val2 = QtGuiContext::getQtCurrent()->getFileName();
77  if (!val1.isEmpty()) val += QString(" | ") + val1;
78  if (!val2.isEmpty()) val += QString(" | ") + val2;
79  return val;
80 }
QVariant SchemaProcItem::editionWhatsThis ( int  column) const
protectedvirtual

Reimplemented from YACS::HMI::SchemaComposedNodeItem.

Definition at line 92 of file SchemaProcItem.cxx.

93 {
94  return "<p>To edit the schema properties, select the schema and use the input panel. <a href=\"modification.html#property-page-for-schema\">More...</a></p>";
95 }
void SchemaProcItem::popupMenu ( QWidget caller,
const QPoint &  globalPos 
)
virtual

Reimplemented from YACS::HMI::SchemaComposedNodeItem.

Definition at line 44 of file SchemaProcItem.cxx.

References gui.GraphViewer::m, and YACS::HMI::ProcMenu::popupMenu().

45 {
46  ProcMenu m;
47  m.popupMenu(caller, globalPos);
48 }
QVariant SchemaProcItem::runToolTip ( int  column) const
protectedvirtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 82 of file SchemaProcItem.cxx.

References YACS::HMI::SchemaItem::_itemData, YACS::HMI::QtGuiContext::getFileName(), and YACS::HMI::QtGuiContext::getQtCurrent().

83 {
84  QString val = QString("Execution: ") + _itemData.value(0).toString();
85  QString val1 = _itemData.value(2).toString();
86  QString val2 = QtGuiContext::getQtCurrent()->getFileName();
87  if (!val1.isEmpty()) val += QString(" | ") + val1;
88  if (!val2.isEmpty()) val += QString(" | ") + val2;
89  return val;
90 }
void SchemaProcItem::setExecState ( int  execState)
protectedvirtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 50 of file SchemaProcItem.cxx.

References YACS::HMI::SchemaItem::_execState, YACS::HMI::SchemaItem::_itemBackground, YACS::HMI::SchemaItem::_itemData, YACS::HMI::SchemaItem::_itemForeground, DEBTRACE, YACS::FINISHED, YACS::HMI::Resource::FINISHED, YACS::INITIALISED, YACS::HMI::Resource::INITIALISED, YACS::NOTYETINITIALIZED, YACS::HMI::Resource::NOTYETINITIALIZED, YACS::PAUSED, YACS::HMI::Resource::PAUSED, YACS::RUNNING, YACS::HMI::Resource::RUNNING, YACS::STOPPED, YACS::HMI::Resource::STOPPED, YACS::HMI::Resource::UNKNOWN, YACS::WAITINGTASKS, YACS::HMI::Resource::WAITINGTASKS, and YACS::HMI::YState.

51 {
52  DEBTRACE("SchemaProcItem::setExecState " << execState);
53  _execState = execState;
54  QString stateDef;
55  QColor sc;
56  switch (_execState)
57  {
58  case YACS::NOTYETINITIALIZED: sc = YACS::HMI::Resource::NOTYETINITIALIZED; stateDef = "Not Yet Initialized"; break;
59  case YACS::INITIALISED: sc = YACS::HMI::Resource::INITIALISED ; stateDef = "Initialized"; break;
60  case YACS::RUNNING: sc = YACS::HMI::Resource::RUNNING ; stateDef = "Running"; break;
61  case YACS::WAITINGTASKS: sc = YACS::HMI::Resource::WAITINGTASKS ; stateDef = "Waiting Tasks"; break;
62  case YACS::PAUSED: sc = YACS::HMI::Resource::PAUSED ; stateDef = "Paused"; break;
63  case YACS::FINISHED: sc = YACS::HMI::Resource::FINISHED ; stateDef = "Finished"; break;
64  case YACS::STOPPED: sc = YACS::HMI::Resource::STOPPED ; stateDef = "Stopped"; break;
65  default: sc = YACS::HMI::Resource::UNKNOWN ; stateDef = "Unknown Status";
66  }
67  _itemData.replace(YState, stateDef);
68  _itemForeground.replace(YState, QColor(Qt::darkBlue));
69  _itemBackground.replace(YState, sc);
70 }

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