55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QtNetwork/QNetworkAccessManager>
|
|
#include <QtNetwork/QNetworkRequest>
|
|
#include <QtNetwork/QNetworkReply>
|
|
#include <QIODevice>
|
|
#include <string>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
void UpdateOSAgnosticInformation();
|
|
void Install();
|
|
std::string BuildUnzipCmd();
|
|
void PreInstallMode();
|
|
void PostInstallMode();
|
|
bool ConfirmationPopup();
|
|
private slots:
|
|
void UpdateProgress(qint64, qint64);
|
|
void FinishedDownloading();
|
|
void Error(QNetworkReply::NetworkError code);
|
|
void on_install_update_button_clicked();
|
|
|
|
void on_close_launcher_clicked();
|
|
|
|
void on_changeInstallPathButton_triggered(QAction *arg1);
|
|
|
|
void on_changeInstallPathButton_clicked();
|
|
|
|
void on_sf_dl_server_textChanged();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
QNetworkAccessManager* net = nullptr;
|
|
QUrl downloadUrl {"https://www.techyjessy.tech/downloads/mods.zip"};
|
|
QString modsDir = "Set .minecraft path here...";
|
|
QString downloadLocation;
|
|
QNetworkReply* reply = nullptr;
|
|
|
|
bool isLinux = true;
|
|
};
|
|
#endif // MAINWINDOW_H
|