#include <SchemaDirContainersItem.hxx>
Public Member Functions | |
SchemaDirContainersItem (SchemaItem *parent, QString label, Subject *subject) | |
void | addContainerItem (Subject *subject) |
void | addComponentItem (Subject *subject) |
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 SchemaItem * | child (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 SchemaItem * | parent () |
virtual Subject * | getSubject () |
virtual void | update (GuiEvent event, int type, Subject *son) |
virtual void | select (bool isSelected) |
virtual void | toggleState () |
QModelIndex | modelIndex (int column=0) |
virtual ItemMimeData * | mimeData (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) |
Protected Attributes | |
std::map< std::string, SchemaContainerItem * > | _schemaContItemMap |
std::multimap< std::string, Subject * > | _waitingCompItemMap |
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 |
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 () |
Static Protected Attributes inherited from YACS::HMI::GuiObserver | |
static std::map< int, std::string > | _eventNameMap |
Definition at line 31 of file SchemaDirContainersItem.hxx.
SchemaDirContainersItem::SchemaDirContainersItem | ( | SchemaItem * | parent, |
QString | label, | ||
Subject * | subject | ||
) |
Definition at line 38 of file SchemaDirContainersItem.cxx.
References YACS::HMI::SchemaItem::_itemDeco, _schemaContItemMap, _waitingCompItemMap, and YACS::HMI::YLabel.
void SchemaDirContainersItem::addComponentItem | ( | Subject * | subject | ) |
If a component is not associated to a container, it will be associated to a default container. If this default container does not exist, it is created. When loading a schema, container must be created before component:
Definition at line 78 of file SchemaDirContainersItem.cxx.
References _schemaContItemMap, YACS::HMI::SubjectProc::addContainer(), YACS::HMI::SubjectComponent::associateToContainer(), DEBTRACE, YACS::HMI::SubjectComponent::getComponent(), YACS::ENGINE::ComponentInstance::getContainer(), YACS::ENGINE::Container::getName(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::GuiContext::getSubjectProc(), and YASSERT.
Referenced by YACS::HMI::SchemaComposedNodeItem::update().
void SchemaDirContainersItem::addContainerItem | ( | Subject * | subject | ) |
When loading a schema, a container may appear after a component using this container. After creating the SchemaContainerItem, check if there are SchemaComponentItems to to create as children of this SchemaContainerItem
Definition at line 58 of file SchemaDirContainersItem.cxx.
References _schemaContItemMap, YACS::HMI::SchemaItem::childCount(), DEBTRACE, YACS::HMI::Subject::getName(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::getSchemaModel(), and YACS::HMI::SchemaItem::modelIndex().
Referenced by YACS::HMI::SchemaComposedNodeItem::update().
|
protectedvirtual |
Reimplemented from YACS::HMI::SchemaItem.
Definition at line 104 of file SchemaDirContainersItem.cxx.
|
virtual |
Reimplemented from YACS::HMI::SchemaItem.
Definition at line 46 of file SchemaDirContainersItem.cxx.
References gui.GraphViewer::m, and YACS::HMI::ContainerDirMenu::popupMenu().
|
protected |
Definition at line 40 of file SchemaDirContainersItem.hxx.
Referenced by addComponentItem(), addContainerItem(), and SchemaDirContainersItem().
|
protected |
Definition at line 41 of file SchemaDirContainersItem.hxx.
Referenced by SchemaDirContainersItem().