From 02b791c8edb911895b5e71e6521db1d6799c34c8 Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 28 Aug 2010 11:26:59 +0000 Subject: Add combobox lua callbacks/ --- client/widgets/combobox.cc | 10 ++++++++++ client/widgets/combobox.h | 3 +++ client/widgets/dbwidget.cc | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'client/widgets') 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(); -- cgit v1.2.3