mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-29 13:34:37 +00:00
* Adding top button option for trophy pop up * Ui fix * Clang format * improvements to trophy pr * improvements * Note: The sound will only work in QT versions * -. * Update path_util.cpp * Update path_util.cpp * centered text when using top and bottom option * Clang * trophy viewer now opens in window not fullscreen --------- Co-authored-by: DanielSvoboda <daniel.svoboda@hotmail.com>
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QApplication>
|
|
#include <QCheckBox>
|
|
#include <QDir>
|
|
#include <QDockWidget>
|
|
#include <QFileInfoList>
|
|
#include <QGraphicsBlurEffect>
|
|
#include <QHeaderView>
|
|
#include <QLabel>
|
|
#include <QMainWindow>
|
|
#include <QPushButton>
|
|
#include <QTableWidget>
|
|
#include <QTableWidgetItem>
|
|
#include <QVBoxLayout>
|
|
#include <QXmlStreamReader>
|
|
|
|
#include "common/types.h"
|
|
#include "core/file_format/trp.h"
|
|
|
|
class TrophyViewer : public QMainWindow {
|
|
Q_OBJECT
|
|
public:
|
|
explicit TrophyViewer(QString trophyPath, QString gameTrpPath);
|
|
|
|
void updateTrophyInfo();
|
|
|
|
void updateTableFilters();
|
|
void onDockClosed();
|
|
void reopenLeftDock();
|
|
|
|
private:
|
|
void PopulateTrophyWidget(QString title);
|
|
void SetTableItem(QTableWidget* parent, int row, int column, QString str);
|
|
|
|
QTabWidget* tabWidget = nullptr;
|
|
QStringList headers;
|
|
QString gameTrpPath_;
|
|
TRP trp;
|
|
QLabel* trophyInfoLabel;
|
|
QCheckBox* showEarnedCheck;
|
|
QCheckBox* showNotEarnedCheck;
|
|
QCheckBox* showHiddenCheck;
|
|
QPushButton* expandButton;
|
|
QDockWidget* trophyInfoDock;
|
|
QPushButton* reopenButton;
|
|
|
|
std::string GetTrpType(const QChar trp_) {
|
|
switch (trp_.toLatin1()) {
|
|
case 'B':
|
|
return "bronze.png";
|
|
case 'S':
|
|
return "silver.png";
|
|
case 'G':
|
|
return "gold.png";
|
|
case 'P':
|
|
return "platinum.png";
|
|
}
|
|
return "Unknown";
|
|
}
|
|
};
|