-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframe.h
149 lines (123 loc) · 3.55 KB
/
frame.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#ifndef FRAME_H
#define FRAME_H
#include <QFrame>
#include <QWidget>
#include <QMap>
#include <QTranslator>
#include <QSystemTrayIcon>
#include "windows.h"
namespace Ui {
class Frame;
}
class FirstLogin;
class NormalLogin;
class MainPage;
class AccountPage;
class TransferPage;
class BottomBar;
class LockPage;
class TitleBar;
class QMenu;
class WaitingForSync;
class FunctionBar;
class ContactPage;
class ApplyDelegatePage;
class SelectWalletPathWidget;
class ShowBottomBarWidget;
class ShadowWidget;
class AssetPage;
class MarketPage;
class Frame:public QFrame
{
Q_OBJECT
public:
Frame();
~Frame();
protected:
void mousePressEvent(QMouseEvent*event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *);
public slots:
void refreshAccountInfo();
void refresh();
void autoRefresh();
void shadowWidgetShow();
void shadowWidgetHide();
void goopalStarted();
void setLanguage(QString);
void syncFinished();
signals:
void started();
void delegateListUpdated();
private slots:
void alreadyLogin();
void showAccountPage(QString);
void showTransferPage(QString);
void showLockPage();
void autoLock();
void unlock();
void updateTimer();
void settingSaved();
void privateKeyImported();
void jsonDataUpdated(QString id);
void showMainPage();
void showAssetPage();
void showTransferPage();
void showMarketPage();
void showContactPage();
void showTransferPageWithAddress(QString,QString);
void showWaittingForSyncWidget();
void iconIsActived(QSystemTrayIcon::ActivationReason reason);
void showNormalAndActive();
void scan();
void newAccount(QString name);
void updateAssets();
void onSlowTimer();
private:
bool mouse_press;
QPoint move_point;
SelectWalletPathWidget* selectWalletPathWidget;
FirstLogin* firstLogin;
NormalLogin* normalLogin;
MainPage* mainPage;
AccountPage* accountPage;
AssetPage* assetPage;
TransferPage* transferPage;
MarketPage* marketPage;
BottomBar* bottomBar;
QWidget* centralWidget;
LockPage* lockPage;
QTimer* timer;
TitleBar* titleBar;
QString lastPage;
QString currentAccount;
WaitingForSync* waitingForSync;
int currentPageNum; // 0:mainPage 1:accountPage 2:delegatePgae 3:transferPage 4:contactPage
// 6: 7:upgradePage 8: assetPage 9: marketPage
ShadowWidget* shadowWidget;
QSystemTrayIcon* trayIcon;
void createTrayIconActions();
void createTrayIcon();
QAction *minimizeAction;
QAction *restoreAction;
QAction *quitAction;
QMenu *trayIconMenu;
// ShowBottomBarWidget* showBottomBarWidget;
RECT rtConfined; // 由于定义了 framelesswindowhint 为了不让鼠标拖动时能移到任务栏下
RECT rtDefault;
void getAccountInfo();
void startTimerForAutoRefresh(); // 自动刷新
QTimer* timerForAutoRefresh;
FunctionBar* functionBar;
void closeCurrentPage();
bool eventFilter(QObject *watched, QEvent *e);
void closeEvent(QCloseEvent* e);
void init();
ContactPage* contactPage;
QTranslator translator; // 选择语言
QTranslator menuTranslator; // 右键菜单语言
QTranslator translatorForTextBrowser; // QTextBrowser的右键菜单翻译
bool needToRefresh;
QTimer* slowTimer;
};
#endif // FRAME_H