Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / transactionview.h
1 #ifndef TRANSACTIONVIEW_H
2 #define TRANSACTIONVIEW_H
3
4 #include <QWidget>
5
6 class WalletModel;
7 class TransactionFilterProxy;
8
9 QT_BEGIN_NAMESPACE
10 class QTableView;
11 class QComboBox;
12 class QLineEdit;
13 class QModelIndex;
14 class QSignalMapper;
15 class QMenu;
16 class QFrame;
17 class QDateTimeEdit;
18 QT_END_NAMESPACE
19
20 /** Widget showing the transaction list for a wallet, including a filter row.
21     Using the filter row, the user can view or export a subset of the transactions.
22   */
23 class TransactionView : public QWidget
24 {
25     Q_OBJECT
26 public:
27     explicit TransactionView(QWidget *parent = 0);
28
29     void setModel(WalletModel *model, bool fShoudAddThirdPartyURL = true);
30
31     // Date ranges for filter
32     enum DateEnum
33     {
34         All,
35         Today,
36         ThisWeek,
37         ThisMonth,
38         LastMonth,
39         ThisYear,
40         Range
41     };
42
43 private:
44     WalletModel *model;
45     TransactionFilterProxy *transactionProxyModel;
46     QTableView *transactionView;
47
48     QComboBox *dateWidget;
49     QComboBox *typeWidget;
50     QLineEdit *addressWidget;
51     QLineEdit *amountWidget;
52
53     QMenu *contextMenu;
54     QSignalMapper *mapperThirdPartyTxUrls;
55
56     QFrame *dateRangeWidget;
57     QDateTimeEdit *dateFrom;
58     QDateTimeEdit *dateTo;
59
60     QWidget *createDateRangeWidget();
61
62 private slots:
63     void contextualMenu(const QPoint &);
64     void dateRangeChanged();
65     void showDetails();
66     void copyAddress();
67     void editLabel();
68     void copyLabel();
69     void copyAmount();
70     void copyTxID();
71     void clearOrphans();
72     void openThirdPartyTxUrl(QString url);
73
74 signals:
75     void doubleClicked(const QModelIndex&);
76
77 public slots:
78     void chooseDate(int idx);
79     void chooseType(int idx);
80     void changedPrefix(const QString &prefix);
81     void changedAmount(const QString &amount);
82     void exportClicked();
83     void focusTransaction(const QModelIndex&);
84
85 };
86
87 #endif // TRANSACTIONVIEW_H