#include <SchemaModel.hxx>
|
void | updateSelection (const QItemSelection &selected, const QItemSelection &deselected) |
|
|
| 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 |
|
| GuiObserver () |
|
virtual | ~GuiObserver () |
|
virtual void | select (bool isSelected) |
|
virtual void | incrementSubjects (Subject *subject) |
|
virtual void | decrementSubjects (Subject *subject) |
|
int | getNbSubjects () |
|
bool | isDestructible () |
|
Definition at line 49 of file SchemaModel.hxx.
SchemaModel::~SchemaModel |
( |
| ) |
|
|
virtual |
int SchemaModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
QVariant SchemaModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
bool SchemaModel::dropMimeData |
( |
const QMimeData * |
data, |
|
|
Qt::DropAction |
action, |
|
|
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent |
|
) |
| |
|
virtual |
const QBrush & SchemaModel::editedBackBrush |
( |
| ) |
|
const QBrush & SchemaModel::emphasizeBackBrush |
( |
| ) |
|
Qt::ItemFlags SchemaModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
virtual |
SchemaItem* YACS::HMI::SchemaModel::getRootItem |
( |
| ) |
|
|
inline |
QVariant SchemaModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
QModelIndex SchemaModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
virtual |
Definition at line 60 of file SchemaModel.cxx.
References _rootItem, and YACS::HMI::SchemaItem::child().
Referenced by YACS::HMI::EditionElementaryNode::createTablePorts(), dropMimeData(), mimeData(), YACS::HMI::SchemaItem::modelIndex(), YACS::HMI::EditionSwitch::synchronize(), YACS::HMI::EditionElementaryNode::synchronize(), and updateSelection().
63 if (!hasIndex(row, column,
parent))
75 return createIndex(row, column, childItem);
bool YACS::HMI::SchemaModel::isEdition |
( |
| ) |
|
|
inline |
QMimeData * SchemaModel::mimeData |
( |
const QModelIndexList & |
indexes | ) |
const |
|
virtual |
QStringList SchemaModel::mimeTypes |
( |
| ) |
const |
|
virtual |
Definition at line 309 of file SchemaModel.cxx.
313 types <<
"yacs/subject" <<
"yacs/subjectNode" <<
"yacs/subjectOutPort"
314 <<
"yacs/cataService" <<
"yacs/cataType" <<
"yacs/cataNode"
315 <<
"yacs/subjectOutGate";
QModelIndex SchemaModel::parent |
( |
const QModelIndex & |
index | ) |
const |
|
virtual |
int SchemaModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
bool SchemaModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
virtual |
For EditRole, setData only emit dataChanged signal, actual modification is done in SchemaItem.
Definition at line 162 of file SchemaModel.cxx.
References DEBTRACE, and YACS::HMI::SchemaItem::toggleState().
Referenced by YACS::HMI::SchemaComposedNodeItem::SchemaComposedNodeItem(), YACS::HMI::SchemaNodeItem::setCaseValue(), YACS::HMI::SchemaComposedNodeItem::setCaseValue(), YACS::HMI::ItemEdition::setEdited(), YACS::HMI::SchemaReferenceItem::update(), YACS::HMI::SchemaOutPortItem::update(), YACS::HMI::SchemaInPortItem::update(), YACS::HMI::SchemaNodeItem::update(), YACS::HMI::SchemaComposedNodeItem::update(), and YACS::HMI::SchemaItem::update().
165 if (
index.isValid() && role == Qt::EditRole)
167 DEBTRACE(
"Qt::EditRole, emit dataChanged");
171 if (
index.isValid() && role == Qt::CheckStateRole)
173 DEBTRACE(
"Qt::CheckStateRole, toggle state");
void SchemaModel::setEdition |
( |
bool |
isEdition = true | ) |
|
void YACS::HMI::SchemaModel::signalSelection |
( |
const QModelIndex & |
index | ) |
|
|
signal |
const QBrush & SchemaModel::stdBackBrush |
( |
| ) |
|
Qt::DropActions SchemaModel::supportedDropActions |
( |
| ) |
const |
|
virtual |
Definition at line 303 of file SchemaModel.cxx.
306 return Qt::CopyAction | Qt::MoveAction | Qt::LinkAction;
void SchemaModel::updateSelection |
( |
const QItemSelection & |
selected, |
|
|
const QItemSelection & |
deselected |
|
) |
| |
|
slot |
Subject* YACS::HMI::SchemaModel::_context |
|
protected |
QBrush YACS::HMI::SchemaModel::_editedBackBrush |
|
protected |
QBrush YACS::HMI::SchemaModel::_emphasizeBackBrush |
|
protected |
bool YACS::HMI::SchemaModel::_isEdition |
|
protected |
Subject* YACS::HMI::SchemaModel::_root |
|
protected |
QBrush YACS::HMI::SchemaModel::_stdBackBrush |
|
protected |
The documentation for this class was generated from the following files: