-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.h
71 lines (64 loc) · 1.89 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPushButton>
#include <QTabWidget>
#include <QMessageBox>
#include <QButtonGroup>
#include <QMouseEvent>
#include <QResizeEvent>
#include <QCursor>
#include <QFileDialog>
#include <QSettings>
#include <QWebEngineView>
#include "overlaywidget.h"
#include "csteammanager.h"
#include "steam_api.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void OnUpdate();
void OnCloseBtnClick();
void OnMaxmizeBtnClick();
void OnPageBtnClick(int idx);
void OnVisibilityBtnClick(int idx);
void OnModPathBtnClick();
void OnUploadBtnClick();
void OnPerviewPathBtnClick();
//Steam回调
void OnItemCreateFail(EResult m_eResult);
void OnItemCreateSuccess(EResult m_eResult, PublishedFileId_t m_nPublishedFileId);
void OnItemSubmitFail(EResult m_eResult);
void OnItemSubmitSuccess(EResult m_eResult, PublishedFileId_t m_nPublishedFileId);
void OnBeginUpdateItem(UGCUpdateHandle_t handle);
void OnCallApiFail(const QString& apiName);
private:
Ui::MainWindow *ui;
QButtonGroup* m_LeftBtnGroup;
QButtonGroup* m_VisibilityGroup;
LoadingOverlay* m_UploadingMask;
QPoint m_PrevPos;
QTimer* m_UpdateTimer;
UGCUpdateHandle_t m_uploadHandle;
private:
void resizeEvent(QResizeEvent* event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void SubmitMod(PublishedFileId_t modId);
void SaveModSettings(PublishedFileId_t modId);
void LoadModSettings();
void InitPageButtons();
void InitVisibilityButtons();
void CheckSteamInit();
void HideUploadMask();
bool IsUploading();
QString GetUploadProgressText(EItemUpdateStatus status, uint64 bytesDone, uint64 bytesTotal);
};
#endif // MAINWINDOW_H