Show if savedata, updates or dlc are present.
This commit is contained in:
@@ -4,17 +4,27 @@
|
||||
<context>
|
||||
<name>BackupItem</name>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="47"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p><p><span style=" font-size:10pt;">0.00 GiB</span></p></body></html></source>
|
||||
<translation></translation>
|
||||
<location filename="../../src/forms/backupitem.ui" line="58"/>
|
||||
<source><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="79"/>
|
||||
<source><p><span style=" font-size:10pt;">0.00 GiB</span></p></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="92"/>
|
||||
<source><html><head/><body><p><span style=" font-size:9pt;">[APP] [SAVE] [UPDATE] [DLC]</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="131"/>
|
||||
<source>Delete entry</source>
|
||||
<translation>Borrar entrada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="92"/>
|
||||
<location filename="../../src/forms/backupitem.ui" line="144"/>
|
||||
<source>Open folder</source>
|
||||
<translation>Abrir directorio</translation>
|
||||
</message>
|
||||
@@ -73,7 +83,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.ui" line="122"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="231"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="244"/>
|
||||
<source>Filter</source>
|
||||
<translation>Filtro</translation>
|
||||
</message>
|
||||
@@ -93,9 +103,28 @@
|
||||
<translation>Uso de disco en respaldos: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="198"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="201"/>
|
||||
<source> [GAME]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="204"/>
|
||||
<source> [SAVE]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="207"/>
|
||||
<source> [UPDATE]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="210"/>
|
||||
<source> [DLC]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> - (Launcher only)</source>
|
||||
<translation> - (Solo lanzador LiveArea)</translation>
|
||||
<translation type="vanished"> - (Solo lanzador LiveArea)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@@ -4,17 +4,31 @@
|
||||
<context>
|
||||
<name>BackupItem</name>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="47"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p><p><span style=" font-size:10pt;">0.00 GiB</span></p></body></html></source>
|
||||
<translation><html><head/><body><p><span style=" font-size:12pt; font-weight:600;">ゲーム名</span></p><p><span style=" font-size:10pt;">0.00 GiB</span></p></body></html></translation>
|
||||
<translation type="vanished"><html><head/><body><p><span style=" font-size:12pt; font-weight:600;">ゲーム名</span></p><p><span style=" font-size:10pt;">0.00 GiB</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="58"/>
|
||||
<source><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="79"/>
|
||||
<source><p><span style=" font-size:10pt;">0.00 GiB</span></p></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="92"/>
|
||||
<source><html><head/><body><p><span style=" font-size:9pt;">[APP] [SAVE] [UPDATE] [DLC]</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="131"/>
|
||||
<source>Delete entry</source>
|
||||
<translation>項目を削除する</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupitem.ui" line="92"/>
|
||||
<location filename="../../src/forms/backupitem.ui" line="144"/>
|
||||
<source>Open folder</source>
|
||||
<translation>フォルダを開く</translation>
|
||||
</message>
|
||||
@@ -73,7 +87,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.ui" line="122"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="231"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="244"/>
|
||||
<source>Filter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -93,9 +107,28 @@
|
||||
<translation>バックアップディスク使用容量: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="198"/>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="201"/>
|
||||
<source> [GAME]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="204"/>
|
||||
<source> [SAVE]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="207"/>
|
||||
<source> [UPDATE]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/forms/backupmanagerform.cpp" line="210"/>
|
||||
<source> [DLC]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source> - (Launcher only)</source>
|
||||
<translation> - (LiveArea専用)</translation>
|
||||
<translation type="vanished"> - (LiveArea専用)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@@ -25,9 +25,16 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
const QString BackupItem::nameTemplate = "<html><head/><body>"
|
||||
"<p><span style=\" font-size:12pt; font-weight:600;\">%1</span></p>"
|
||||
"<p><span style=\" font-size:10pt;\">%2</span></p>"
|
||||
const QString BackupItem::gameTemplate = "<html><head/><body>"
|
||||
"<p><span style=\" font-size:13pt; font-weight:600;\">%1</span></p>"
|
||||
"</body></html>";
|
||||
|
||||
const QString BackupItem::sizeTemplate = "<html><head/><body>"
|
||||
"<p><span style=\" font-size:10pt;\">%1</span></p>"
|
||||
"</body></html>";
|
||||
|
||||
const QString BackupItem::infoTemplate = "<html><head/><body>"
|
||||
"<p><span style=\" font-size:10pt;\"> %1</span></p>"
|
||||
"</body></html>";
|
||||
|
||||
BackupItem::BackupItem(QWidget *parent) :
|
||||
@@ -60,14 +67,16 @@ const QPixmap *BackupItem::getIconPixmap()
|
||||
return ui->itemPicture->pixmap();
|
||||
}
|
||||
|
||||
void BackupItem::setDirectory(const QString path)
|
||||
void BackupItem::setDirectory(const QString &path)
|
||||
{
|
||||
this->path = path;
|
||||
}
|
||||
|
||||
void BackupItem::setItemInfo(const QString name, const QString size)
|
||||
void BackupItem::setItemInfo(const QString &name, const QString &size, const QString &extra)
|
||||
{
|
||||
ui->itemName->setText(nameTemplate.arg(name, size));
|
||||
ui->gameLabel->setText(gameTemplate.arg(name));
|
||||
ui->sizeLabel->setText(sizeTemplate.arg(size));
|
||||
ui->infoLabel->setText(infoTemplate.arg(extra));
|
||||
}
|
||||
|
||||
int BackupItem::getIconWidth()
|
||||
@@ -75,7 +84,7 @@ int BackupItem::getIconWidth()
|
||||
return ui->itemPicture->width();
|
||||
}
|
||||
|
||||
void BackupItem::setItemIcon(const QString path, int width, bool try_dds)
|
||||
void BackupItem::setItemIcon(const QString &path, int width, bool try_dds)
|
||||
{
|
||||
ui->itemPicture->setMinimumWidth(width);
|
||||
QPixmap pixmap(path);
|
||||
|
@@ -34,9 +34,9 @@ public:
|
||||
explicit BackupItem(QWidget *parent = 0);
|
||||
~BackupItem();
|
||||
|
||||
void setItemInfo(const QString name, const QString size);
|
||||
void setItemIcon(const QString path, int width = 48, bool try_dds = false);
|
||||
void setDirectory(const QString path);
|
||||
void setItemInfo(const QString &name, const QString &size, const QString &extra);
|
||||
void setItemIcon(const QString &path, int width = 48, bool try_dds = false);
|
||||
void setDirectory(const QString &path);
|
||||
const QPixmap *getIconPixmap();
|
||||
int getIconWidth();
|
||||
|
||||
@@ -48,7 +48,9 @@ public:
|
||||
private:
|
||||
QString path;
|
||||
Ui::BackupItem *ui;
|
||||
static const QString nameTemplate;
|
||||
static const QString gameTemplate;
|
||||
static const QString sizeTemplate;
|
||||
static const QString infoTemplate;
|
||||
|
||||
signals:
|
||||
void deleteEntry(BackupItem *entry);
|
||||
|
@@ -6,10 +6,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>634</width>
|
||||
<height>86</height>
|
||||
<width>638</width>
|
||||
<height>75</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -42,12 +48,58 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="itemName">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="gameLabel">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p><p><span style=" font-size:10pt;">0.00 GiB</span></p></body></html></string>
|
||||
<string><p><span style=" font-size:12pt; font-weight:600;">Game Name</span></p></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="sizeLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>90</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><p><span style=" font-size:10pt;">0.00 GiB</span></p></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="infoLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:9pt;">[APP] [SAVE] [UPDATE] [DLC]</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
@@ -193,15 +193,28 @@ void BackupManagerForm::loadBackupListing(int index)
|
||||
connect(item, SIGNAL(deleteEntry(BackupItem*)), this, SLOT(removeEntry(BackupItem*)));
|
||||
QString size = readable_size(meta->size);
|
||||
|
||||
// check if the game data is present, else is just a LiveArea launcher
|
||||
if(sys_dir && !(QDir(base_path + QDir::separator() + "app").exists() || QDir(base_path + QDir::separator() + "game").exists())) {
|
||||
size.append(tr(" - (Launcher only)"));
|
||||
QString info;
|
||||
|
||||
// check if is listing PS Vita games
|
||||
if(index == 0) {
|
||||
if(QDir(base_path + QDir::separator() + "app").exists()) {
|
||||
info.append(tr(" [GAME]"));
|
||||
}
|
||||
if(QDir(base_path + QDir::separator() + "savedata").exists()) {
|
||||
info.append(tr(" [SAVE]"));
|
||||
}
|
||||
if(QDir(base_path + QDir::separator() + "patch").exists()) {
|
||||
info.append(tr(" [UPDATE]"));
|
||||
}
|
||||
if(QDir(base_path + QDir::separator() + "addcont").exists()) {
|
||||
info.append(tr(" [DLC]"));
|
||||
}
|
||||
}
|
||||
|
||||
item->setItemInfo(game_name, size);
|
||||
item->setItemInfo(game_name, size, info);
|
||||
item->setItemIcon(QDir(parent_path).absoluteFilePath(sys_dir ? "icon0.png" : "ICON0.PNG"), img_width, ohfi == VITA_OHFI_PSMAPP);
|
||||
item->setDirectory(obj->path + QDir::separator() + meta->name);
|
||||
item->resize(646, 75);
|
||||
item->resize(646, 68);
|
||||
|
||||
item_list << item;
|
||||
meta = meta->next_metadata;
|
||||
@@ -216,7 +229,7 @@ void BackupManagerForm::loadBackupListing(int index)
|
||||
// insert the sorted items into the table
|
||||
for(it = item_list.begin(), row = 0; it != item_list.end(); ++it, ++row) {
|
||||
ui->tableWidget->setCellWidget(row, 0, *it);
|
||||
vert_header->resizeSection(row, 75);
|
||||
vert_header->resizeSection(row, 68);
|
||||
}
|
||||
|
||||
vert_header->setUpdatesEnabled(true);
|
||||
|
Reference in New Issue
Block a user