summaryrefslogtreecommitdiff
path: root/client/widgets
diff options
context:
space:
mode:
authordeva <deva>2010-08-28 11:26:59 +0000
committerdeva <deva>2010-08-28 11:26:59 +0000
commit02b791c8edb911895b5e71e6521db1d6799c34c8 (patch)
treea159a96d149735851facbc56d99b6a099a8ba2bf /client/widgets
parent691529884f4adb4753f14d8a1e0b0743c5cf665a (diff)
Add combobox lua callbacks/
Diffstat (limited to 'client/widgets')
-rw-r--r--client/widgets/combobox.cc10
-rw-r--r--client/widgets/combobox.h3
-rw-r--r--client/widgets/dbwidget.cc2
3 files changed, 14 insertions, 1 deletions
diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc
index ec260ea..b625848 100644
--- a/client/widgets/combobox.cc
+++ b/client/widgets/combobox.cc
@@ -228,3 +228,13 @@ void ComboBox::setWdgValid(bool valid)
if(combobox->lineEdit()) combobox->lineEdit()->setPalette(palette);
combobox->setPalette(palette);
}
+
+void ComboBox::clear()
+{
+ combobox->clear();
+}
+
+void ComboBox::addItem(QString item)
+{
+ combobox->addItem(item, item);
+}
diff --git a/client/widgets/combobox.h b/client/widgets/combobox.h
index 57800d2..02b4ccd 100644
--- a/client/widgets/combobox.h
+++ b/client/widgets/combobox.h
@@ -54,6 +54,9 @@ public:
void setWdgValid(bool valid);
+ void clear();
+ void addItem(QString item);
+
public slots:
void changed();
diff --git a/client/widgets/dbwidget.cc b/client/widgets/dbwidget.cc
index 1292708..0708304 100644
--- a/client/widgets/dbwidget.cc
+++ b/client/widgets/dbwidget.cc
@@ -84,7 +84,7 @@ DBWidget::DBWidget(QDomNode &node, MacroWindow *macrowindow)
combobox->setEditable(true);
// Make empty default selection.
- combobox->addItem(tr("Write something in the searchfield"));
+ combobox->addItem(tr("EMPTY_STRING"));
combobox->setCurrentIndex(-1);
QStringListModel *strlst = new QStringListModel();