Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / coincontroldialog.h
1 #ifndef COINCONTROLDIALOG_H
2 #define COINCONTROLDIALOG_H
3
4 #include <QAbstractButton>
5 #include <QAction>
6 #include <QWidget>
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 #define ASYMP_UTF8 "\xE2\x89\x88"
20
21 class CoinControlDialog : public QWidget
22 {
23     Q_OBJECT
24 signals:
25     void beforeClose();
26
27 public:
28     explicit CoinControlDialog(QWidget *parent = 0);
29     ~CoinControlDialog();
30
31     void setModel(WalletModel *model);
32
33     // static because also called from sendcoinsdialog
34     static void updateLabels(WalletModel*, QWidget*);
35     static QString getPriorityLabel(double);
36
37     static QList<qint64> payAmounts;
38     static CCoinControl *coinControl;
39
40 protected:
41     void closeEvent(QCloseEvent* e);
42
43 private:
44     Ui::CoinControlDialog *ui;
45     WalletModel *model;
46     int sortColumn;
47     Qt::SortOrder sortOrder;
48
49     QMenu *contextMenu;
50     QTreeWidgetItem *contextMenuItem;
51     QAction *copyTransactionHashAction;
52     //QAction *lockAction;
53     //QAction *unlockAction;
54
55     QString strPad(QString, int, QString);
56     void sortView(int, Qt::SortOrder);
57     void updateView();
58
59     void keyPressEvent(QKeyEvent *);
60
61     enum
62     {
63         COLUMN_CHECKBOX,
64         COLUMN_AMOUNT,
65         COLUMN_LABEL,
66         COLUMN_ADDRESS,
67         COLUMN_DATE,
68         COLUMN_CONFIRMATIONS,
69         COLUMN_WEIGHT,
70         COLUMN_PRIORITY,
71         COLUMN_TXHASH,
72         COLUMN_VOUT_INDEX,
73         COLUMN_AMOUNT_INT64,
74         COLUMN_PRIORITY_INT64
75     };
76
77 private slots:
78     void showMenu(const QPoint &);
79     void copyAmount();
80     void copyLabel();
81     void copyAddress();
82     void copyTransactionHash();
83     //void lockCoin();
84     //void unlockCoin();
85     void clipboardQuantity();
86     void clipboardAmount();
87     void clipboardFee();
88     void clipboardAfterFee();
89     void clipboardBytes();
90     void clipboardPriority();
91     void clipboardLowOutput();
92     void clipboardChange();
93     void radioTreeMode(bool);
94     void radioListMode(bool);
95     void viewItemChanged(QTreeWidgetItem*, int);
96     void headerSectionClicked(int);
97     void on_buttonBox_accepted();
98     void buttonSelectAllClicked();
99     //void updateLabelLocked();
100 };
101
102 #endif // COINCONTROLDIALOG_H