]> Git Repo - VerusCoin.git/blob - src/qt/coincontroldialog.h
Remove translation for -help-debug options
[VerusCoin.git] / src / qt / coincontroldialog.h
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.
4
5 #ifndef BITCOIN_QT_COINCONTROLDIALOG_H
6 #define BITCOIN_QT_COINCONTROLDIALOG_H
7
8 #include "amount.h"
9
10 #include <QAbstractButton>
11 #include <QAction>
12 #include <QDialog>
13 #include <QList>
14 #include <QMenu>
15 #include <QPoint>
16 #include <QString>
17 #include <QTreeWidgetItem>
18
19 class WalletModel;
20
21 class CCoinControl;
22 class CTxMemPool;
23
24 namespace Ui {
25     class CoinControlDialog;
26 }
27
28 #define ASYMP_UTF8 "\xE2\x89\x88"
29
30 class CoinControlDialog : public QDialog
31 {
32     Q_OBJECT
33
34 public:
35     explicit CoinControlDialog(QWidget *parent = 0);
36     ~CoinControlDialog();
37
38     void setModel(WalletModel *model);
39
40     // static because also called from sendcoinsdialog
41     static void updateLabels(WalletModel*, QDialog*);
42     static QString getPriorityLabel(double dPriority, double mempoolEstimatePriority);
43
44     static QList<CAmount> payAmounts;
45     static CCoinControl *coinControl;
46     static bool fSubtractFeeFromAmount;
47
48 private:
49     Ui::CoinControlDialog *ui;
50     WalletModel *model;
51     int sortColumn;
52     Qt::SortOrder sortOrder;
53
54     QMenu *contextMenu;
55     QTreeWidgetItem *contextMenuItem;
56     QAction *copyTransactionHashAction;
57     QAction *lockAction;
58     QAction *unlockAction;
59
60     QString strPad(QString, int, QString);
61     void sortView(int, Qt::SortOrder);
62     void updateView();
63
64     enum
65     {
66         COLUMN_CHECKBOX,
67         COLUMN_AMOUNT,
68         COLUMN_LABEL,
69         COLUMN_ADDRESS,
70         COLUMN_DATE,
71         COLUMN_CONFIRMATIONS,
72         COLUMN_PRIORITY,
73         COLUMN_TXHASH,
74         COLUMN_VOUT_INDEX,
75         COLUMN_AMOUNT_INT64,
76         COLUMN_PRIORITY_INT64,
77         COLUMN_DATE_INT64
78     };
79
80     // some columns have a hidden column containing the value used for sorting
81     int getMappedColumn(int column, bool fVisibleColumn = true)
82     {
83         if (fVisibleColumn)
84         {
85             if (column == COLUMN_AMOUNT_INT64)
86                 return COLUMN_AMOUNT;
87             else if (column == COLUMN_PRIORITY_INT64)
88                 return COLUMN_PRIORITY;
89             else if (column == COLUMN_DATE_INT64)
90                 return COLUMN_DATE;
91         }
92         else
93         {
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;
100         }
101
102         return column;
103     }
104
105 private slots:
106     void showMenu(const QPoint &);
107     void copyAmount();
108     void copyLabel();
109     void copyAddress();
110     void copyTransactionHash();
111     void lockCoin();
112     void unlockCoin();
113     void clipboardQuantity();
114     void clipboardAmount();
115     void clipboardFee();
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();
128 };
129
130 #endif // BITCOIN_QT_COINCONTROLDIALOG_H
This page took 0.031702 seconds and 4 git commands to generate.