diff options
Diffstat (limited to 'src/yuzu/loading_screen.h')
-rw-r--r-- | src/yuzu/loading_screen.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h index 9370ede69..091e58eb7 100644 --- a/src/yuzu/loading_screen.h +++ b/src/yuzu/loading_screen.h @@ -27,7 +27,9 @@ enum class LoadCallbackStage; class QBuffer; class QByteArray; +class QGraphicsOpacityEffect; class QMovie; +class QPropertyAnimation; class LoadingScreen : public QWidget { Q_OBJECT @@ -45,14 +47,21 @@ public: /// used resources such as the logo and banner. void Clear(); + /// Slot used to update the status of the progress bar void OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total); + /// Hides the LoadingScreen with a fade out effect + void OnLoadComplete(); + // In order to use a custom widget with a stylesheet, you need to override the paintEvent // See https://wiki.qt.io/How_to_Change_the_Background_Color_of_QWidget void paintEvent(QPaintEvent* event) override; signals: void LoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total); + /// Signals that this widget is completely hidden now and should be replaced with the other + /// widget + void Hidden(); private: #ifndef YUZU_QT_MOVIE_MISSING @@ -64,6 +73,9 @@ private: std::size_t previous_total = 0; VideoCore::LoadCallbackStage previous_stage; + QGraphicsOpacityEffect* opacity_effect = nullptr; + std::unique_ptr<QPropertyAnimation> fadeout_animation = nullptr; + // Definitions for the differences in text and styling for each stage std::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style; std::unordered_map<VideoCore::LoadCallbackStage, QString> stage_translations; |