diff options
Diffstat (limited to 'client/widgets/lineedit.cc')
-rw-r--r-- | client/widgets/lineedit.cc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/client/widgets/lineedit.cc b/client/widgets/lineedit.cc index 977c5a2..29ea06c 100644 --- a/client/widgets/lineedit.cc +++ b/client/widgets/lineedit.cc @@ -27,22 +27,14 @@ #include "lineedit.h" #include <stdio.h> +#include "common.h" + LineEdit::LineEdit(QDomNode &node, MacroWindow *macrowindow) : QLineEdit(), Widget(node, macrowindow) { - QDomElement elem = node.toElement(); - - if(elem.hasAttribute("width")) { - setMinimumWidth(elem.attribute("width").toInt()); - } - - if(elem.hasAttribute("height")) { - setMinimumHeight(elem.attribute("height").toInt()); - } + setCommonAttributes(this, node); - if(elem.hasAttribute("help")) { - setWhatsThis(elem.attribute("help")); - } + QDomElement elem = node.toElement(); if(elem.hasAttribute("readonly")) { if(elem.attribute("readonly") == "true" || elem.attribute("readonly") == "1") { @@ -55,16 +47,6 @@ 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 { - // This is a hack to force correct background color according to regexp - setText(" "); - setText(""); - } - */ } void LineEdit::changed() |