forked from palindromiq/YATE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yatewindow.h
135 lines (97 loc) · 2.72 KB
/
yatewindow.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
#ifndef YATEWINDOW_H
#define YATEWINDOW_H
#include <QMainWindow>
#include <QFile>
#include <QDir>
#include <QString>
#include <QAtomicInt>
#include <QSystemTrayIcon>
#include "globals.h"
QT_BEGIN_NAMESPACE
namespace Ui { class YATEWindow; }
class QAction;
QT_END_NAMESPACE
namespace Yate {
class SettingsDialog;
class LiveFeedbackOverlay;
class AnalysisWindow;
class EEParser;
class HuntInfoGenerator;
class DiscordManager;
class YATEWindow : public QMainWindow
{
Q_OBJECT
public:
YATEWindow(QString codeURI = "", QWidget *parent = nullptr);
~YATEWindow();
bool isLogManuallySet() const;
void setIsLogManuallySet(bool newIsLogManuallySet);
void showLiveFeedback(bool lock);
void showClientLiveFeedback(bool lock);
protected:
void changeEvent(QEvent* e);
private slots:
void on_btnSettings_clicked();
void on_btnEditLogPath_clicked();
void dragEnterEvent(QDragEnterEvent *e);
void dropEvent(QDropEvent *e);
void on_btnShrineWater_clicked();
void on_btnLiveFeedback_clicked();
void showWindow();
void stopFeedback();
void iconActivated(QSystemTrayIcon::ActivationReason reason);
void exitApp();
void disableUI();
void enableUI();
void onParserStarted();
void onParserFinished();
void onParserError(QString);
void lockFeedbackWindow();
void lockClientFeedbackWindow();
void on_btnLiveFeedbackVS_clicked();
void on_btnCopyLobbyId_clicked();
void on_btnCopyLobbyLink_clicked();
public slots:
void setLogFilePath(QString path);
void onUpdaterBusy(bool busy);
void refreshDiscordSettings();
void onLobbyIdChange(QString id);
void onUserConnected(QString name);
void onDiscordVSConnectionSucceeded();
void onDiscordVSConnectionFailed();
signals:
void exitFeebackOverlay();
void checkForUpdate();
void feedbackWindowClosed();
void discordStop();
void discordStart();
void discordClearActivity();
void disconnectDiscordLobby();
private:
void createTrayIcon();
void onDiscordInviteAccepted(QString secret);
Ui::YATEWindow *ui;
QFile eeLogFile_;
SettingsDialog *settingsDialog_;
LiveFeedbackOverlay *feedbackOverlay_;
AnalysisWindow *analysisWindow_;
QSystemTrayIcon *trayIcon_;
QAction *trayShowYate_;
QAction *trayStopFeedback_;
QAction *trayQuit_;
EEParser *parser_;
HuntInfoGenerator *huntInfoGenerator_;
bool isLogManuallySet_;
bool clientVersion_;
#ifdef DISCORD_ENABLED
DiscordManager *discord_;
QThread *discordThread_;
bool discordConnected_;
#endif
QAtomicInt isLiveFeedbackRunning_;
QString codeURI_;
void initDiscord();
void establishLobbyConnection(QString lobbyId);
};
}
#endif // YATEWINDOW_H