1 // Copyright (c) 2011-2013 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>
25 class CoinControlDialog;
28 #define ASYMP_UTF8 "\xE2\x89\x88"
30 class CoinControlDialog : public QDialog
35 explicit CoinControlDialog(QWidget *parent = 0);
38 void setModel(WalletModel *model);
40 // static because also called from sendcoinsdialog
41 static void updateLabels(WalletModel*, QDialog*);
42 static QString getPriorityLabel(double dPriority, double mempoolEstimatePriority);
44 static QList<CAmount> payAmounts;
45 static CCoinControl *coinControl;
46 static bool fSubtractFeeFromAmount;
49 Ui::CoinControlDialog *ui;
52 Qt::SortOrder sortOrder;
55 QTreeWidgetItem *contextMenuItem;
56 QAction *copyTransactionHashAction;
58 QAction *unlockAction;
60 QString strPad(QString, int, QString);
61 void sortView(int, Qt::SortOrder);
76 COLUMN_PRIORITY_INT64,
80 // some columns have a hidden column containing the value used for sorting
81 int getMappedColumn(int column, bool fVisibleColumn = true)
85 if (column == COLUMN_AMOUNT_INT64)
87 else if (column == COLUMN_PRIORITY_INT64)
88 return COLUMN_PRIORITY;
89 else if (column == COLUMN_DATE_INT64)
94 if (column == COLUMN_AMOUNT)
95 return COLUMN_AMOUNT_INT64;
96 else if (column == COLUMN_PRIORITY)
97 return COLUMN_PRIORITY_INT64;
98 else if (column == COLUMN_DATE)
99 return COLUMN_DATE_INT64;
106 void showMenu(const QPoint &);
110 void copyTransactionHash();
113 void clipboardQuantity();
114 void clipboardAmount();
116 void clipboardAfterFee();
117 void clipboardBytes();
118 void clipboardPriority();
119 void clipboardLowOutput();
120 void clipboardChange();
121 void radioTreeMode(bool);
122 void radioListMode(bool);
123 void viewItemChanged(QTreeWidgetItem*, int);
124 void headerSectionClicked(int);
125 void buttonBoxClicked(QAbstractButton*);
126 void buttonSelectAllClicked();
127 void updateLabelLocked();
130 #endif // BITCOIN_QT_COINCONTROLDIALOG_H