Version: 8.3.0
YACS::HMI::SchemaLinkItem Class Reference

#include <SchemaLinkItem.hxx>

Inheritance diagram for YACS::HMI::SchemaLinkItem:
Collaboration diagram for YACS::HMI::SchemaLinkItem:

Public Member Functions

 SchemaLinkItem (SchemaItem *parent, QString label, Subject *subject)
 
virtual void update (GuiEvent event, int type, Subject *son)
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos)
 
- 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 Qt::ItemFlags flags (const QModelIndex &index)
 
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 bool dropMimeData (const QMimeData *data, Qt::DropAction action)
 
virtual void reparent (SchemaItem *parent)
 
virtual void setCaseValue ()
 used in node derived classes More...
 
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
 
- Protected Member Functions inherited from YACS::HMI::SchemaItem
virtual QVariant editionToolTip (int column) const
 
virtual QVariant runToolTip (int column) const
 
virtual QVariant runWhatsThis (int column) const
 
virtual QString getMimeFormat ()
 
virtual void setExecState (int execState)
 

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::SchemaItem
QList< SchemaItem * > _childItems
 
QList< QVariant > _itemData
 
QList< QVariant > _itemDeco
 
QList< QVariant > _itemForeground
 
QList< QVariant > _itemBackground
 
QList< QVariant > _itemCheckState
 
QList< QVariant > _itemToolTip
 
QList< QVariant > _itemWhatsThis
 
QString _label
 
SchemaItem_parentItem
 
Subject_subject
 
int _execState
 
bool _emphasized
 
- Static Protected Attributes inherited from YACS::HMI::GuiObserver
static std::map< int, std::string > _eventNameMap
 

Detailed Description

Definition at line 29 of file SchemaLinkItem.hxx.

Constructor & Destructor Documentation

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

Definition at line 32 of file SchemaLinkItem.cxx.

References YACS::HMI::SchemaItem::_itemDeco, YACS::HMI::CONTROLLINK, YACS::HMI::DATALINK, YACS::HMI::Subject::getType(), and YACS::HMI::YLabel.

33  : SchemaItem(parent, label, subject)
34 {
35  switch (subject->getType())
36  {
38  _itemDeco.replace(YLabel, QIcon("icons:control_link.png"));
39  break;
40  case YACS::HMI::DATALINK:
41  _itemDeco.replace(YLabel, QIcon("icons:data_link.png"));
42  if (SubjectLink *slink = dynamic_cast<SubjectLink*>(subject))
43  {
44  if (dynamic_cast<YACS::ENGINE::DataStreamPort*>(slink->getSubjectOutPort()->getPort()))
45  _itemDeco.replace(YLabel, QIcon("icons:stream_link.png"));
46  }
47  break;
48  default:
49  _itemDeco.replace(YLabel, QIcon("icons:new_link.png"));
50  }
51 }

Member Function Documentation

QVariant SchemaLinkItem::editionWhatsThis ( int  column) const
protectedvirtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 66 of file SchemaLinkItem.cxx.

67 {
68 return "<p>Links between ports or nodes under that block level appears in this folder.\n" \
69  "You can add data links (between ports) and control links (between nodes) " \
70  "by drag from origin (out node or out port) to destination (in node or in port) " \
71  "either in 2D graphic view or tree view. <a href=\"modification.html#create-a-link\">More...</a></p>";
72 }
void SchemaLinkItem::popupMenu ( QWidget caller,
const QPoint &  globalPos 
)
virtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 59 of file SchemaLinkItem.cxx.

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

60 {
61  LinkMenu m;
62  m.popupMenu(caller, globalPos);
63 }
void SchemaLinkItem::update ( GuiEvent  event,
int  type,
Subject son 
)
virtual

Reimplemented from YACS::HMI::SchemaItem.

Definition at line 53 of file SchemaLinkItem.cxx.

References DEBTRACE, and YACS::HMI::SchemaItem::update().

Referenced by gui.graph.MyCanvas::customEvent().

54 {
55  DEBTRACE("SchemaLinkItem::update");
56  SchemaItem::update(event, type, son);
57 }

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