Bugfix: Replace "URL" with "URI" where we aren't actually working with URLs
[novacoin.git] / src / qt / qvaluecombobox.h
1 #ifndef QVALUECOMBOBOX_H
2 #define QVALUECOMBOBOX_H
3
4 #include <QComboBox>
5
6 /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
7 class QValueComboBox : public QComboBox
8 {
9     Q_OBJECT
10     Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged USER true)
11 public:
12     explicit QValueComboBox(QWidget *parent = 0);
13
14     int value() const;
15     void setValue(int value);
16
17     /** Specify model role to use as ordinal value */
18     void setRole(int role);
19
20 signals:
21     void valueChanged();
22
23 public slots:
24
25 private:
26     int role;
27
28 private slots:
29     void handleSelectionChanged(int idx);
30 };
31
32 #endif // QVALUECOMBOBOX_H