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)
InOut * inOut() const
InOut context object.
virtual void addConnection(Connection *_conn)
Add the connection.
virtual TypeWidget * widget(QMap< QString, QString >, QString, QWidget *=NULL)
Returns the configuration widget.
void contentChange()
handle content changes
const Element * element() const
Element of this input/output.
const QString & name() const
Name.
static QString getXmlString(QXmlQuery &_xml, QString _expr, QString _default="")
Gets the string of a xml query.
int id()
Unique id for identification.
ConnectionPoint * connectionPointItem() const
Connection point widget.
Type * getType(QString _type)
Get type object for given type name.
Text * descriptionTextItem() const
Short description widget.
static bool strToBool(QString _str)
Converts the given string to bool.
SceneElement * element()
Scene element.
Text * typeTextItem() const
Type text widget.
virtual void setBackgroundBrush(QBrush _brush)
Sets the background brush.
Context * context() const
Context of element.
virtual void removeConnection(Connection *_conn)
Remove the Connection.
QString name() const
Element name.
ElementOutput * output()
Output of this connection.
void setWidth(int _width)
Sets the diameter.
void setState(State _state)
sets the state
Element * element() const
Context VSI::Element.
GraphicsScene * graphicsScene()
Scene.
void setBackground(bool _leftOut, bool _rightOut)
Enables background painting.
QList< Connection * > connections() const
Connections.