Bitcoin ABC
0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
qt
qvaluecombobox.h
Go to the documentation of this file.
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.
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
12
* from a model. */
13
class
QValueComboBox
:
public
QComboBox {
14
Q_OBJECT
15
16
Q_PROPERTY
(
17
QVariant
value
READ
value
WRITE
setValue
NOTIFY
valueChanged
USER
true
)
18
19
public
:
20
explicit
QValueComboBox
(QWidget *parent =
nullptr
);
21
22
QVariant
value
()
const
;
23
void
setValue
(
const
QVariant
&
value
);
24
26
void
setRole
(
int
role
);
27
28
Q_SIGNALS
:
29
void
valueChanged
();
30
31
private
:
32
int
role
;
33
34
private
Q_SLOTS
:
35
void
handleSelectionChanged
(
int
idx);
36
};
37
38
#endif
// BITCOIN_QT_QVALUECOMBOBOX_H
QValueComboBox
Definition
qvaluecombobox.h:13
QValueComboBox::valueChanged
void valueChanged()
QValueComboBox::handleSelectionChanged
void handleSelectionChanged(int idx)
Definition
qvaluecombobox.cpp:27
QValueComboBox::setRole
void setRole(int role)
Specify model role to use as ordinal value (defaults to Qt::UserRole)
Definition
qvaluecombobox.cpp:23
QValueComboBox::role
int role
Definition
qvaluecombobox.h:32
QValueComboBox::value
QVariant value
Definition
qvaluecombobox.h:17
QValueComboBox::setValue
void setValue(const QVariant &value)
Definition
qvaluecombobox.cpp:19
GetRand
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition
random.h:85
Generated on Thu Dec 26 2024 02:38:04 for Bitcoin ABC by
1.9.8