X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Ftransactionview.h;h=2fa1c390a367b66630ddb52054c17d17440767f0;hb=HEAD;hp=fe0f154b8e4e663b6ab19afc7bc56cc15dc514a6;hpb=05bae43c3ccad4959b8cc49db26449d409289118;p=novacoin.git diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index fe0f154..2fa1c39 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -3,7 +3,7 @@ #include -class TransactionTableModel; +class WalletModel; class TransactionFilterProxy; QT_BEGIN_NAMESPACE @@ -11,16 +11,24 @@ 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, @@ -33,7 +41,7 @@ public: }; private: - TransactionTableModel *model; + WalletModel *model; TransactionFilterProxy *transactionProxyModel; QTableView *transactionView; @@ -42,6 +50,27 @@ 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&); @@ -50,6 +79,8 @@ public slots: void chooseType(int idx); void changedPrefix(const QString &prefix); void changedAmount(const QString &amount); + void exportClicked(); + void focusTransaction(const QModelIndex&); };