37 lines
753 B
C
37 lines
753 B
C
|
|
#ifndef LAUNCHERWINDOW_H
|
||
|
|
#define LAUNCHERWINDOW_H
|
||
|
|
|
||
|
|
#include <QMainWindow>
|
||
|
|
#include <QPushButton>
|
||
|
|
#include <QLineEdit>
|
||
|
|
#include <QProcess>
|
||
|
|
#include <QNetworkAccessManager>
|
||
|
|
#include <QNetworkReply>
|
||
|
|
|
||
|
|
class LauncherWindow : public QMainWindow
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
LauncherWindow(QWidget *parent = nullptr);
|
||
|
|
~LauncherWindow();
|
||
|
|
|
||
|
|
private slots:
|
||
|
|
void launchMinecraft();
|
||
|
|
void openModsFolder();
|
||
|
|
void downloadMods();
|
||
|
|
void onDownloadFinished(QNetworkReply *reply);
|
||
|
|
|
||
|
|
private:
|
||
|
|
void setupUI();
|
||
|
|
QString getMinecraftPath();
|
||
|
|
|
||
|
|
QPushButton *launchButton;
|
||
|
|
QPushButton *modsFolderButton;
|
||
|
|
QPushButton *downloadModsButton;
|
||
|
|
QLineEdit *usernameLineEdit;
|
||
|
|
|
||
|
|
QNetworkAccessManager *networkManager;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // LAUNCHERWINDOW_H
|