added Autosave string for SavegameWidget

This commit is contained in:
Rafael 2016-10-19 16:44:57 +02:00
parent cea28ac5e2
commit 33359448c5
3 changed files with 8 additions and 6 deletions

View file

@ -54,7 +54,8 @@ SavegameWidget::SavegameWidget(QWidget *parent) :
highlightBackColor = palette.highlight().color(); highlightBackColor = palette.highlight().color();
highlightTextColor = palette.highlightedText().color(); highlightTextColor = palette.highlightedText().color();
labelStr = tr("SAVE %3 - %1<br>%2"); labelAutosaveStr = tr("AUTOSAVE - %1<br>%2");
labelSaveStr = tr("SAVE %3 - %1<br>%2");
sgdPath = ""; sgdPath = "";
sgdStr = ""; sgdStr = "";
sgdata = 0; sgdata = 0;
@ -104,16 +105,16 @@ void SavegameWidget::setSavegameData(SavegameData *savegame, QString savegamePat
{ {
if (savegameNumber == 16) if (savegameNumber == 16)
{ {
ui->labSavegameStr->setText(labelStr.arg(savegameDate, savegameName, tr("AUTO"))); ui->labSavegameStr->setText(labelAutosaveStr.arg(savegameDate, savegameName));
} }
else else
{ {
ui->labSavegameStr->setText(labelStr.arg(savegameDate, savegameName, QString::number(savegameNumber))); ui->labSavegameStr->setText(labelSaveStr.arg(savegameDate, savegameName, QString::number(savegameNumber)));
} }
} }
else else
{ {
ui->labSavegameStr->setText(labelStr.arg(savegameDate, savegameName, tr("UNKNOWN"))); ui->labSavegameStr->setText(labelSaveStr.arg(savegameDate, savegameName, tr("UNKNOWN")));
} }
sgdStr = savegameString; sgdStr = savegameString;
sgdPath = savegamePath; sgdPath = savegamePath;

View file

@ -66,7 +66,8 @@ private:
SavegameData *sgdata; SavegameData *sgdata;
QColor highlightBackColor; QColor highlightBackColor;
QColor highlightTextColor; QColor highlightTextColor;
QString labelStr; QString labelAutosaveStr;
QString labelSaveStr;
QString sgdPath; QString sgdPath;
QString sgdStr; QString sgdStr;

View file

@ -64,7 +64,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>SAVE - %1&lt;br&gt;%2</string> <string>SAVE %3 - %1&lt;br&gt;%2</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>