Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
qvaluecombobox.h
Go to the documentation of this file.
1// Copyright (c) 2011-present 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.
4
5#ifndef BITCOIN_QT_QVALUECOMBOBOX_H
6#define BITCOIN_QT_QVALUECOMBOBOX_H
7
8#include <QComboBox>
9#include <QVariant>
10
11/* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */
12class QValueComboBox : public QComboBox
13{
15
17
18public:
19 explicit QValueComboBox(QWidget *parent = nullptr);
20
21 QVariant value() const;
22 void setValue(const QVariant &value);
23
26
27private:
28 int role{Qt::UserRole};
29
30private Q_SLOTS:
31 void handleSelectionChanged(int idx);
32};
33
34#endif // BITCOIN_QT_QVALUECOMBOBOX_H
void valueChanged()
void handleSelectionChanged(int idx)
void setValue(const QVariant &value)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:82