Dogecoin Core  1.14.2
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 "guiutil.h"
9 
10 #include <QWidget>
11 #include <QKeyEvent>
12 
13 class PlatformStyle;
15 class WalletModel;
16 
17 QT_BEGIN_NAMESPACE
18 class QComboBox;
19 class QDateTimeEdit;
20 class QFrame;
21 class QLineEdit;
22 class QMenu;
23 class QModelIndex;
24 class QSignalMapper;
25 class QTableView;
26 QT_END_NAMESPACE
27 
31 class TransactionView : public QWidget
32 {
33  Q_OBJECT
34 
35 public:
36  explicit TransactionView(const PlatformStyle *platformStyle, QWidget *parent = 0);
37 
38  void setModel(WalletModel *model);
39 
40  // Date ranges for filter
41  enum DateEnum
42  {
43  All,
49  Range
50  };
51 
52  enum ColumnWidths {
59  };
60 
61 private:
64  QTableView *transactionView;
65 
66  QComboBox *dateWidget;
67  QComboBox *typeWidget;
68  QComboBox *watchOnlyWidget;
69  QLineEdit *addressWidget;
70  QLineEdit *amountWidget;
71 
72  QMenu *contextMenu;
73  QSignalMapper *mapperThirdPartyTxUrls;
74 
75  QFrame *dateRangeWidget;
76  QDateTimeEdit *dateFrom;
77  QDateTimeEdit *dateTo;
78  QAction *abandonAction;
79 
80  QWidget *createDateRangeWidget();
81 
83 
84  virtual void resizeEvent(QResizeEvent* event);
85 
86  bool eventFilter(QObject *obj, QEvent *event);
87 
88 private Q_SLOTS:
89  void contextualMenu(const QPoint &);
90  void dateRangeChanged();
91  void showDetails();
92  void copyAddress();
93  void editLabel();
94  void copyLabel();
95  void copyAmount();
96  void copyTxID();
97  void copyTxHex();
98  void copyTxPlainText();
99  void openThirdPartyTxUrl(QString url);
100  void updateWatchOnlyColumn(bool fHaveWatchOnly);
101  void abandonTx();
102 
103 Q_SIGNALS:
104  void doubleClicked(const QModelIndex&);
105 
107  void message(const QString &title, const QString &message, unsigned int style);
108 
109 public Q_SLOTS:
110  void chooseDate(int idx);
111  void chooseType(int idx);
112  void chooseWatchonly(int idx);
113  void changedPrefix(const QString &prefix);
114  void changedAmount(const QString &amount);
115  void exportClicked();
116  void focusTransaction(const QModelIndex&);
117 
118 };
119 
120 #endif // BITCOIN_QT_TRANSACTIONVIEW_H
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:149
Filter the transaction list according to pre-specified rules.
Widget showing the transaction list for a wallet, including a filter row.
void changedAmount(const QString &amount)
WalletModel * model
bool eventFilter(QObject *obj, QEvent *event)
void chooseWatchonly(int idx)
QComboBox * typeWidget
QDateTimeEdit * dateFrom
QLineEdit * addressWidget
QWidget * createDateRangeWidget()
QSignalMapper * mapperThirdPartyTxUrls
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)
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=0)
virtual void resizeEvent(QResizeEvent *event)
QComboBox * watchOnlyWidget
QAction * abandonAction
QFrame * dateRangeWidget
QDateTimeEdit * dateTo
TransactionFilterProxy * transactionProxyModel
QTableView * transactionView
void focusTransaction(const QModelIndex &)
void chooseDate(int idx)
void contextualMenu(const QPoint &)
void changedPrefix(const QString &prefix)
QComboBox * dateWidget
void openThirdPartyTxUrl(QString url)
void doubleClicked(const QModelIndex &)
QLineEdit * amountWidget
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:99
const char * prefix
Definition: rest.cpp:605
const char * url
Definition: rpcconsole.cpp:57