#include <SchemaModel.hxx>


Public Slots | |
| void | updateSelection (const QItemSelection &selected, const QItemSelection &deselected) |
Signals | |
| void | signalSelection (const QModelIndex &index) |
Public Member Functions | |
| SchemaModel (YACS::HMI::Subject *context, QObject *parent=0) | |
| virtual | ~SchemaModel () |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| virtual void | update (GuiEvent event, int type, Subject *son) |
| SchemaItem * | getRootItem () |
| bool | isEdition () |
| void | setEdition (bool isEdition=true) |
| const QBrush & | stdBackBrush () |
| const QBrush & | editedBackBrush () |
| const QBrush & | emphasizeBackBrush () |
| virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
| virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
| virtual Qt::DropActions | supportedDropActions () const |
| virtual QStringList | mimeTypes () const |
Public Member Functions inherited from YACS::HMI::GuiObserver | |
| GuiObserver () | |
| virtual | ~GuiObserver () |
| virtual void | select (bool isSelected) |
| virtual void | incrementSubjects (Subject *subject) |
| virtual void | decrementSubjects (Subject *subject) |
| int | getNbSubjects () |
| bool | isDestructible () |
Protected Member Functions | |
| void | setNewRoot (YACS::HMI::Subject *root) |
Protected Attributes | |
| Subject * | _context |
| Subject * | _root |
| SchemaItem * | _rootItem |
| QBrush | _stdBackBrush |
| QBrush | _editedBackBrush |
| QBrush | _emphasizeBackBrush |
| bool | _isEdition |
Protected Attributes inherited from YACS::HMI::GuiObserver | |
| std::set< Subject * > | _subjectSet |
| bool | _destructible |
Friends | |
| class | SchemaItem |
| class | SchemaNodeItem |
| class | SchemaComposedNodeItem |
| class | SchemaDirTypesItem |
| class | SchemaDirLinksItem |
| class | SchemaDirContainersItem |
| class | SchemaContainerItem |
| class | SchemaComponentItem |
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 49 of file SchemaModel.hxx.
| SchemaModel::SchemaModel | ( | YACS::HMI::Subject * | context, |
| QObject * | parent = 0 |
||
| ) |
Definition at line 39 of file SchemaModel.cxx.
References _context, _editedBackBrush, _emphasizeBackBrush, _isEdition, _root, _rootItem, _stdBackBrush, YACS::HMI::Subject::attach(), and DEBTRACE.
|
virtual |
Definition at line 54 of file SchemaModel.cxx.
References YACS::HMI::GuiObserver::_subjectSet, and DEBTRACE.
|
virtual |
Definition at line 107 of file SchemaModel.cxx.
References _isEdition, _rootItem, and parent().
|
virtual |
Definition at line 121 of file SchemaModel.cxx.
References YACS::HMI::SchemaItem::data(), and index().
Referenced by dropMimeData().
|
virtual |
Definition at line 274 of file SchemaModel.cxx.
References data(), DEBTRACE, YACS::HMI::SchemaItem::dropMimeData(), YACS::HMI::Subject::getName(), YACS::HMI::SchemaItem::getSubject(), index(), and parent().
| const QBrush & SchemaModel::editedBackBrush | ( | ) |
Definition at line 240 of file SchemaModel.cxx.
References _editedBackBrush.
Referenced by YACS::HMI::SchemaItem::update().
| const QBrush & SchemaModel::emphasizeBackBrush | ( | ) |
Definition at line 245 of file SchemaModel.cxx.
References _emphasizeBackBrush.
Referenced by YACS::HMI::SchemaItem::update().
|
virtual |
Definition at line 182 of file SchemaModel.cxx.
References YACS::HMI::SchemaItem::flags(), and index().
|
inline |
Definition at line 78 of file SchemaModel.hxx.
References _rootItem.
Referenced by YACS::HMI::SchemaItem::modelIndex().
|
virtual |
Definition at line 130 of file SchemaModel.cxx.
References _isEdition, YACS::HMI::YLabel, YACS::HMI::YState, YACS::HMI::YType, and YACS::HMI::YValue.
|
virtual |
Definition at line 60 of file SchemaModel.cxx.
References _rootItem, YACS::HMI::SchemaItem::child(), and parent().
Referenced by YACS::HMI::EditionElementaryNode::createTablePorts(), data(), dropMimeData(), flags(), mimeData(), YACS::HMI::SchemaItem::modelIndex(), parent(), setData(), YACS::HMI::EditionElementaryNode::synchronize(), YACS::HMI::EditionSwitch::synchronize(), and updateSelection().
|
inline |
Definition at line 79 of file SchemaModel.hxx.
References _isEdition.
Referenced by YACS::HMI::SchemaComposedNodeItem::SchemaComposedNodeItem(), YACS::HMI::SchemaNodeItem::SchemaNodeItem(), and setEdition().
|
virtual |
Definition at line 258 of file SchemaModel.cxx.
References _root, DEBTRACE, index(), YACS::HMI::SchemaItem::mimeData(), and YACS::HMI::ItemMimeData::setSubject().
|
virtual |
Definition at line 309 of file SchemaModel.cxx.
|
virtual |
Definition at line 80 of file SchemaModel.cxx.
References _rootItem, index(), YACS::HMI::SchemaItem::parent(), and YACS::HMI::SchemaItem::row().
Referenced by columnCount(), dropMimeData(), index(), rowCount(), and gui.Appli.Runner::run().
|
virtual |
Definition at line 92 of file SchemaModel.cxx.
References _rootItem, YACS::HMI::SchemaItem::childCount(), and parent().
Referenced by YACS::HMI::EditionElementaryNode::synchronize(), and YACS::HMI::EditionSwitch::synchronize().
|
virtual |
For EditRole, setData only emit dataChanged signal, actual modification is done in SchemaItem.
Definition at line 162 of file SchemaModel.cxx.
References DEBTRACE, index(), and YACS::HMI::SchemaItem::toggleState().
Referenced by YACS::HMI::SchemaComposedNodeItem::SchemaComposedNodeItem(), YACS::HMI::SchemaComposedNodeItem::setCaseValue(), YACS::HMI::SchemaNodeItem::setCaseValue(), YACS::HMI::ItemEdition::setEdited(), YACS::HMI::SchemaComposedNodeItem::update(), YACS::HMI::SchemaInPortItem::update(), YACS::HMI::SchemaItem::update(), YACS::HMI::SchemaNodeItem::update(), YACS::HMI::SchemaOutPortItem::update(), and YACS::HMI::SchemaReferenceItem::update().
| void SchemaModel::setEdition | ( | bool | isEdition = true | ) |
Definition at line 230 of file SchemaModel.cxx.
References _isEdition, and isEdition().
Referenced by YACS::HMI::GenericGui::createContext().
|
protected |
Definition at line 250 of file SchemaModel.cxx.
References _root, _rootItem, YACS::HMI::Subject::getName(), YACS::HMI::QtGuiContext::getQtCurrent(), and SchemaItem.
Referenced by update().
|
signal |
Referenced by updateSelection().
| const QBrush & SchemaModel::stdBackBrush | ( | ) |
Definition at line 235 of file SchemaModel.cxx.
References _stdBackBrush.
Referenced by YACS::HMI::SchemaItem::update().
|
virtual |
Definition at line 303 of file SchemaModel.cxx.
Reimplemented from YACS::HMI::GuiObserver.
Definition at line 192 of file SchemaModel.cxx.
References DEBTRACE, YACS::HMI::GuiObserver::eventName(), YACS::HMI::NEWROOT, and setNewRoot().
Referenced by gui.graph.MyCanvas::customEvent().
|
slot |
Definition at line 205 of file SchemaModel.cxx.
References DEBTRACE, YACS::HMI::Subject::getName(), YACS::HMI::SchemaItem::getSubject(), index(), YACS::HMI::Subject::select(), and signalSelection().
|
friend |
Definition at line 60 of file SchemaModel.hxx.
|
friend |
Definition at line 55 of file SchemaModel.hxx.
|
friend |
Definition at line 59 of file SchemaModel.hxx.
|
friend |
Definition at line 58 of file SchemaModel.hxx.
|
friend |
Definition at line 57 of file SchemaModel.hxx.
|
friend |
Definition at line 56 of file SchemaModel.hxx.
|
friend |
Definition at line 53 of file SchemaModel.hxx.
Referenced by setNewRoot().
|
friend |
Definition at line 54 of file SchemaModel.hxx.
|
protected |
Definition at line 101 of file SchemaModel.hxx.
Referenced by SchemaModel().
|
protected |
Definition at line 106 of file SchemaModel.hxx.
Referenced by editedBackBrush(), and SchemaModel().
|
protected |
Definition at line 107 of file SchemaModel.hxx.
Referenced by emphasizeBackBrush(), and SchemaModel().
|
protected |
Definition at line 108 of file SchemaModel.hxx.
Referenced by columnCount(), headerData(), isEdition(), SchemaModel(), and setEdition().
|
protected |
Definition at line 102 of file SchemaModel.hxx.
Referenced by mimeData(), SchemaModel(), and setNewRoot().
|
protected |
Definition at line 103 of file SchemaModel.hxx.
Referenced by columnCount(), getRootItem(), index(), parent(), rowCount(), SchemaModel(), and setNewRoot().
|
protected |
Definition at line 105 of file SchemaModel.hxx.
Referenced by SchemaModel(), and stdBackBrush().