OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
profilescombobox.hpp
Go to the documentation of this file.
1 #ifndef PROFILESCOMBOBOX_HPP
2 #define PROFILESCOMBOBOX_HPP
3 
5 #include "lineedit.hpp"
6 
7 #include <QDebug>
8 
9 class QString;
10 
12 {
13  Q_OBJECT
14 
15 public:
16  class ComboBoxLineEdit : public LineEdit
17  {
18  public:
19  explicit ComboBoxLineEdit (QWidget *parent = 0);
20  };
21 
22 public:
23 
24  explicit ProfilesComboBox(QWidget *parent = 0);
25  void setEditEnabled(bool editable);
26  void setCurrentProfile(int index)
27  {
28  ComboBox::setCurrentIndex(index);
29  mOldProfile = currentText();
30  }
31 
32 signals:
33  void signalProfileTextChanged(const QString &item);
34  void signalProfileChanged(const QString &previous, const QString &current);
35  void signalProfileChanged(int index);
36  void profileRenamed(const QString &oldName, const QString &newName);
37 
38 private slots:
39 
40  void slotEditingFinished();
41  void slotIndexChangedByUser(int index);
42  void slotTextChanged(const QString &text);
43 
44 private:
45  QString mOldProfile;
46 };
47 #endif // PROFILESCOMBOBOX_HPP
Definition: profilescombobox.hpp:16
void signalProfileChanged(const QString &previous, const QString &current)
static const struct @2 signals[]
void signalProfileTextChanged(const QString &item)
QString mOldProfile
Definition: profilescombobox.hpp:45
void slotIndexChangedByUser(int index)
Definition: profilescombobox.cpp:83
void slotTextChanged(const QString &text)
Definition: profilescombobox.cpp:48
Definition: combobox.hpp:12
Definition: lineedit.hpp:20
Definition: profilescombobox.hpp:11
void setEditEnabled(bool editable)
Definition: profilescombobox.cpp:18
void profileRenamed(const QString &oldName, const QString &newName)
void slotEditingFinished()
Definition: profilescombobox.cpp:62
ProfilesComboBox(QWidget *parent=0)
Definition: profilescombobox.cpp:9
ComboBoxLineEdit(QWidget *parent=0)
Definition: profilescombobox.cpp:92
void setCurrentProfile(int index)
Definition: profilescombobox.hpp:26