BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
transactionview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2018 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 QSignalMapper;
27 class QTableView;
28 QT_END_NAMESPACE
29 
33 class TransactionView : public QWidget
34 {
35  Q_OBJECT
36 
37 public:
38  explicit TransactionView(const PlatformStyle *platformStyle, QWidget *parent = 0);
39 
40  void setModel(WalletModel *model);
41 
42  // Date ranges for filter
43  enum DateEnum
44  {
45  All,
52  };
53 
54  enum ColumnWidths {
61  };
62 
63 private:
66  QTableView *transactionView;
67 
68  QComboBox *dateWidget;
69  QComboBox *typeWidget;
70  QComboBox *watchOnlyWidget;
71  QLineEdit *search_widget;
72  QLineEdit *amountWidget;
73 
74  QMenu *contextMenu;
75  QSignalMapper *mapperThirdPartyTxUrls;
76 
77  QFrame *dateRangeWidget;
78  QDateTimeEdit *dateFrom;
79  QDateTimeEdit *dateTo;
80  QAction *abandonAction;
81  QAction *bumpFeeAction;
82 
83  QWidget *createDateRangeWidget();
84 
86 
87  virtual void resizeEvent(QResizeEvent* event);
88 
89  bool eventFilter(QObject *obj, QEvent *event);
90 
91 private Q_SLOTS:
92  void contextualMenu(const QPoint &);
93  void dateRangeChanged();
94  void showDetails();
95  void copyAddress();
96  void editLabel();
97  void copyLabel();
98  void copyAmount();
99  void copyTxID();
100  void copyTxHex();
101  void copyTxPlainText();
102  void openThirdPartyTxUrl(QString url);
103  void updateWatchOnlyColumn(bool fHaveWatchOnly);
104  void abandonTx();
105  void bumpFee();
106 
107 Q_SIGNALS:
108  void doubleClicked(const QModelIndex&);
109 
111  void message(const QString &title, const QString &message, unsigned int style);
112 
113  void bumpedFee(const uint256& txid);
114 
115 public Q_SLOTS:
116  void chooseDate(int idx);
117  void chooseType(int idx);
118  void chooseWatchonly(int idx);
119  void changedAmount();
120  void changedSearch();
121  void exportClicked();
122  void focusTransaction(const QModelIndex&);
123  void focusTransaction(const uint256& txid);
124 };
125 
126 #endif // BITCOIN_QT_TRANSACTIONVIEW_H
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=0)
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:53
virtual void resizeEvent(QResizeEvent *event)
QSignalMapper * mapperThirdPartyTxUrls
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:152
void updateWatchOnlyColumn(bool fHaveWatchOnly)
void bumpedFee(const uint256 &txid)
TransactionFilterProxy * transactionProxyModel
QComboBox * watchOnlyWidget
256-bit opaque blob.
Definition: uint256.h:122
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:125
QFrame * dateRangeWidget
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