1 // Copyright (c) 2011-2016 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_COINCONTROLDIALOG_H
6 #define BITCOIN_QT_COINCONTROLDIALOG_H
10 #include <QAbstractButton>
17 #include <QTreeWidgetItem>
26 class CoinControlDialog
;
29 #define ASYMP_UTF8 "\xE2\x89\x88"
31 class CCoinControlWidgetItem
: public QTreeWidgetItem
34 CCoinControlWidgetItem(QTreeWidget
*parent
, int type
= Type
) : QTreeWidgetItem(parent
, type
) {}
35 CCoinControlWidgetItem(int type
= Type
) : QTreeWidgetItem(type
) {}
36 CCoinControlWidgetItem(QTreeWidgetItem
*parent
, int type
= Type
) : QTreeWidgetItem(parent
, type
) {}
38 bool operator<(const QTreeWidgetItem
&other
) const;
42 class CoinControlDialog
: public QDialog
47 explicit CoinControlDialog(const PlatformStyle
*platformStyle
, QWidget
*parent
= 0);
50 void setModel(WalletModel
*model
);
52 // static because also called from sendcoinsdialog
53 static void updateLabels(WalletModel
*, QDialog
*);
55 static QList
<CAmount
> payAmounts
;
56 static CCoinControl
*coinControl
;
57 static bool fSubtractFeeFromAmount
;
60 Ui::CoinControlDialog
*ui
;
63 Qt::SortOrder sortOrder
;
66 QTreeWidgetItem
*contextMenuItem
;
67 QAction
*copyTransactionHashAction
;
69 QAction
*unlockAction
;
71 const PlatformStyle
*platformStyle
;
73 void sortView(int, Qt::SortOrder
);
87 friend class CCoinControlWidgetItem
;
90 void showMenu(const QPoint
&);
94 void copyTransactionHash();
97 void clipboardQuantity();
98 void clipboardAmount();
100 void clipboardAfterFee();
101 void clipboardBytes();
102 void clipboardLowOutput();
103 void clipboardChange();
104 void radioTreeMode(bool);
105 void radioListMode(bool);
106 void viewItemChanged(QTreeWidgetItem
*, int);
107 void headerSectionClicked(int);
108 void buttonBoxClicked(QAbstractButton
*);
109 void buttonSelectAllClicked();
110 void updateLabelLocked();
113 #endif // BITCOIN_QT_COINCONTROLDIALOG_H