Bitcoin Core 22.99.0
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1// Copyright (c) 2011-2020 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
15class PlatformStyle;
17class WalletModel;
18
19QT_BEGIN_NAMESPACE
20class QComboBox;
21class QDateTimeEdit;
22class QFrame;
23class QLineEdit;
24class QMenu;
25class QModelIndex;
26class QTableView;
27QT_END_NAMESPACE
28
32class TransactionView : public QWidget
33{
34 Q_OBJECT
35
36public:
37 explicit TransactionView(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
39
41
42 // Date ranges for filter
44 {
51 Range
52 };
53
61 };
62
63protected:
64 void changeEvent(QEvent* e) override;
65
66private:
67 WalletModel *model{nullptr};
69 QTableView *transactionView{nullptr};
70
71 QComboBox *dateWidget;
72 QComboBox *typeWidget;
73 QComboBox *watchOnlyWidget;
74 QLineEdit *search_widget;
75 QLineEdit *amountWidget;
76
78
80 QDateTimeEdit *dateFrom;
81 QDateTimeEdit *dateTo;
82 QAction *abandonAction{nullptr};
83 QAction *bumpFeeAction{nullptr};
84 QAction *copyAddressAction{nullptr};
85 QAction *copyLabelAction{nullptr};
86
87 QWidget *createDateRangeWidget();
88
89 bool eventFilter(QObject *obj, QEvent *event) override;
90
92
93private Q_SLOTS:
94 void contextualMenu(const QPoint &);
95 void dateRangeChanged();
96 void showDetails();
97 void copyAddress();
98 void editLabel();
99 void copyLabel();
100 void copyAmount();
101 void copyTxID();
102 void copyTxHex();
103 void copyTxPlainText();
104 void openThirdPartyTxUrl(QString url);
105 void updateWatchOnlyColumn(bool fHaveWatchOnly);
106 void abandonTx();
107 void bumpFee(bool checked);
108
109Q_SIGNALS:
110 void doubleClicked(const QModelIndex&);
111
113 void message(const QString &title, const QString &message, unsigned int style);
114
115 void bumpedFee(const uint256& txid);
116
117public Q_SLOTS:
118 void chooseDate(int idx);
119 void chooseType(int idx);
120 void chooseWatchonly(int idx);
121 void changedAmount();
122 void changedSearch();
123 void exportClicked();
124 void focusTransaction(const QModelIndex&);
125 void focusTransaction(const uint256& txid);
126};
127
128#endif // BITCOIN_QT_TRANSACTIONVIEW_H
Filter the transaction list according to pre-specified rules.
Widget showing the transaction list for a wallet, including a filter row.
WalletModel * model
const PlatformStyle * m_platform_style
void chooseWatchonly(int idx)
void bumpFee(bool checked)
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
QComboBox * typeWidget
QLineEdit * search_widget
bool eventFilter(QObject *obj, QEvent *event) override
QDateTimeEdit * dateFrom
QWidget * createDateRangeWidget()
void setModel(WalletModel *model)
void updateWatchOnlyColumn(bool fHaveWatchOnly)
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void chooseType(int idx)
QAction * bumpFeeAction
void changeEvent(QEvent *e) override
QComboBox * watchOnlyWidget
QAction * abandonAction
QFrame * dateRangeWidget
QDateTimeEdit * dateTo
TransactionFilterProxy * transactionProxyModel
QTableView * transactionView
void focusTransaction(const QModelIndex &)
void chooseDate(int idx)
void contextualMenu(const QPoint &)
QComboBox * dateWidget
QAction * copyAddressAction
void bumpedFee(const uint256 &txid)
void openThirdPartyTxUrl(QString url)
QAction * copyLabelAction
void doubleClicked(const QModelIndex &)
QLineEdit * amountWidget
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:52
256-bit opaque blob.
Definition: uint256.h:124
const char * url
Definition: rpcconsole.cpp:62