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/combobox.cc | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'client/widgets/combobox.cc') diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index caa7683..12c1f26 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -30,33 +30,18 @@ #include #include +#include "common.h" + ComboBox::ComboBox(QDomNode &node, MacroWindow *macrowindow) : QComboBox(), Widget(node, macrowindow) { - QDomElement elem = node.toElement(); + setCommonAttributes(this, node); setInsertPolicy(QComboBox::InsertAlphabetically); - if(elem.hasAttribute("width")) { - setMinimumWidth(elem.attribute("width").toInt()); - } - - if(elem.hasAttribute("height")) { - setMinimumHeight(elem.attribute("height").toInt()); - } - - if(elem.hasAttribute("help")) { - setWhatsThis(elem.attribute("help")); - } - if(elem.hasAttribute("help")) { - // setToolTip(elem.attribute("help")); - } - QDomNodeList children = node.childNodes(); QStringList itemlist; - setCurrentIndex(-1); // -1 is default for none selected - for (int i=0; i