Bitcoin ABC 0.30.5
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
14class PlatformStyle;
16class WalletModel;
17
18QT_BEGIN_NAMESPACE
19class QComboBox;
20class QDateTimeEdit;
21class QFrame;
22class QLineEdit;
23class QMenu;
24class QModelIndex;
25class QTableView;
26QT_END_NAMESPACE
27
33class TransactionView : public QWidget {
34 Q_OBJECT
35
36public:
37 explicit TransactionView(const PlatformStyle *platformStyle,
38 QWidget *parent = nullptr);
39
41
42 // Date ranges for filter
43 enum DateEnum {
50 Range
51 };
52
60 };
61
62private:
63 WalletModel *model{nullptr};
65 QTableView *transactionView{nullptr};
66
67 QComboBox *dateWidget;
68 QComboBox *typeWidget;
69 QComboBox *watchOnlyWidget;
70 QLineEdit *search_widget;
71 QLineEdit *amountWidget;
72
74
76 QDateTimeEdit *dateFrom;
77 QDateTimeEdit *dateTo;
78 QAction *abandonAction{nullptr};
79 QAction *copyAddressAction{nullptr};
80 QAction *copyLabelAction{nullptr};
81
82 QWidget *createDateRangeWidget();
83
85
86 virtual void resizeEvent(QResizeEvent *event) override;
87
88 bool eventFilter(QObject *obj, QEvent *event) override;
89
90private Q_SLOTS:
91 void contextualMenu(const QPoint &);
92 void dateRangeChanged();
93 void showDetails();
94 void copyAddress();
95 void editLabel();
96 void copyLabel();
97 void copyAmount();
98 void copyTxID();
99 void copyTxHex();
100 void copyTxPlainText();
101 void openThirdPartyTxUrl(QString url);
102 void updateWatchOnlyColumn(bool fHaveWatchOnly);
103 void abandonTx();
104
105Q_SIGNALS:
106 void doubleClicked(const QModelIndex &);
107
111 void message(const QString &title, const QString &message,
112 unsigned int style);
113
114public Q_SLOTS:
115 void chooseDate(int idx);
116 void chooseType(int idx);
117 void chooseWatchonly(int idx);
118 void changedAmount();
119 void changedSearch();
120 void exportClicked();
121 void focusTransaction(const QModelIndex &);
122 void focusTransaction(const uint256 &txid);
123};
124
125#endif // BITCOIN_QT_TRANSACTIONVIEW_H
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:227
Filter the transaction list according to pre-specified rules.
Widget showing the transaction list for a wallet, including a filter row.
WalletModel * model
void chooseWatchonly(int idx)
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)
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
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)
virtual void resizeEvent(QResizeEvent *event) 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 openThirdPartyTxUrl(QString url)
QAction * copyLabelAction
void doubleClicked(const QModelIndex &)
QLineEdit * amountWidget
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
256-bit opaque blob.
Definition: uint256.h:129
const char * url
Definition: rpcconsole.cpp:52