45#include "elementInput.hh"
46#include "elementOutput.hh"
47#include "sceneElement.hh"
48#include "connectionPoint.hh"
49#include "connection.hh"
50#include "graphicsScene.hh"
52#include "../parser/element.hh"
53#include "../parser/context.hh"
54#include "../parser/type.hh"
55#include "../parser/typeWidget.hh"
74 if (
state () & Input::Optional)
76 else if (
state () & Input::NoUserInput)
119 if (
isSet () || !(
state () & Input::NoRuntimeUserInput) ||
state () & Input::Optional)
130 return in_->state ();
156 else if (
state () & Input::Optional && !forceAsk_)
160 else if (
state () & Input::NoUserInput)
183 else if (
state () & Input::Optional && !forceAsk_)
187 else if (
state () & Input::NoUserInput)
202 if ((
state () & Input::NoRuntimeUserInput) && (
state () & Input::NoExternalInput))
214 QDomElement main = _doc.createElement(
"input");
215 _root.appendChild(main);
216 main.setAttribute (
"name",in_->
name ());
219 QDomElement
set = _doc.createElement(
"is_set");
220 main.appendChild(
set);
221 t = _doc.createTextNode(isSet_ ?
"true" :
"false");
224 if (
state () & Input::Optional && forceAsk_)
226 QDomElement fA = _doc.createElement(
"force_ask");
227 main.appendChild(fA);
228 t = _doc.createTextNode(isSet_ ?
"true" :
"false");
234 QDomElement val = _doc.createElement(
"value");
235 main.appendChild(val);
236 t = _doc.createTextNode(value_);
242 QDomElement conn = _doc.createElement(
"connection");
243 main.appendChild(conn);
245 conn.setAttribute (
"element_id",QString::number (c->
output ()->
element ()->
id ()));
261 if (
state () & Input::Optional)
274 else if (
state () & Input::Optional && !forceAsk_)
278 else if (
state () & Input::NoUserInput)
292 if (value_ != _value)
void setWidth(int _width)
Sets the diameter.
void setState(State _state)
sets the state
ElementOutput * output()
Output of this connection.
static bool strToBool(const QString &_str)
Converts the given string to bool.
static QString getXmlString(QDomElement &_element, const QString &_tag, QString _default="")
Gets the string of a xml query.
Type * getType(const QString &_type)
Get type object for given type name.
Text * descriptionTextItem() const
Short description widget.
Text * typeTextItem() const
Type text widget.
InOut * inOut() const
InOut context object.
QList< Connection * > connections() const
Connections.
SceneElement * element()
Scene element.
ConnectionPoint * connectionPointItem() const
Connection point widget.
virtual void removeConnection(Connection *_conn)
Remove the Connection.
virtual void addConnection(Connection *_conn)
Add the connection.
QString name() const
Element name.
Context * context() const
Context of element.
void contentChange()
handle content changes
const Element * element() const
Element of this input/output.
const QString & name() const
Name.
GraphicsScene * graphicsScene()
Scene.
Element * element() const
Context VSI::Element.
int id()
Unique id for identification.
virtual void setBackgroundBrush(QBrush _brush)
Sets the background brush.
void setBackground(bool _leftOut, bool _rightOut)
Enables background painting.
virtual TypeWidget * widget(QMap< QString, QString >, const QString &, QWidget *=NULL)
Returns the configuration widget.