Use a messagebox to display the error when -server is provided without providing...
[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
7 // ordinal values from a model.
8 class QValueComboBox : public QComboBox
9 {
10     Q_OBJECT
11     Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged USER true);
12 public:
13     explicit QValueComboBox(QWidget *parent = 0);
14
15     int value() const;
16     void setValue(int value);
17
18     // Model role to use as value
19     void setRole(int role);
20
21 signals:
22     void valueChanged();
23
24 public slots:
25
26 private:
27     int role;
28
29 private slots:
30     void handleSelectionChanged(int idx);
31 };
32
33 #endif // QVALUECOMBOBOX_H