42 using namespace YACS::ENGINE;
43 using namespace YACS::HMI;
48 DEBTRACE(
"SchemaNodeItem::SchemaNodeItem");
61 DEBTRACE(
"SchemaNodeItem::~SchemaNodeItem");
80 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
84 model->endInsertRows();
91 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
95 model->endInsertRows();
109 Node* node = snode->getNode();
114 model->beginRemoveRows(
modelIndex(), 0, nbChildren-1);
115 for (
int i = nbChildren;
i >= 0;
i--)
117 model->endRemoveRows();
120 int nbIn = plisti.size();
123 model->beginInsertRows(
modelIndex(), 0, nbIn-1);
124 list<InputPort*>::iterator iti = plisti.begin();
125 for(; iti != plisti.end(); iti++)
131 model->endInsertRows();
135 int nbOut = plisto.size();
138 model->beginInsertRows(
modelIndex(), nbIn, nbIn + nbOut -1);
139 list<OutputPort*>::iterator ito = plisto.begin();
140 for(; ito != plisto.end(); ito++)
146 model->endInsertRows();
187 Qt::ItemFlags pflag = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsDropEnabled;
192 pflag = pflag | Qt::ItemIsDragEnabled;
193 Qt::ItemFlags flagEdit = 0;
194 int column = index.column();
198 flagEdit = Qt::ItemIsEditable;
202 return pflag | flagEdit;
211 if (QApplication::mouseButtons() == Qt::MidButton)
212 return "yacs/subjectNode";
214 return "yacs/subjectOutGate";
219 DEBTRACE(
"SchemaNodeItem::toggleState");
239 DEBTRACE(
"SchemaNodeItem::dropMimeData");
240 if (!data)
return false;
242 if (!myData)
return false;
243 if(!myData->hasFormat(
"yacs/subjectOutGate"))
return false;
246 if (!subFrom)
return false;
250 if (!to)
return false;
264 DEBTRACE(
"SchemaNodeItem::setCaseValue");
267 if (!sSwitch)
return;
275 if (rank == Switch::ID_FOR_DEFAULT_NODE)
284 return "<p>To edit the node properties, select the node and use the input panel. <a href=\"modification.html#property-page-for-node\">More...</a></p>";