Dash Core  0.12.2.1
P2P Digital Currency
transactionview.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 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 QItemSelectionModel;
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 
41  // Date ranges for filter
42  enum DateEnum
43  {
44  All,
51  };
52 
53  enum ColumnWidths {
60  };
61 
62 private:
65  QTableView *transactionView;
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 
110  void trxAmount(QString amount);
111 
112 public Q_SLOTS:
113  void chooseDate(int idx);
114  void chooseType(int idx);
115  void chooseWatchonly(int idx);
116  void changedPrefix(const QString &prefix);
117  void changedAmount(const QString &amount);
118  void exportClicked();
119  void focusTransaction(const QModelIndex&);
120  void computeSum();
121 };
122 
123 #endif // BITCOIN_QT_TRANSACTIONVIEW_H
QWidget * createDateRangeWidget()
void updateWatchOnlyColumn(bool fHaveWatchOnly)
QComboBox * typeWidget
bool eventFilter(QObject *obj, QEvent *event)
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=0)
QTableView * transactionView
void focusTransaction(const QModelIndex &)
void chooseWatchonly(int idx)
const char * prefix
Definition: rest.cpp:600
QComboBox * watchOnlyWidget
QAction * abandonAction
void setModel(WalletModel *model)
void changedAmount(const QString &amount)
void message(const QString &title, const QString &message, unsigned int style)
QDateTimeEdit * dateFrom
TransactionFilterProxy * transactionProxyModel
const char * url
Definition: rpcconsole.cpp:62
void changedPrefix(const QString &prefix)
void openThirdPartyTxUrl(QString url)
QComboBox * dateWidget
void doubleClicked(const QModelIndex &)
void contextualMenu(const QPoint &)
QDateTimeEdit * dateTo
void chooseDate(int idx)
QLineEdit * addressWidget
QFrame * dateRangeWidget
QSignalMapper * mapperThirdPartyTxUrls
void chooseType(int idx)
virtual void resizeEvent(QResizeEvent *event)
void trxAmount(QString amount)
QLineEdit * amountWidget
WalletModel * model
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer