2023-06-17 09:47:56 -06:00
|
|
|
// Copyright 2023 Dolphin Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
|
|
|
#include <QWidget>
|
|
|
|
|
2024-03-09 14:46:41 -07:00
|
|
|
#include "Core/AchievementManager.h"
|
|
|
|
|
2023-06-17 09:47:56 -06:00
|
|
|
class QGroupBox;
|
|
|
|
class QGridLayout;
|
|
|
|
|
|
|
|
class AchievementLeaderboardWidget final : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit AchievementLeaderboardWidget(QWidget* parent);
|
2024-03-09 14:46:41 -07:00
|
|
|
void UpdateData(bool clean_all);
|
|
|
|
void UpdateData(const std::set<AchievementManager::AchievementId>& update_ids);
|
|
|
|
void UpdateRow(AchievementManager::AchievementId leaderboard_id);
|
2023-06-17 09:47:56 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
QGroupBox* m_common_box;
|
|
|
|
QGridLayout* m_common_layout;
|
2024-03-09 14:46:41 -07:00
|
|
|
std::map<AchievementManager::AchievementId, int> m_leaderboard_order;
|
2023-06-17 09:47:56 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // USE_RETRO_ACHIEVEMENTS
|