Bitcoin Core 28.99.0
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1// Copyright (c) 2011-2021 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;
18class WalletModel;
19
20QT_BEGIN_NAMESPACE
21class QComboBox;
22class QDateTimeEdit;
23class QFrame;
24class QLineEdit;
25class QMenu;
26class QModelIndex;
27class QTableView;
28QT_END_NAMESPACE
29
33class TransactionView : public QWidget
34{
35 Q_OBJECT
36
37public:
38 explicit TransactionView(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
40
42
43 // Date ranges for filter
45 {
52 Range
53 };
54
62 };
63
64protected:
65 void changeEvent(QEvent* e) override;
66
67private:
68 WalletModel *model{nullptr};
70 QTableView *transactionView{nullptr};
71
72 QComboBox *dateWidget;
73 QComboBox *typeWidget;
74 QComboBox *watchOnlyWidget;
75 QLineEdit *search_widget;
76 QLineEdit *amountWidget;
77
79
81 QDateTimeEdit *dateFrom;
82 QDateTimeEdit *dateTo;
83 QAction *abandonAction{nullptr};
84 QAction *bumpFeeAction{nullptr};
85 QAction *copyAddressAction{nullptr};
86 QAction *copyLabelAction{nullptr};
87
88 QWidget *createDateRangeWidget();
89
90 bool eventFilter(QObject *obj, QEvent *event) override;
91
93
94 QList<TransactionDescDialog*> m_opened_dialogs;
95
96private Q_SLOTS:
97 void contextualMenu(const QPoint &);
98 void dateRangeChanged();
99 void showDetails();
100 void copyAddress();
101 void editLabel();
102 void copyLabel();
103 void copyAmount();
104 void copyTxID();
105 void copyTxHex();
106 void copyTxPlainText();
107 void openThirdPartyTxUrl(QString url);
108 void updateWatchOnlyColumn(bool fHaveWatchOnly);
109 void abandonTx();
110 void bumpFee(bool checked);
111
112Q_SIGNALS:
113 void doubleClicked(const QModelIndex&);
114
116 void message(const QString &title, const QString &message, unsigned int style);
117
118 void bumpedFee(const uint256& txid);
119
120public Q_SLOTS:
121 void chooseDate(int idx);
122 void chooseType(int idx);
123 void chooseWatchonly(int idx);
124 void changedAmount();
125 void changedSearch();
126 void exportClicked();
127 void closeOpenedDialogs();
128 void focusTransaction(const QModelIndex&);
129 void focusTransaction(const uint256& txid);
130};
131
132#endif // BITCOIN_QT_TRANSACTIONVIEW_H
Dialog showing transaction details.
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
QList< TransactionDescDialog * > m_opened_dialogs
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:48
256-bit opaque blob.
Definition: uint256.h:201
const char * url
Definition: rpcconsole.cpp:61