Fabcoin Core  0.16.2
P2P Digital Currency
tokentransactionview.h
Go to the documentation of this file.
1 #ifndef TOKENVIEW_H
2 #define TOKENVIEW_H
3 
4 #include <guiutil.h>
5 
6 #include <QWidget>
7 #include <QKeyEvent>
8 
9 class PlatformStyle;
10 class TokenFilterProxy;
11 class WalletModel;
12 
13 QT_BEGIN_NAMESPACE
14 class QComboBox;
15 class QDateTimeEdit;
16 class QLineEdit;
17 class QMenu;
18 class QTableView;
19 QT_END_NAMESPACE
20 
21 class TokenTransactionView : public QWidget
22 {
23  Q_OBJECT
24 public:
25  explicit TokenTransactionView(const PlatformStyle *platformStyle, QWidget *parent = 0);
26 
27  void setModel(WalletModel *model);
28 
29  // Date ranges for filter
30  enum DateEnum
31  {
32  All,
39  };
40 
41  enum ColumnWidths {
49  };
50 
51 private:
54  QTableView *tokenView;
55 
56  QComboBox *dateWidget;
57  QComboBox *typeWidget;
58  QComboBox *nameWidget;
59  QLineEdit *addressWidget;
60  QLineEdit *amountWidget;
61 
62  QMenu *contextMenu;
63 
64  QFrame *dateRangeWidget;
65  QDateTimeEdit *dateFrom;
66  QDateTimeEdit *dateTo;
67 
68  QWidget *createDateRangeWidget();
69 
71 
72  virtual void resizeEvent(QResizeEvent* event);
73  bool eventFilter(QObject *obj, QEvent *event);
74 
75 private Q_SLOTS:
76  void contextualMenu(const QPoint &);
77  void dateRangeChanged();
78  void showDetails();
79  void copyAddress();
80  void copyAmount();
81  void copyTxID();
82  void copyTxPlainText();
83 
84 Q_SIGNALS:
85 
86 public Q_SLOTS:
87  void chooseDate(int idx);
88  void chooseType(int idx);
89  void chooseName(int idx);
90  void changedPrefix(const QString &prefix);
91  void changedAmount(const QString &amount);
92  void addToNameWidget(const QModelIndex& parent, int start, int /*end*/);
93  void removeFromNameWidget(const QModelIndex& parent, int start, int /*end*/);
94  void refreshNameWidget();
95 };
96 
97 #endif // TOKENVIEW_H
void setModel(WalletModel *model)
const char * prefix
Definition: rest.cpp:623
void changedAmount(const QString &amount)
void contextualMenu(const QPoint &)
TokenTransactionView(const PlatformStyle *platformStyle, QWidget *parent=0)
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:158
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
bool eventFilter(QObject *obj, QEvent *event)
void addToNameWidget(const QModelIndex &parent, int start, int)
virtual void resizeEvent(QResizeEvent *event)
Interface to Fabcoin wallet from Qt view code.
Definition: walletmodel.h:103
void removeFromNameWidget(const QModelIndex &parent, int start, int)
void changedPrefix(const QString &prefix)
TokenFilterProxy * tokenProxyModel