mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Included new header
This commit is contained in:
parent
c911f62e8b
commit
e01afe1595
1 changed files with 28 additions and 0 deletions
28
apps/launcher/combobox.hpp
Normal file
28
apps/launcher/combobox.hpp
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#ifndef COMBOBOX_H
|
||||||
|
#define COMBOBOX_H
|
||||||
|
|
||||||
|
#include <QComboBox>
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in a new issue