diff options
Diffstat (limited to 'client/widgets/widget.cc')
-rw-r--r-- | client/widgets/widget.cc | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc index cd29d0a..e5ec498 100644 --- a/client/widgets/widget.cc +++ b/client/widgets/widget.cc @@ -55,14 +55,14 @@ Widget::Widget(QDomNode &node, MacroWindow *macrowindow) widget_local = elem.hasAttribute("local") && elem.attribute("local") == "true"; - + /* if(elem.hasAttribute("prefilled")) { prefilled = elem.attribute("prefilled"); } - - has_initial_value = elem.hasAttribute("name") && elem.hasAttribute("value"); + */ + has_lazy = elem.hasAttribute("name") && elem.hasAttribute("value"); lazy_value = elem.attribute("value", ""); - lazy_source = elem.attribute("prefilled", ""); + lazy_source = elem.attribute("prefilled", "pracro"); if((hasOnChangeEvent = elem.hasAttribute("onChange"))) { onChangeEventScript = elem.attribute("onChange"); @@ -116,6 +116,8 @@ bool Widget::valid() if(preValid() == false) return false; if(is_valid == false) return false; + if(hideChildren) return true; + QVector< Widget* >::iterator i = children.begin(); while(i != children.end()) { if(*i && (*i)->valid() == false) return false; @@ -131,24 +133,6 @@ void Widget::setValid(bool valid) setWdgValid(valid); } -void Widget::setInitialValue(QString value) -{ - if(!has_initial_value) { - initial_value = value; - has_initial_value = true; - } -} - -bool Widget::hasInitialValue() -{ - return has_initial_value; -} - -void Widget::reset() -{ - setValue(initial_value, ""); -} - void Widget::eventOnChange() { if(enabled() && hasOnChangeEvent) |