mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 04:37:46 +00:00
This removes the separate "download new game" page and rolls in into the main profile setup. Also adds a feature to install the game from an existing executable, in the event the official servers are down or missing. Also shifts around some of the buttons and text.
35 lines
No EOL
800 B
C++
35 lines
No EOL
800 B
C++
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QtQml/qqmlregistration.h>
|
|
|
|
class LauncherCore;
|
|
class Profile;
|
|
|
|
class GameInstaller : public QObject
|
|
{
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
QML_UNCREATABLE("Use LauncherCore.createInstaller")
|
|
|
|
public:
|
|
GameInstaller(LauncherCore &launcher, Profile &profile, QObject *parent = nullptr);
|
|
GameInstaller(LauncherCore &launcher, Profile &profile, const QString &filePath, QObject *parent = nullptr);
|
|
|
|
Q_INVOKABLE void start();
|
|
|
|
Q_SIGNALS:
|
|
void installFinished();
|
|
void error(QString message);
|
|
|
|
private:
|
|
void installGame();
|
|
|
|
LauncherCore &m_launcher;
|
|
Profile &m_profile;
|
|
QString m_localInstallerPath;
|
|
}; |