121 DEBTRACE(
"SchemaInPortItem::update");
123 QModelIndex index = QModelIndex();
231 Qt::ItemFlags pflag = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDropEnabled;
233 Qt::ItemFlags flagEdit = 0;
234 int column = index.column();
244 flagEdit = Qt::ItemIsEditable;
249 flagEdit = Qt::ItemIsEditable;
251 return pflag | flagEdit;
256 DEBTRACE(
"SchemaInPortItem::dropMimeData");
257 if (!
data)
return false;
259 if (!myData)
return false;
260 if(!myData->hasFormat(
"yacs/subjectOutPort"))
return false;
262 if (!to)
return false;
264 if (!toport)
return false;
291 m.popupMenu(caller, globalPos);
298 answer =
"Edition, DataStream input port ";
300 answer =
"Edition, DataFlow input port ";
305 answer +=
_itemData.value(column).toString();
306 answer +=
"\nInput port is edited in the input panel of the node.\n" \
307 "Select the node to get access to it's input panel.";
311 answer +=
_itemData.value(column).toString();
312 answer +=
"\nInput port is edited in the input panel of the node.\n" \
313 "Select the node to get access to it's input panel.\n" \
314 "Type is not modifiable, you must delete and recreate the port. Existing links will be lost.";
318 answer +=
_itemData.value(column).toString();
319 answer +=
"\nInput port is edited in the input panel of the node.\n" \
320 "Select the node to get access to it's input panel.\n";
322 answer +=
"DataStream ports have no editable value, they must be linked to an output DataStream port.";
325 answer +=
"DataFlow ports must be either manually initialized or linked to an output DataFlow port. ";
326 answer +=
"If the port is manually initialized and linked, the value from the link will prevail ";
327 answer +=
"if it is available when the node is executed.";
Class for data parameters specification.
virtual std::string getAsString()
returns port value as a string that can be used in a GUI for example
TypeCode * edGetType() const
virtual int edGetNumberOfLinks() const
Returns number of physical backlinks NOT number of user backlinks.
Class for calculation node (script) inlined (and executed) in the schema.
Base class for all nodes.
virtual const char * name() const
virtual bool getControl() const
virtual Subject * getSubject(int i=0) const
static TypeOfElem getTypeOfPort(YACS::ENGINE::DataPort *port)
static TypeOfElem getTypeOfNode(YACS::ENGINE::Node *node)
YACS::HMI::SchemaModel * getSchemaModel()
static QtGuiContext * getQtCurrent()
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action)
virtual Qt::ItemFlags flags(const QModelIndex &index)
virtual void update(GuiEvent event, int type, Subject *son)
virtual QVariant editionWhatsThis(int column) const
virtual void popupMenu(QWidget *caller, const QPoint &globalPos)
virtual Subject * getSubject()
QModelIndex modelIndex(int column=0)
QList< QVariant > _itemDeco
virtual SchemaItem * parent()
virtual void update(GuiEvent event, int type, Subject *son)
virtual QVariant data(int column, int role) const
QList< QVariant > _itemForeground
QList< QVariant > _itemData
virtual bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
std::string getExecValue()
static bool tryCreateLink(SubjectDataPort *subOutport, SubjectDataPort *subInport, bool control=true)
virtual YACS::ENGINE::DataPort * getPort()