mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-24 19:36:17 +00:00
Trophy Viewer - Select Game (#2678)
* Trophy Viewer - Select Game * TR - Button in Utils +icon TR - Button in Utils +icon I also made a small correction to the game folder list, where the checkboxes were being filled in incorrectly.
This commit is contained in:
parent
4f8e5dfd7c
commit
16a68d78eb
10 changed files with 193 additions and 14 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QDir>
|
||||
#include <QDockWidget>
|
||||
#include <QFileInfoList>
|
||||
|
@ -12,26 +13,38 @@
|
|||
#include <QHeaderView>
|
||||
#include <QLabel>
|
||||
#include <QMainWindow>
|
||||
#include <QPair>
|
||||
#include <QPushButton>
|
||||
#include <QTableWidget>
|
||||
#include <QTableWidgetItem>
|
||||
#include <QVBoxLayout>
|
||||
#include <QVector>
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include "common/types.h"
|
||||
#include "core/file_format/trp.h"
|
||||
|
||||
struct TrophyGameInfo {
|
||||
QString name;
|
||||
QString trophyPath;
|
||||
QString gameTrpPath;
|
||||
};
|
||||
|
||||
class TrophyViewer : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TrophyViewer(QString trophyPath, QString gameTrpPath);
|
||||
explicit TrophyViewer(
|
||||
QString trophyPath, QString gameTrpPath, QString gameName = "",
|
||||
const QVector<TrophyGameInfo>& allTrophyGames = QVector<TrophyGameInfo>());
|
||||
|
||||
void updateTrophyInfo();
|
||||
|
||||
void updateTableFilters();
|
||||
void onDockClosed();
|
||||
void reopenLeftDock();
|
||||
|
||||
private slots:
|
||||
void onGameSelectionChanged(int index);
|
||||
|
||||
private:
|
||||
void PopulateTrophyWidget(QString title);
|
||||
void SetTableItem(QTableWidget* parent, int row, int column, QString str);
|
||||
|
@ -39,14 +52,17 @@ private:
|
|||
QTabWidget* tabWidget = nullptr;
|
||||
QStringList headers;
|
||||
QString gameTrpPath_;
|
||||
QString currentGameName_;
|
||||
TRP trp;
|
||||
QLabel* trophyInfoLabel;
|
||||
QCheckBox* showEarnedCheck;
|
||||
QCheckBox* showNotEarnedCheck;
|
||||
QCheckBox* showHiddenCheck;
|
||||
QComboBox* gameSelectionComboBox;
|
||||
QPushButton* expandButton;
|
||||
QDockWidget* trophyInfoDock;
|
||||
QPushButton* reopenButton;
|
||||
QVector<TrophyGameInfo> allTrophyGames_;
|
||||
|
||||
std::string GetTrpType(const QChar trp_) {
|
||||
switch (trp_.toLatin1()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue