-
Notifications
You must be signed in to change notification settings - Fork 6
/
accountpage.h
107 lines (83 loc) · 1.89 KB
/
accountpage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#ifndef ACCOUNTPAGE_H
#define ACCOUNTPAGE_H
#include <QWidget>
#include <QMap>
#include <QTableWidgetItem>
#include <QToolButton>
#include <QLabel>
#include "accountcellwidget.h"
namespace Ui {
class AccountPage;
}
class AccountDetailWidget;
class WaitingPage;
class AccountPage;
class AddressWidget : public QWidget
{
Q_OBJECT
public:
AddressWidget();
~AddressWidget(){};
void setAddress(const QString& address);
public slots:
void copyBtnClicked();
private:
QLabel* addressLabel;
QToolButton* copyBtn;
QString _address;
};
class OperationsWidget : public QWidget
{
Q_OBJECT
public:
OperationsWidget(AccountPage* page);
~OperationsWidget(){};
void setAccountName(const QString& account);
public slots:
void deleteBtnClicked();
void exportBtnClicked();
private:
AccountPage* accountPage;
QToolButton* deleteBtn;
QToolButton* exportBtn;
QString accountName;
};
class AccountPage : public QWidget
{
Q_OBJECT
public:
explicit AccountPage(QWidget *parent = 0);
~AccountPage();
void updateAccountList();
void retranslator(QString language);
void renameAccount(QString name);
void deleteAccount(QString name);
void refreshPage();
private:
void updateAccountCountLabel();
void paintEvent(QPaintEvent*);
signals:
void openAccountPage(QString);
void showShadowWidget();
void hideShadowWidget();
void showUpgradePage(QString);
void showApplyDelegatePage(QString);
void showTransferPage(QString);
void refreshAccountInfo();
private slots:
void addAccount();
void importAccount();
void on_addAccountBtn_clicked();
void on_accountTableWidget_cellClicked(int row, int column);
void showExportDialog(QString name);
void showDetailWidget(QString name);
void hideDetailWidget();
private:
Ui::AccountPage *ui;
bool hasDelegateOrNot;
bool detailOrNot;
QString newAccountName;
AccountDetailWidget* detailWidget;
QList<QString> accountNameList;
};
#endif // ACCOUNTPAGE_H