2022-04-23 08:59:50 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-03-11 23:39:20 +00: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 17:29:08 +00:00
|
|
|
void Close() const override;
|
2022-12-05 23:56:47 +00:00
|
|
|
void ShowError(Result error, FinishedCallback finished) const override;
|
2022-06-26 03:44:19 +00:00
|
|
|
void ShowErrorWithTimestamp(Result error, std::chrono::seconds time,
|
2022-12-05 23:56:47 +00:00
|
|
|
FinishedCallback finished) const override;
|
2022-06-26 03:44:19 +00:00
|
|
|
void ShowCustomErrorText(Result error, std::string dialog_text, std::string fullscreen_text,
|
2022-12-05 23:56:47 +00:00
|
|
|
FinishedCallback finished) const override;
|
2019-03-11 23:39:20 +00:00
|
|
|
|
|
|
|
signals:
|
2021-03-26 10:07:27 +00:00
|
|
|
void MainWindowDisplayError(QString error_code, QString error_text) const;
|
2023-03-25 17:29:08 +00:00
|
|
|
void MainWindowRequestExit() const;
|
2019-03-11 23:39:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void MainWindowFinishedError();
|
|
|
|
|
2022-12-05 23:56:47 +00:00
|
|
|
mutable FinishedCallback callback;
|
2019-03-11 23:39:20 +00:00
|
|
|
};
|