Add input weight to coin control interface
[novacoin.git] / src / qt / coincontroldialog.h
1 #ifndef COINCONTROLDIALOG_H
2 #define COINCONTROLDIALOG_H
3
4 #include <QAbstractButton>
5 #include <QAction>
6 #include <QDialog>
7 #include <QList>
8 #include <QMenu>
9 #include <QPoint>
10 #include <QString>
11 #include <QTreeWidgetItem>
12
13 namespace Ui {
14     class CoinControlDialog;
15 }
16 class WalletModel;
17 class CCoinControl;
18
19 class CoinControlDialog : public QDialog
20 {
21     Q_OBJECT
22
23 public:
24     explicit CoinControlDialog(QWidget *parent = 0);
25     ~CoinControlDialog();
26
27     void setModel(WalletModel *model);
28
29     // static because also called from sendcoinsdialog
30     static void updateLabels(WalletModel*, QDialog*);
31     static QString getPriorityLabel(double);
32
33     static QList<qint64> payAmounts;
34     static CCoinControl *coinControl;
35
36 private:
37     Ui::CoinControlDialog *ui;
38     WalletModel *model;
39     int sortColumn;
40     Qt::SortOrder sortOrder;
41
42     QMenu *contextMenu;
43     QTreeWidgetItem *contextMenuItem;
44     QAction *copyTransactionHashAction;
45     //QAction *lockAction;
46     //QAction *unlockAction;
47
48     QString strPad(QString, int, QString);
49     void sortView(int, Qt::SortOrder);
50     void updateView();
51
52     enum
53     {
54         COLUMN_CHECKBOX,
55         COLUMN_AMOUNT,
56         COLUMN_LABEL,
57         COLUMN_ADDRESS,
58         COLUMN_DATE,
59         COLUMN_CONFIRMATIONS,
60         COLUMN_WEIGHT,
61         COLUMN_PRIORITY,
62         COLUMN_TXHASH,
63         COLUMN_VOUT_INDEX,
64         COLUMN_AMOUNT_INT64,
65         COLUMN_PRIORITY_INT64
66     };
67
68 private slots:
69     void showMenu(const QPoint &);
70     void copyAmount();
71     void copyLabel();
72     void copyAddress();
73     void copyTransactionHash();
74     //void lockCoin();
75     //void unlockCoin();
76     void clipboardQuantity();
77     void clipboardAmount();
78     void clipboardFee();
79     void clipboardAfterFee();
80     void clipboardBytes();
81     void clipboardPriority();
82     void clipboardLowOutput();
83     void clipboardChange();
84     void radioTreeMode(bool);
85     void radioListMode(bool);
86     void viewItemChanged(QTreeWidgetItem*, int);
87     void headerSectionClicked(int);
88     void buttonBoxClicked(QAbstractButton*);
89     void buttonSelectAllClicked();
90     //void updateLabelLocked();
91 };
92
93 #endif // COINCONTROLDIALOG_H