[test] Add getblockchaininfo functional test
[bitcoinplatinum.git] / src / qt / qvaluecombobox.h
blobf266302310f113e03e2ed89c53535ba8c2f7847c
1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_QVALUECOMBOBOX_H
6 #define BITCOIN_QT_QVALUECOMBOBOX_H
8 #include <QComboBox>
9 #include <QVariant>
11 /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
12 class QValueComboBox : public QComboBox
14 Q_OBJECT
16 Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true)
18 public:
19 explicit QValueComboBox(QWidget *parent = 0);
21 QVariant value() const;
22 void setValue(const QVariant &value);
24 /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */
25 void setRole(int role);
27 Q_SIGNALS:
28 void valueChanged();
30 private:
31 int role;
33 private Q_SLOTS:
34 void handleSelectionChanged(int idx);
37 #endif // BITCOIN_QT_QVALUECOMBOBOX_H