1 #ifndef SUPERSTAKERPAGE_H
2 #define SUPERSTAKERPAGE_H
3 
4 #include <qt/superstakerconfigdialog.h>
5 #include <qt/addsuperstakerpage.h>
6 #include <qt/delegationsstakerdialog.h>
7 #include <qt/splitutxopage.h>
8 
9 #include <QWidget>
10 #include <QModelIndex>
11 #include <QAbstractItemModel>
12 
13 class WalletModel;
14 class ClientModel;
15 class SuperStakerListWidget;
16 class PlatformStyle;
17 class QMenu;
18 
19 namespace Ui {
20 class SuperStakerPage;
21 }
22 
23 class SuperStakerPage : public QWidget
24 {
25     Q_OBJECT
26 
27 public:
28     explicit SuperStakerPage(const PlatformStyle *platformStyle, QWidget *parent = 0);
29     ~SuperStakerPage();
30 
31     void setModel(WalletModel *_model);
32     void setClientModel(ClientModel *clientModel);
33 
34 Q_SIGNALS:
35 
36 public Q_SLOTS:
37     void on_goToSplitCoinsPage();
38     void on_goToConfigSuperStakerPage();
39     void on_goToAddSuperStakerPage();
40     void on_goToDelegationsSuperStakerPage();
41     void on_currentSuperStakerChanged(QModelIndex index);
42     void on_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
43     void on_currentChanged(QModelIndex current, QModelIndex previous);
44     void on_rowsInserted(QModelIndex index, int first, int last);
45     void contextualMenu(const QPoint &);
46     void copyStekerMinFee();
47     void copyStakerName();
48     void copyStakerAddress();
49     void copyStakerWeight();
50     void copyDelegationsWeight();
51     void configSuperStaker();
52     void editStakerName();
53     void removeSuperStaker();
54     void on_configSuperStaker(const QModelIndex& index);
55     void on_addSuperStaker();
56     void on_removeSuperStaker(const QModelIndex& index);
57     void on_delegationsSuperStaker(const QModelIndex &index);
58     void on_splitCoins(const QModelIndex &index);
59     void on_restoreSuperStakers();
60 
61 private:
62     Ui::SuperStakerPage *ui;
63     SuperStakerConfigDialog* m_configSuperStakerPage;
64     AddSuperStakerPage* m_addSuperStakerPage;
65     DelegationsStakerDialog* m_delegationsSuperStakerPage;
66     SplitUTXOPage* m_splitUtxoPage;
67     WalletModel* m_model;
68     ClientModel* m_clientModel;
69     QString m_selectedSuperStakerHash;
70     const PlatformStyle *m_platformStyle;
71     QMenu *contextMenu;
72     QModelIndex indexMenu;
73     SuperStakerListWidget* m_superStakerList;
74 };
75 
76 #endif // SUPERSTAKERPAGE_H
77