|
|
@ -27,9 +27,8 @@ static QPixmap GetDefaultIcon(bool large) {
|
|
|
|
class GameListItem : public QStandardItem {
|
|
|
|
class GameListItem : public QStandardItem {
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
GameListItem() : QStandardItem() {}
|
|
|
|
GameListItem() = default;
|
|
|
|
GameListItem(const QString& string) : QStandardItem(string) {}
|
|
|
|
explicit GameListItem(const QString& string) : QStandardItem(string) {}
|
|
|
|
virtual ~GameListItem() override {}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -45,9 +44,8 @@ public:
|
|
|
|
static const int TitleRole = Qt::UserRole + 2;
|
|
|
|
static const int TitleRole = Qt::UserRole + 2;
|
|
|
|
static const int ProgramIdRole = Qt::UserRole + 3;
|
|
|
|
static const int ProgramIdRole = Qt::UserRole + 3;
|
|
|
|
|
|
|
|
|
|
|
|
GameListItemPath() : GameListItem() {}
|
|
|
|
GameListItemPath() = default;
|
|
|
|
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id)
|
|
|
|
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id) {
|
|
|
|
: GameListItem() {
|
|
|
|
|
|
|
|
setData(game_path, FullPathRole);
|
|
|
|
setData(game_path, FullPathRole);
|
|
|
|
setData(qulonglong(program_id), ProgramIdRole);
|
|
|
|
setData(qulonglong(program_id), ProgramIdRole);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -75,8 +73,8 @@ class GameListItemSize : public GameListItem {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
static const int SizeRole = Qt::UserRole + 1;
|
|
|
|
static const int SizeRole = Qt::UserRole + 1;
|
|
|
|
|
|
|
|
|
|
|
|
GameListItemSize() : GameListItem() {}
|
|
|
|
GameListItemSize() = default;
|
|
|
|
GameListItemSize(const qulonglong size_bytes) : GameListItem() {
|
|
|
|
explicit GameListItemSize(const qulonglong size_bytes) {
|
|
|
|
setData(size_bytes, SizeRole);
|
|
|
|
setData(size_bytes, SizeRole);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|