Merge #11997: [tests] util_tests.cpp: actually check ignored args
[bitcoinplatinum.git] / src / qt / coincontroldialog.h
blob355ed5f55340d68f3ccb88810ce4dc4f2c74385a
1 // Copyright (c) 2011-2017 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
8 #include <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>
19 class PlatformStyle;
20 class WalletModel;
22 class CCoinControl;
24 namespace Ui {
25 class CoinControlDialog;
28 #define ASYMP_UTF8 "\xE2\x89\x88"
30 class CCoinControlWidgetItem : public QTreeWidgetItem
32 public:
33 explicit CCoinControlWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
34 explicit CCoinControlWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
35 explicit CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
37 bool operator<(const QTreeWidgetItem &other) const;
41 class CoinControlDialog : public QDialog
43 Q_OBJECT
45 public:
46 explicit CoinControlDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
47 ~CoinControlDialog();
49 void setModel(WalletModel *model);
51 // static because also called from sendcoinsdialog
52 static void updateLabels(WalletModel*, QDialog*);
54 static QList<CAmount> payAmounts;
55 static CCoinControl *coinControl;
56 static bool fSubtractFeeFromAmount;
58 private:
59 Ui::CoinControlDialog *ui;
60 WalletModel *model;
61 int sortColumn;
62 Qt::SortOrder sortOrder;
64 QMenu *contextMenu;
65 QTreeWidgetItem *contextMenuItem;
66 QAction *copyTransactionHashAction;
67 QAction *lockAction;
68 QAction *unlockAction;
70 const PlatformStyle *platformStyle;
72 void sortView(int, Qt::SortOrder);
73 void updateView();
75 enum
77 COLUMN_CHECKBOX = 0,
78 COLUMN_AMOUNT,
79 COLUMN_LABEL,
80 COLUMN_ADDRESS,
81 COLUMN_DATE,
82 COLUMN_CONFIRMATIONS,
83 COLUMN_TXHASH,
84 COLUMN_VOUT_INDEX,
86 friend class CCoinControlWidgetItem;
88 private Q_SLOTS:
89 void showMenu(const QPoint &);
90 void copyAmount();
91 void copyLabel();
92 void copyAddress();
93 void copyTransactionHash();
94 void lockCoin();
95 void unlockCoin();
96 void clipboardQuantity();
97 void clipboardAmount();
98 void clipboardFee();
99 void clipboardAfterFee();
100 void clipboardBytes();
101 void clipboardLowOutput();
102 void clipboardChange();
103 void radioTreeMode(bool);
104 void radioListMode(bool);
105 void viewItemChanged(QTreeWidgetItem*, int);
106 void headerSectionClicked(int);
107 void buttonBoxClicked(QAbstractButton*);
108 void buttonSelectAllClicked();
109 void updateLabelLocked();
112 #endif // BITCOIN_QT_COINCONTROLDIALOG_H