Fabcoin Core  0.16.2
P2P Digital Currency
qrctoken.h
Go to the documentation of this file.
1 #ifndef QRCTOKEN_H
2 #define QRCTOKEN_H
3 
4 #include <sendtokenpage.h>
5 #include <receivetokenpage.h>
6 #include <addtokenpage.h>
7 
8 #include <QWidget>
9 #include <QModelIndex>
10 #include <QAbstractItemModel>
11 
12 class TokenViewDelegate;
13 class WalletModel;
14 class ClientModel;
16 class PlatformStyle;
17 class QMenu;
18 
19 namespace Ui {
20 class QRCToken;
21 }
22 
23 class QRCToken : public QWidget
24 {
25  Q_OBJECT
26 
27 public:
28  explicit QRCToken(const PlatformStyle *platformStyle, QWidget *parent = 0);
29  ~QRCToken();
30 
31  void setModel(WalletModel *_model);
32  void setClientModel(ClientModel *clientModel);
33 
34 Q_SIGNALS:
35 
36 public Q_SLOTS:
37  void on_goToSendTokenPage();
38  void on_goToReceiveTokenPage();
39  void on_goToAddTokenPage();
40  void on_currentTokenChanged(QModelIndex index);
41  void on_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
42  void on_currentChanged(QModelIndex current, QModelIndex previous);
43  void on_rowsInserted(QModelIndex index, int first, int last);
44  void contextualMenu(const QPoint &);
45  void copyTokenAddress();
46  void copyTokenBalance();
47  void copyTokenName();
48  void copySenderAddress();
49  void removeToken();
50 
51 private:
58  QAbstractItemModel* m_tokenModel;
60  QAction *m_sendAction;
61  QAction *m_receiveAction;
62  QAction *m_addTokenAction;
66  QMenu *contextMenu;
67 };
68 
69 #endif // QRCTOKEN_H
WalletModel * m_model
Definition: qrctoken.h:56
AddTokenPage * m_addTokenPage
Definition: qrctoken.h:55
QAction * m_receiveAction
Definition: qrctoken.h:61
Ui::QRCToken * ui
Definition: qrctoken.h:52
TokenTransactionView * m_tokenTransactionView
Definition: qrctoken.h:64
TokenViewDelegate * m_tokenDelegate
Definition: qrctoken.h:59
ClientModel * m_clientModel
Definition: qrctoken.h:57
QAbstractItemModel * m_tokenModel
Definition: qrctoken.h:58
SendTokenPage * m_sendTokenPage
Definition: qrctoken.h:53
QMenu * contextMenu
Definition: qrctoken.h:66
Model for Fabcoin network client.
Definition: clientmodel.h:38
QAction * m_sendAction
Definition: qrctoken.h:60
Interface to Fabcoin wallet from Qt view code.
Definition: walletmodel.h:103
QString m_selectedTokenHash
Definition: qrctoken.h:63
QAction * m_addTokenAction
Definition: qrctoken.h:62
const PlatformStyle * m_platformStyle
Definition: qrctoken.h:65
ReceiveTokenPage * m_receiveTokenPage
Definition: qrctoken.h:54