From e01afe1595d1f332ff379c229145620581421945 Mon Sep 17 00:00:00 2001 From: Pieter van der Kloet Date: Mon, 25 Apr 2011 06:22:59 +0200 Subject: [PATCH] Included new header --- apps/launcher/combobox.hpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 apps/launcher/combobox.hpp diff --git a/apps/launcher/combobox.hpp b/apps/launcher/combobox.hpp new file mode 100644 index 000000000..bc99575d7 --- /dev/null +++ b/apps/launcher/combobox.hpp @@ -0,0 +1,28 @@ +#ifndef COMBOBOX_H +#define COMBOBOX_H + +#include + +class ComboBox : public QComboBox +{ + Q_OBJECT +private: + QString oldText; +public: + ComboBox(QWidget *parent=0) : QComboBox(parent), oldText() + { + connect(this,SIGNAL(editTextChanged(const QString&)), this, + SLOT(textChangedSlot(const QString&))); + connect(this,SIGNAL(currentIndexChanged(const QString&)), this, + SLOT(textChangedSlot(const QString&))); + } +private slots: + void textChangedSlot(const QString &newText) + { + emit textChanged(oldText, newText); + oldText = newText; + } +signals: + void textChanged(const QString &oldText, const QString &newText); +}; +#endif \ No newline at end of file