/
githubmirror
/
bitcoin
Обзор
Документация
Войти
/
githubmirror
/
bitcoin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/qt/qvaluecombobox.h
37 строк
974 B
MarcoFalke
scripted-diff: [doc] Unify stale copyright headers
17 дек 2025, 00:21
17 дек 2025, 00:21
fa5f297
Код
Авторство
О чём код?
// Copyright (c) 2011-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_QVALUECOMBOBOX_H #define BITCOIN_QT_QVALUECOMBOBOX_H #include <QComboBox> #include <QVariant> /* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */ class QValueComboBox : public QComboBox { Q_OBJECT Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true) public: explicit QValueComboBox(QWidget *parent = nullptr); QVariant value() const; void setValue(const QVariant &value); /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */ void setRole(int role); Q_SIGNALS: void valueChanged(); private: int role{Qt::UserRole}; private Q_SLOTS: void handleSelectionChanged(int idx); }; #endif // BITCOIN_QT_QVALUECOMBOBOX_H