summaryrefslogtreecommitdiff
path: root/client/widgets/lineedit.cc
diff options
context:
space:
mode:
authordeva <deva>2008-08-28 14:13:48 +0000
committerdeva <deva>2008-08-28 14:13:48 +0000
commit477c9fd7f038cd43207c8634d53d0949814ecb4c (patch)
tree4d4f849c281aa4402c3f7bd95546c21ebe287e55 /client/widgets/lineedit.cc
parentb74d14e7e8625ce1a148105f69e3406f7d88ecd6 (diff)
Added common stuff in central file. Fixed help text reformatting.
Diffstat (limited to 'client/widgets/lineedit.cc')
-rw-r--r--client/widgets/lineedit.cc26
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()