Bitcoin ABC  0.22.12
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_QT_TRANSACTIONVIEW_H
6 #define BITCOIN_QT_TRANSACTIONVIEW_H
7 
8 #include <qt/guiutil.h>
9 #include <uint256.h>
10 
11 #include <QKeyEvent>
12 #include <QWidget>
13 
14 class PlatformStyle;
16 class WalletModel;
17 
18 QT_BEGIN_NAMESPACE
19 class QComboBox;
20 class QDateTimeEdit;
21 class QFrame;
22 class QLineEdit;
23 class QMenu;
24 class QModelIndex;
25 class QTableView;
26 QT_END_NAMESPACE
27 
33 class TransactionView : public QWidget {
34  Q_OBJECT
35 
36 public:
37  explicit TransactionView(const PlatformStyle *platformStyle,
38  QWidget *parent = nullptr);
39 
40  void setModel(WalletModel *model);
41 
42  // Date ranges for filter
43  enum DateEnum {
44  All,
51  };
52 
53  enum ColumnWidths {
60  };
61 
62 private:
65  QTableView *transactionView;
66 
67  QComboBox *dateWidget;
68  QComboBox *typeWidget;
69  QComboBox *watchOnlyWidget;
70  QLineEdit *search_widget;
71  QLineEdit *amountWidget;
72 
73  QMenu *contextMenu;
74 
75  QFrame *dateRangeWidget;
76  QDateTimeEdit *dateFrom;
77  QDateTimeEdit *dateTo;
78  QAction *abandonAction;
79 
80  QWidget *createDateRangeWidget();
81 
83 
84  virtual void resizeEvent(QResizeEvent *event) override;
85 
86  bool eventFilter(QObject *obj, QEvent *event) override;
87 
88 private Q_SLOTS:
89  void contextualMenu(const QPoint &);
90  void dateRangeChanged();
91  void showDetails();
92  void copyAddress();
93  void editLabel();
94  void copyLabel();
95  void copyAmount();
96  void copyTxID();
97  void copyTxHex();
98  void copyTxPlainText();
99  void openThirdPartyTxUrl(QString url);
100  void updateWatchOnlyColumn(bool fHaveWatchOnly);
101  void abandonTx();
102 
103 Q_SIGNALS:
104  void doubleClicked(const QModelIndex &);
105 
109  void message(const QString &title, const QString &message,
110  unsigned int style);
111 
112 public Q_SLOTS:
113  void chooseDate(int idx);
114  void chooseType(int idx);
115  void chooseWatchonly(int idx);
116  void changedAmount();
117  void changedSearch();
118  void exportClicked();
119  void focusTransaction(const QModelIndex &);
120  void focusTransaction(const uint256 &txid);
121 };
122 
123 #endif // BITCOIN_QT_TRANSACTIONVIEW_H
void openThirdPartyTxUrl(QString url)
QWidget * createDateRangeWidget()
QAction * abandonAction
void focusTransaction(const QModelIndex &)
QTableView * transactionView
void chooseWatchonly(int idx)
QDateTimeEdit * dateTo
const char * url
Definition: rpcconsole.cpp:55
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
Widget showing the transaction list for a wallet, including a filter row.
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:194
void updateWatchOnlyColumn(bool fHaveWatchOnly)
bool eventFilter(QObject *obj, QEvent *event) override
TransactionFilterProxy * transactionProxyModel
QComboBox * watchOnlyWidget
256-bit opaque blob.
Definition: uint256.h:120
void chooseDate(int idx)
void setModel(WalletModel *model)
QLineEdit * amountWidget
QComboBox * typeWidget
Filter the transaction list according to pre-specified rules.
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
virtual void resizeEvent(QResizeEvent *event) override
QFrame * dateRangeWidget
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
void contextualMenu(const QPoint &)
void chooseType(int idx)
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
QDateTimeEdit * dateFrom
void doubleClicked(const QModelIndex &)
WalletModel * model
QComboBox * dateWidget
QLineEdit * search_widget