Bitcoin Core  0.19.99
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2019 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 
10 #include <uint256.h>
11 
12 #include <QWidget>
13 #include <QKeyEvent>
14 
15 class PlatformStyle;
17 class WalletModel;
18 
19 QT_BEGIN_NAMESPACE
20 class QComboBox;
21 class QDateTimeEdit;
22 class QFrame;
23 class QLineEdit;
24 class QMenu;
25 class QModelIndex;
26 class QTableView;
27 QT_END_NAMESPACE
28 
32 class TransactionView : public QWidget
33 {
34  Q_OBJECT
35 
36 public:
37  explicit TransactionView(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
38 
39  void setModel(WalletModel *model);
40 
41  // Date ranges for filter
42  enum DateEnum
43  {
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  QAction *bumpFeeAction;
80 
81  QWidget *createDateRangeWidget();
82 
84 
85  virtual void resizeEvent(QResizeEvent* event);
86 
87  bool eventFilter(QObject *obj, QEvent *event);
88 
89 private Q_SLOTS:
90  void contextualMenu(const QPoint &);
91  void dateRangeChanged();
92  void showDetails();
93  void copyAddress();
94  void editLabel();
95  void copyLabel();
96  void copyAmount();
97  void copyTxID();
98  void copyTxHex();
99  void copyTxPlainText();
100  void openThirdPartyTxUrl(QString url);
101  void updateWatchOnlyColumn(bool fHaveWatchOnly);
102  void abandonTx();
103  void bumpFee();
104 
105 Q_SIGNALS:
106  void doubleClicked(const QModelIndex&);
107 
109  void message(const QString &title, const QString &message, unsigned int style);
110 
111  void bumpedFee(const uint256& txid);
112 
113 public Q_SLOTS:
114  void chooseDate(int idx);
115  void chooseType(int idx);
116  void chooseWatchonly(int idx);
117  void changedAmount();
118  void changedSearch();
119  void exportClicked();
120  void focusTransaction(const QModelIndex&);
121  void focusTransaction(const uint256& txid);
122 };
123 
124 #endif // BITCOIN_QT_TRANSACTIONVIEW_H
bool eventFilter(QObject *obj, QEvent *event)
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:51
virtual void resizeEvent(QResizeEvent *event)
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:161
void updateWatchOnlyColumn(bool fHaveWatchOnly)
void bumpedFee(const uint256 &txid)
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:50
QFrame * dateRangeWidget
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
void contextualMenu(const QPoint &)
void chooseType(int idx)
QAction * bumpFeeAction
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
QDateTimeEdit * dateFrom
void doubleClicked(const QModelIndex &)
WalletModel * model
QComboBox * dateWidget
QLineEdit * search_widget