Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / qvaluecombobox.h
1 #ifndef QVALUECOMBOBOX_H
2 #define QVALUECOMBOBOX_H
3
4 #include <QComboBox>
5 #include <QVariant>
6
7 /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
8 class QValueComboBox : public QComboBox
9 {
10     Q_OBJECT
11     Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true)
12 public:
13     explicit QValueComboBox(QWidget *parent = 0);
14
15     QVariant value() const;
16     void setValue(const QVariant &value);
17
18     /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */
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