2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-03-12 00:39:20 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "core/frontend/applets/error.h"
|
|
|
|
|
|
|
|
class GMainWindow;
|
|
|
|
|
|
|
|
class QtErrorDisplay final : public QObject, public Core::Frontend::ErrorApplet {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QtErrorDisplay(GMainWindow& parent);
|
|
|
|
~QtErrorDisplay() override;
|
|
|
|
|
2023-03-25 18:29:08 +01:00
|
|
|
void Close() const override;
|
2022-12-06 00:56:47 +01:00
|
|
|
void ShowError(Result error, FinishedCallback finished) const override;
|
2022-06-26 05:44:19 +02:00
|
|
|
void ShowErrorWithTimestamp(Result error, std::chrono::seconds time,
|
2022-12-06 00:56:47 +01:00
|
|
|
FinishedCallback finished) const override;
|
2022-06-26 05:44:19 +02:00
|
|
|
void ShowCustomErrorText(Result error, std::string dialog_text, std::string fullscreen_text,
|
2022-12-06 00:56:47 +01:00
|
|
|
FinishedCallback finished) const override;
|
2019-03-12 00:39:20 +01:00
|
|
|
|
|
|
|
signals:
|
2021-03-26 11:07:27 +01:00
|
|
|
void MainWindowDisplayError(QString error_code, QString error_text) const;
|
2023-03-25 18:29:08 +01:00
|
|
|
void MainWindowRequestExit() const;
|
2019-03-12 00:39:20 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
void MainWindowFinishedError();
|
|
|
|
|
2022-12-06 00:56:47 +01:00
|
|
|
mutable FinishedCallback callback;
|
2019-03-12 00:39:20 +01:00
|
|
|
};
|