From fe81dbb0a0dfc9c3808df9576dfe9a8f0b7520be Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 2 Jul 2008 09:42:38 +0000 Subject: Made all setValue calls in a second pass, to the construction of the widgets. --- client/widgets/checkbox.cc | 2 ++ client/widgets/combobox.cc | 5 ++--- client/widgets/lineedit.cc | 2 ++ client/widgets/listbox.cc | 4 +++- client/widgets/multilist.cc | 2 ++ client/widgets/radiobuttons.cc | 2 ++ client/widgets/textedit.cc | 2 ++ client/widgets/window.cc | 5 ----- client/widgets/window.h | 4 ---- 9 files changed, 15 insertions(+), 13 deletions(-) (limited to 'client/widgets') diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc index 8474e58..95f5a53 100644 --- a/client/widgets/checkbox.cc +++ b/client/widgets/checkbox.cc @@ -47,11 +47,13 @@ CheckBox::CheckBox(QDomNode &node, MacroWindow *macrowindow) connect(this, SIGNAL(stateChanged(int)), this, SLOT(state_change())); + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } else { setValue("false"); } + */ } QString CheckBox::getValue() diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index 3856bed..d6d6483 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -67,12 +67,11 @@ ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow) } } + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } - - - // addItems(itemlist); + */ types_t combotype = SELECT; if(elem.hasAttribute("type")) { diff --git a/client/widgets/lineedit.cc b/client/widgets/lineedit.cc index 8694889..69073ce 100644 --- a/client/widgets/lineedit.cc +++ b/client/widgets/lineedit.cc @@ -42,6 +42,7 @@ LineEdit::LineEdit(QDomNode &node, MacroWindow *macrowindow) connect(this, SIGNAL(textChanged(QString)), this, SLOT(changed())); + /* // This is done later if(elem.hasAttribute("value")) { setText(elem.attribute("value")); } else { @@ -49,6 +50,7 @@ LineEdit::LineEdit(QDomNode &node, MacroWindow *macrowindow) setText(" "); setText(""); } + */ } void LineEdit::changed() diff --git a/client/widgets/listbox.cc b/client/widgets/listbox.cc index 4af7952..a47812a 100644 --- a/client/widgets/listbox.cc +++ b/client/widgets/listbox.cc @@ -87,10 +87,12 @@ ListBox::ListBox(QDomNode &node, MacroWindow *macrowindow) QDomElement list_elem = child.toElement(); addItem(createItem(list_elem)); } - + + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } + */ } bool ListBox::isValid() diff --git a/client/widgets/multilist.cc b/client/widgets/multilist.cc index a15d995..80addf7 100644 --- a/client/widgets/multilist.cc +++ b/client/widgets/multilist.cc @@ -80,9 +80,11 @@ MultiList::MultiList(QDomNode &node, MacroWindow *macrowindow) rem->setText("-"); layout->addWidget(rem, 1, 1, Qt::AlignTop); + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } + */ if(elem.hasAttribute("format")) { format = elem.attribute("format"); diff --git a/client/widgets/radiobuttons.cc b/client/widgets/radiobuttons.cc index bd88601..a690f17 100644 --- a/client/widgets/radiobuttons.cc +++ b/client/widgets/radiobuttons.cc @@ -67,9 +67,11 @@ RadioButtons::RadioButtons(QDomNode &node, MacroWindow *macrowindow) radiobutton_list.push_back(radiobutton); } + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } + */ } bool RadioButtons::isValid() diff --git a/client/widgets/textedit.cc b/client/widgets/textedit.cc index 0c1a0e0..dbc9e25 100644 --- a/client/widgets/textedit.cc +++ b/client/widgets/textedit.cc @@ -46,12 +46,14 @@ TextEdit::TextEdit(QDomNode &node, MacroWindow *macrowindow) connect(this, SIGNAL(textChanged()), this, SLOT(changed())); + /* // This is done later if(elem.hasAttribute("value")) { setValue(elem.attribute("value")); } else { setValue(" "); setValue(""); } + */ } void TextEdit::changed() diff --git a/client/widgets/window.cc b/client/widgets/window.cc index c4d8d14..bda3667 100644 --- a/client/widgets/window.cc +++ b/client/widgets/window.cc @@ -67,8 +67,3 @@ Window::Window(QDomNode &node, MacroWindow *macrowindow) setContentsMargins(0,0,0,0); } - -QString Window::getValue() -{ - return "Window"; -} diff --git a/client/widgets/window.h b/client/widgets/window.h index bd4c77b..af1e3d7 100644 --- a/client/widgets/window.h +++ b/client/widgets/window.h @@ -35,10 +35,6 @@ class Window : public QWidget, public Widget { public: Window(QDomNode &node, MacroWindow *macrowindow); - -public slots: - QString getValue(); - }; #endif/*__PRACRO_WINDOW_H__*/ -- cgit v1.2.3