diff options
Diffstat (limited to 'client/widgets')
| -rw-r--r-- | client/widgets/widget.cc | 10 | ||||
| -rw-r--r-- | client/widgets/widget.h | 3 | 
2 files changed, 13 insertions, 0 deletions
| diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index 14d8c34..5899839 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -41,6 +41,10 @@ Widget::Widget(QDomNode &node, MacroWindow *macrowindow)               elem.tagName().toStdString().c_str());    } +  if(elem.hasAttribute("prefilled")) { +    prefilled = elem.attribute("prefilled"); +  } +    if(elem.hasAttribute("script")) {      luaprogram = elem.attribute("script");      hasluaprogram = true; @@ -96,6 +100,12 @@ void Widget::setInitialValue(QString value)    }  } +bool Widget::hasInitialValue() +{ +  return has_initial_value; +} + +  void Widget::reset()  {    setValue(initial_value); diff --git a/client/widgets/widget.h b/client/widgets/widget.h index 2977e3a..bd84705 100644 --- a/client/widgets/widget.h +++ b/client/widgets/widget.h @@ -65,6 +65,7 @@ public:    virtual bool setKeyboardFocus() { return false; }    void setInitialValue(QString value); +  bool hasInitialValue();    virtual void reset();  protected: @@ -85,6 +86,8 @@ private:    QString initial_value;    bool has_initial_value; + +  QString prefilled;  };  #endif/*__PRACRO_WIDGET_H__*/ | 
