1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-01 08:27:45 +00:00
astra/launcher/include/compatibilitytoolinstaller.h

38 lines
897 B
C
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QtQml>
class LauncherCore;
class CompatibilityToolInstaller : public QObject
{
Q_OBJECT
2023-09-16 18:01:02 -04:00
QML_ELEMENT
QML_UNCREATABLE("Use LauncherCore.createCompatInstaller")
Q_PROPERTY(bool isInstalled READ isInstalled NOTIFY isInstalledChanged)
Q_PROPERTY(bool hasSteam READ hasSteam CONSTANT)
public:
2023-09-16 21:26:46 -04:00
explicit CompatibilityToolInstaller(LauncherCore &launcher, QObject *parent = nullptr);
Q_INVOKABLE void installCompatibilityTool();
Q_INVOKABLE void removeCompatibilityTool();
bool isInstalled() const;
bool hasSteam() const;
Q_SIGNALS:
void installFinished();
void error(QString message);
void removalFinished();
void isInstalledChanged();
private:
QDir steamDir() const;
LauncherCore &m_launcher;
};