aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/transactionview.h')
-rw-r--r--src/qt/transactionview.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
new file mode 100644
index 0000000000..f4f815b162
--- /dev/null
+++ b/src/qt/transactionview.h
@@ -0,0 +1,77 @@
+#ifndef TRANSACTIONVIEW_H
+#define TRANSACTIONVIEW_H
+
+#include <QWidget>
+
+class WalletModel;
+class TransactionFilterProxy;
+
+QT_BEGIN_NAMESPACE
+class QTableView;
+class QComboBox;
+class QLineEdit;
+class QModelIndex;
+class QMenu;
+class QFrame;
+class QDateTimeEdit;
+QT_END_NAMESPACE
+
+class TransactionView : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit TransactionView(QWidget *parent = 0);
+
+ void setModel(WalletModel *model);
+
+ // Date ranges for filter
+ enum DateEnum
+ {
+ All,
+ Today,
+ ThisWeek,
+ ThisMonth,
+ LastMonth,
+ ThisYear,
+ Range
+ };
+
+private:
+ WalletModel *model;
+ TransactionFilterProxy *transactionProxyModel;
+ QTableView *transactionView;
+
+ QComboBox *dateWidget;
+ QComboBox *typeWidget;
+ QLineEdit *addressWidget;
+ QLineEdit *amountWidget;
+
+ QMenu *contextMenu;
+
+ QFrame *dateRangeWidget;
+ QDateTimeEdit *dateFrom;
+ QDateTimeEdit *dateTo;
+
+ QWidget *createDateRangeWidget();
+
+private slots:
+ void contextualMenu(const QPoint &);
+ void dateRangeChanged();
+
+signals:
+ void doubleClicked(const QModelIndex&);
+
+public slots:
+ void chooseDate(int idx);
+ void chooseType(int idx);
+ void changedPrefix(const QString &prefix);
+ void changedAmount(const QString &amount);
+ void exportClicked();
+ void showDetails();
+ void copyAddress();
+ void editLabel();
+ void copyLabel();
+
+};
+
+#endif // TRANSACTIONVIEW_H