Code style fix (no "tab" symbol).
[novacoin.git] / src / qt / transactionview.h
index e75dcc2..2fa1c39 100644 (file)
@@ -3,35 +3,45 @@
 
 #include <QWidget>
 
-class TransactionTableModel;
+class WalletModel;
 class TransactionFilterProxy;
 
 QT_BEGIN_NAMESPACE
 class QTableView;
 class QComboBox;
 class QLineEdit;
+class QModelIndex;
+class QSignalMapper;
+class QMenu;
+class QFrame;
+class QDateTimeEdit;
 QT_END_NAMESPACE
 
+/** Widget showing the transaction list for a wallet, including a filter row.
+    Using the filter row, the user can view or export a subset of the transactions.
+  */
 class TransactionView : public QWidget
 {
     Q_OBJECT
 public:
     explicit TransactionView(QWidget *parent = 0);
 
-    void setModel(TransactionTableModel *model);
+    void setModel(WalletModel *model, bool fShoudAddThirdPartyURL = true);
 
+    // Date ranges for filter
     enum DateEnum
     {
         All,
         Today,
         ThisWeek,
         ThisMonth,
+        LastMonth,
         ThisYear,
         Range
     };
 
 private:
-    TransactionTableModel *model;
+    WalletModel *model;
     TransactionFilterProxy *transactionProxyModel;
     QTableView *transactionView;
 
@@ -40,13 +50,37 @@ private:
     QLineEdit *addressWidget;
     QLineEdit *amountWidget;
 
+    QMenu *contextMenu;
+    QSignalMapper *mapperThirdPartyTxUrls;
+
+    QFrame *dateRangeWidget;
+    QDateTimeEdit *dateFrom;
+    QDateTimeEdit *dateTo;
+
+    QWidget *createDateRangeWidget();
+
+private slots:
+    void contextualMenu(const QPoint &);
+    void dateRangeChanged();
+    void showDetails();
+    void copyAddress();
+    void editLabel();
+    void copyLabel();
+    void copyAmount();
+    void copyTxID();
+    void clearOrphans();
+    void openThirdPartyTxUrl(QString url);
+
 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 focusTransaction(const QModelIndex&);
 
 };