From 76452cd5b3bfd71ebc17ec8da4c593cdd5ee6d0e Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 11 Mar 2019 19:39:20 -0400 Subject: qt: Add dialog implementation of Error applet --- src/yuzu/applets/error.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/yuzu/applets/error.h (limited to 'src/yuzu/applets/error.h') diff --git a/src/yuzu/applets/error.h b/src/yuzu/applets/error.h new file mode 100644 index 000000000..b0932d895 --- /dev/null +++ b/src/yuzu/applets/error.h @@ -0,0 +1,33 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include + +#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; + + void ShowError(ResultCode error, std::function finished) const override; + void ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time, + std::function finished) const override; + void ShowCustomErrorText(ResultCode error, std::string dialog_text, std::string fullscreen_text, + std::function finished) const override; + +signals: + void MainWindowDisplayError(QString error) const; + +private: + void MainWindowFinishedError(); + + mutable std::function callback; +}; -- cgit v1.2.3