dolphin/Source/Core/DolphinQt/Achievements/AchievementsWindow.h
LillyJadeKatrin 4214c301ef Refactor AchievementsWindow::UpdateData to take a partial update parameter
UpdateData in AchievementsWindow now only updates the components being requested, massively improving the window's performance. The parameter is UpdatedItems in AchievementManager, which tracks which portions of the system have been updated for every update callback.
2024-05-01 07:04:32 -04:00

41 lines
997 B
C++

// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#ifdef USE_RETRO_ACHIEVEMENTS
#include <QDialog>
#include "Core/AchievementManager.h"
class AchievementHeaderWidget;
class AchievementLeaderboardWidget;
class AchievementSettingsWidget;
class AchievementProgressWidget;
class QDialogButtonBox;
class QTabWidget;
class UpdateCallback;
class AchievementsWindow : public QDialog
{
Q_OBJECT
public:
explicit AchievementsWindow(QWidget* parent);
void UpdateData(AchievementManager::UpdatedItems updated_items);
void ForceSettingsTab();
private:
void CreateMainLayout();
void showEvent(QShowEvent* event) override;
void ConnectWidgets();
AchievementHeaderWidget* m_header_widget;
QTabWidget* m_tab_widget;
AchievementSettingsWidget* m_settings_widget;
AchievementProgressWidget* m_progress_widget;
AchievementLeaderboardWidget* m_leaderboard_widget;
QDialogButtonBox* m_button_box;
};
#endif // USE_RETRO_ACHIEVEMENTS