From 477c9fd7f038cd43207c8634d53d0949814ecb4c Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 28 Aug 2008 14:13:48 +0000 Subject: Added common stuff in central file. Fixed help text reformatting. --- client/widgets/textedit.cc | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) (limited to 'client/widgets/textedit.cc') diff --git a/client/widgets/textedit.cc b/client/widgets/textedit.cc index 0cd2d4f..8b18a3d 100644 --- a/client/widgets/textedit.cc +++ b/client/widgets/textedit.cc @@ -25,39 +25,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "textedit.h" -#include #include +#include + +#include "common.h" + TextEdit::TextEdit(QDomNode &node, MacroWindow *macrowindow) : QTextEdit(), Widget(node, macrowindow) { - //setAutoFillBackground(true); /* Default is false, which disables background - // color manipulation.*/ - - QDomElement elem = node.toElement(); - - if(elem.hasAttribute("width")) { - setMinimumWidth(elem.attribute("width").toInt()); - } - - if(elem.hasAttribute("height")) { - setMinimumHeight(elem.attribute("height").toInt()); - } - - if(elem.hasAttribute("help")) { - setToolTip(elem.attribute("help")); - } + setCommonAttributes(this, node); 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() -- cgit v1.2.3