25212c976efeba2356210abe86d014083da81cc5
[novacoin.git] / src / qt / transactionview.h
1 #ifndef TRANSACTIONVIEW_H
2 #define TRANSACTIONVIEW_H
3
4 #include <QWidget>
5
6 class TransactionTableModel;
7 class TransactionFilterProxy;
8
9 QT_BEGIN_NAMESPACE
10 class QTableView;
11 class QComboBox;
12 class QLineEdit;
13 class QModelIndex;
14 QT_END_NAMESPACE
15
16 class TransactionView : public QWidget
17 {
18     Q_OBJECT
19 public:
20     explicit TransactionView(QWidget *parent = 0);
21
22     void setModel(TransactionTableModel *model);
23
24     enum DateEnum
25     {
26         All,
27         Today,
28         ThisWeek,
29         ThisMonth,
30         LastMonth,
31         ThisYear,
32         Range
33     };
34
35 private:
36     TransactionTableModel *model;
37     TransactionFilterProxy *transactionProxyModel;
38     QTableView *transactionView;
39
40     QComboBox *dateWidget;
41     QComboBox *typeWidget;
42     QLineEdit *addressWidget;
43     QLineEdit *amountWidget;
44
45 signals:
46     void doubleClicked(const QModelIndex&);
47
48 public slots:
49     void chooseDate(int idx);
50     void chooseType(int idx);
51     void changedPrefix(const QString &prefix);
52     void changedAmount(const QString &amount);
53     void exportClicked();
54
55 };
56
57 #endif // TRANSACTIONVIEW_H