Raven Core  3.0.0
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_TRANSACTIONVIEW_H
7 #define RAVEN_QT_TRANSACTIONVIEW_H
8 
9 #include "guiutil.h"
10 
11 #include <QWidget>
12 #include <QKeyEvent>
13 
14 class PlatformStyle;
16 class WalletModel;
17 
18 QT_BEGIN_NAMESPACE
19 class QComboBox;
20 class QDateTimeEdit;
21 class QFrame;
22 class QLineEdit;
23 class QMenu;
24 class QModelIndex;
25 class QSignalMapper;
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 = 0);
38 
39  void setModel(WalletModel *model);
40  void showAssets();
41 
42  // Date ranges for filter
43  enum DateEnum
44  {
45  All,
52  };
53 
54  enum ColumnWidths {
62  };
63 
64 private:
67  QTableView *transactionView;
68 
69  QComboBox *dateWidget;
70  QComboBox *typeWidget;
71  QComboBox *watchOnlyWidget;
72  QLineEdit *addressWidget;
73  QLineEdit *amountWidget;
74  QLineEdit *assetNameWidget;
75 
77 
78  QMenu *contextMenu;
79  QSignalMapper *mapperThirdPartyTxUrls;
80 
81  QFrame *dateRangeWidget;
82  QDateTimeEdit *dateFrom;
83  QDateTimeEdit *dateTo;
84  QAction *abandonAction;
85  QAction *bumpFeeAction;
86 
87  QWidget *createDateRangeWidget();
88 
90 
91  virtual void resizeEvent(QResizeEvent* event);
92 
93  bool eventFilter(QObject *obj, QEvent *event);
94 
95 private Q_SLOTS:
96  void contextualMenu(const QPoint &);
97  void dateRangeChanged();
98  void showDetails();
99  void copyAddress();
100  void editLabel();
101  void copyLabel();
102  void copyAssetName();
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();
111 
112 Q_SIGNALS:
113  void doubleClicked(const QModelIndex&);
114 
116  void message(const QString &title, const QString &message, unsigned int style);
117 
118 public Q_SLOTS:
119  void chooseDate(int idx);
120  void chooseType(int idx);
121  void chooseWatchonly(int idx);
122  void changedAmount();
123  void changedAssetName();
124  void changedPrefix();
125  void exportClicked();
126  void focusTransaction(const QModelIndex&);
127 
128 };
129 
130 #endif // RAVEN_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 &)
QLineEdit * assetNameWidget
QTableView * transactionView
void chooseWatchonly(int idx)
QDateTimeEdit * dateTo
const char * url
Definition: rpcconsole.cpp:65
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:167
void updateWatchOnlyColumn(bool fHaveWatchOnly)
TransactionFilterProxy * transactionProxyModel
QComboBox * watchOnlyWidget
void chooseDate(int idx)
void setModel(WalletModel *model)
QLineEdit * amountWidget
QComboBox * typeWidget
Filter the transaction list according to pre-specified rules.
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
QFrame * dateRangeWidget
QLineEdit * addressWidget
void contextualMenu(const QPoint &)
void chooseType(int idx)
QAction * bumpFeeAction
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
QDateTimeEdit * dateFrom
void doubleClicked(const QModelIndex &)
WalletModel * model
QComboBox * dateWidget