57 using namespace YACS::ENGINE;
58 using namespace YACS::HMI;
60 SchemaComposedNodeItem::SchemaComposedNodeItem(
SchemaItem *parent, QString label,
Subject* subject)
63 DEBTRACE(
"SchemaComposedNodeItem::SchemaComposedNodeItem");
88 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
89 if (
SubjectProc* sProc = dynamic_cast<SubjectProc*>(subject))
98 model->endInsertRows();
118 DEBTRACE(
"SchemaComposedNodeItem::~SchemaComposedNodeItem");
123 DEBTRACE(
"SchemaComposedNodeItem::update "<<
eventName(event)<<
" "<<type<<
" "<<son);
142 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
146 model->endInsertRows();
162 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
166 model->endInsertRows();
173 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
177 model->endInsertRows();
184 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
188 model->endInsertRows();
296 int position = toMove->
row();
297 model->beginRemoveRows(
modelIndex(), position, position);
299 model->endRemoveRows();
306 model->beginInsertRows(
modelIndex(), nbsons, nbsons);
308 model->endInsertRows();
335 Qt::ItemFlags pflag = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
339 Qt::ItemFlags flagEdit = 0;
340 int column = index.column();
344 flagEdit = Qt::ItemIsEditable;
348 return pflag | flagEdit;
358 DEBTRACE(
"SchemaComposedNodeItem::dropMimeData");
359 if (!data)
return false;
361 if (!myData)
return false;
363 if (myData->hasFormat(
"yacs/cataService") || myData->hasFormat(
"yacs/cataNode"))
374 else if(myData->hasFormat(
"yacs/subjectNode"))
378 if (!sub)
return false;
380 if (!node)
return false;
386 else if(myData->hasFormat(
"yacs/subjectOutGate"))
389 if (!subFrom)
return false;
393 if (!to)
return false;
412 if (QApplication::mouseButtons() == Qt::MidButton)
413 return "yacs/subjectNode";
415 return "yacs/subjectOutGate";
420 DEBTRACE(
"SchemaComposedNodeItem::setCaseValue");
423 if (!sSwitch)
return;
431 if (rank == Switch::ID_FOR_DEFAULT_NODE)
440 return "<p>To edit the node properties, select the node and use the input panel. <a href=\"modification.html#property-page-for-block-node\">More...</a></p>";