Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2011-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_QT_COINCONTROLDIALOG_H6#define BITCOIN_QT_COINCONTROLDIALOG_H8#include <consensus/amount.h>10#include <QAbstractButton>11#include <QAction>12#include <QDialog>13#include <QList>14#include <QMenu>15#include <QPoint>16#include <QString>17#include <QTreeWidgetItem>19class PlatformStyle;20class WalletModel;22namespace wallet {23class CCoinControl;24} // namespace wallet26namespace Ui {27class CoinControlDialog;28}30#define ASYMP_UTF8 "\xE2\x89\x88"32class CCoinControlWidgetItem : public QTreeWidgetItem33{34public:35explicit CCoinControlWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {}36explicit CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type) : QTreeWidgetItem(parent, type) {}38bool operator<(const QTreeWidgetItem &other) const override;39};42class CoinControlDialog : public QDialog43{44Q_OBJECT46public:47explicit CoinControlDialog(wallet::CCoinControl& coin_control, WalletModel* model, const PlatformStyle *platformStyle, QWidget *parent = nullptr);48~CoinControlDialog();50// static because also called from sendcoinsdialog51static void updateLabels(wallet::CCoinControl& m_coin_control, WalletModel*, QDialog*);53static QList<CAmount> payAmounts;54static bool fSubtractFeeFromAmount;56protected:57void changeEvent(QEvent* e) override;59private:60Ui::CoinControlDialog *ui;61wallet::CCoinControl& m_coin_control;62WalletModel *model;63int sortColumn;64Qt::SortOrder sortOrder;66QMenu *contextMenu;67QTreeWidgetItem *contextMenuItem;68QAction* m_copy_transaction_outpoint_action;69QAction *lockAction;70QAction *unlockAction;72const PlatformStyle *platformStyle;74void sortView(int, Qt::SortOrder);75void updateView();77enum78{79COLUMN_CHECKBOX = 0,80COLUMN_AMOUNT,81COLUMN_LABEL,82COLUMN_ADDRESS,83COLUMN_DATE,84COLUMN_CONFIRMATIONS,85};87enum88{89TxHashRole = Qt::UserRole,90VOutRole91};93friend class CCoinControlWidgetItem;95private Q_SLOTS:96void showMenu(const QPoint &);97void copyAmount();98void copyLabel();99void copyAddress();100void copyTransactionOutpoint();101void lockCoin();102void unlockCoin();103void clipboardQuantity();104void clipboardAmount();105void clipboardFee();106void clipboardAfterFee();107void clipboardBytes();108void clipboardChange();109void radioTreeMode(bool);110void radioListMode(bool);111void viewItemChanged(QTreeWidgetItem*, int);112void headerSectionClicked(int);113void buttonBoxClicked(QAbstractButton*);114void buttonSelectAllClicked();115void updateLabelLocked();116};118#endif // BITCOIN_QT_COINCONTROLDIALOG_H
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.