diff --git a/PictureDialog.cpp b/PictureDialog.cpp
index 1432f62..0868b7c 100755
--- a/PictureDialog.cpp
+++ b/PictureDialog.cpp
@@ -82,12 +82,15 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, CrewDatabase *crewDB, Q
smpic = 0;
// Avatar area
- avatarPreviewImage = QImage();
avatarAreaPicture = QImage(":/img/avatararea.png");
avatarLocX = 145;
avatarLocY = 66;
avatarSize = 470;
+ // Overlay area
+ renderOverlayPicture();
+ overlayenabled = 1;
+
// Export menu
exportMenu = new QMenu(this);
jpegExportAction = exportMenu->addAction(tr("Export as &JPG picture..."), this, SLOT(exportSnapmaticPicture()));
@@ -211,7 +214,7 @@ bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
ui->cmdExport->click();
returnValue = true;
break;
- case Qt::Key_A:
+ case Qt::Key_1:
if (previewmode)
{
previewmode = false;
@@ -223,6 +226,18 @@ bool PictureDialog::eventFilter(QObject *obj, QEvent *ev)
renderPicture();
}
break;
+ case Qt::Key_2:
+ if (overlayenabled)
+ {
+ overlayenabled = false;
+ if (!previewmode) renderPicture();
+ }
+ else
+ {
+ overlayenabled = true;
+ if (!previewmode) renderPicture();
+ }
+ break;
#if QT_VERSION >= 0x050300
case Qt::Key_Exit:
ui->cmdClose->click();
@@ -270,6 +285,61 @@ void PictureDialog::dialogPreviousPictureRequested()
emit previousPictureRequested();
}
+void PictureDialog::renderOverlayPicture()
+{
+ // Generating Overlay Preview
+ QRect preferedRect = QRect(0, 0, 200, 160);
+ QString overlayText = tr("Key 1 - Avatar Preview Mode\nKey 2 - Toggle Overlay\nArrow Keys - Navigate");
+ QPixmap overlayPixmap(1, 1);
+ overlayPixmap.fill(Qt::transparent);
+
+ QPainter overlayPainter(&overlayPixmap);
+ QFont overlayPainterFont;
+ overlayPainterFont.setPixelSize(12);
+ overlayPainter.setFont(overlayPainterFont);
+ QRect overlaySpace = overlayPainter.boundingRect(preferedRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextDontClip | Qt::TextWordWrap, overlayText);
+ overlayPainter.end();
+
+ int hOverlay = Qt::AlignTop;
+ if (overlaySpace.height() < 74)
+ {
+ hOverlay = Qt::AlignVCenter;
+ preferedRect.setHeight(71);
+ overlaySpace.setHeight(80);
+ }
+ else
+ {
+ overlaySpace.setHeight(overlaySpace.height() + 6);
+ }
+
+ overlayPixmap = overlayPixmap.scaled(overlaySpace.size());
+ overlayPainter.begin(&overlayPixmap);
+ overlayPainter.setPen(QColor::fromRgb(255, 255, 255, 255));
+ overlayPainter.setFont(overlayPainterFont);
+ overlayPainter.drawText(preferedRect, Qt::AlignLeft | hOverlay | Qt::TextDontClip | Qt::TextWordWrap, overlayText);
+ overlayPainter.end();
+
+ if (overlaySpace.width() < 194)
+ {
+ overlaySpace.setWidth(200);
+ }
+ else
+ {
+ overlaySpace.setWidth(overlaySpace.width() + 6);
+ }
+
+ QPixmap overlayBorderImage(overlaySpace.width(), overlaySpace.height());
+ overlayBorderImage.fill(QColor(15, 15, 15, 162));
+
+ QPixmap overlayTempPixmap(overlaySpace.size());
+ overlayTempPixmap.fill(Qt::transparent);
+ QPainter overlayTempPainter(&overlayTempPixmap);
+ overlayTempPainter.drawPixmap(0, 0, overlayBorderImage);
+ overlayTempPainter.drawPixmap(3, 3, overlayPixmap);
+ overlayTempPainter.end();
+ overlayTempImage = overlayTempPixmap.toImage();
+}
+
void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture, QString picturePath, bool readOk, bool _indexed, int _index)
{
snapmaticPicture = QImage();
@@ -285,16 +355,6 @@ void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture, QString pictu
if (picture->isPicOk())
{
snapmaticPicture = picture->getPicture();
-
- // Generating Avatar Preview
- QPixmap finalPixmap(960, 536);
- QPainter snapPainter(&finalPixmap);
- snapPainter.drawImage(0, 0, snapmaticPicture);
- snapPainter.drawImage(0, 0, avatarAreaPicture);
- snapPainter.setPen(QColor::fromRgb(255, 255, 255, 255));
- snapPainter.drawStaticText(3, 3, tr("Avatar Preview Mode
Press A for Default View"));
- avatarPreviewImage = finalPixmap.toImage();
-
renderPicture();
ui->cmdExport->setEnabled(true);
}
@@ -385,11 +445,35 @@ void PictureDialog::renderPicture()
{
if (!previewmode)
{
- ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture));
+ if (overlayenabled)
+ {
+ QPixmap overlayAreaPixmap(960, 536);
+ overlayAreaPixmap.fill(Qt::transparent);
+ QPainter overlayAreaPainter(&overlayAreaPixmap);
+ overlayAreaPainter.drawImage(0, 0, snapmaticPicture);
+ overlayAreaPainter.drawImage(3, 3, overlayTempImage);
+ overlayAreaPainter.end();
+ ui->labPicture->setPixmap(overlayAreaPixmap);
+ }
+ else
+ {
+ ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture));
+ }
}
else
{
- ui->labPicture->setPixmap(QPixmap::fromImage(avatarPreviewImage));
+ // Generating Avatar Preview
+ QPixmap avatarPixmap(960, 536);
+ QPainter snapPainter(&avatarPixmap);
+ QFont snapPainterFont;
+ snapPainterFont.setPixelSize(12);
+ snapPainter.drawImage(0, 0, snapmaticPicture);
+ snapPainter.drawImage(0, 0, avatarAreaPicture);
+ snapPainter.setPen(QColor::fromRgb(255, 255, 255, 255));
+ snapPainter.setFont(snapPainterFont);
+ snapPainter.drawText(QRect(3, 3, 140, 60), Qt::AlignLeft | Qt::TextWordWrap, tr("Avatar Preview Mode\nPress 1 for Default View"));
+ snapPainter.end();
+ ui->labPicture->setPixmap(avatarPixmap);
}
}
diff --git a/PictureDialog.h b/PictureDialog.h
index 21e9d3e..c16f3c7 100755
--- a/PictureDialog.h
+++ b/PictureDialog.h
@@ -65,6 +65,7 @@ private slots:
void exportCustomContextMenuRequestedPrivate(const QPoint &pos, bool fullscreen);
void nextPictureRequestedSlot();
void previousPictureRequestedSlot();
+ void renderOverlayPicture();
void renderPicture();
signals:
@@ -86,9 +87,9 @@ private:
QWidget *fullscreenWidget;
QAction *jpegExportAction;
QAction *pgtaExportAction;
- QImage avatarPreviewImage;
QImage avatarAreaPicture;
QImage snapmaticPicture;
+ QImage overlayTempImage;
QString jsonDrawString;
QString windowTitleStr;
QStringList plyrsList;
@@ -101,6 +102,7 @@ private:
QString locX;
QString locY;
QString locZ;
+ bool overlayenabled;
bool rqfullscreen;
bool navienabled;
bool previewmode;
diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm
index 9d54012..9e85a0e 100755
Binary files a/res/gta5sync_de.qm and b/res/gta5sync_de.qm differ
diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts
index faab4c1..c1ff875 100755
--- a/res/gta5sync_de.ts
+++ b/res/gta5sync_de.ts
@@ -110,7 +110,7 @@ Pictures and Savegames
Snapmatic Bilder und Spielständen
-
+
Ein Projekt zum ansehen und synchronisieren von<br/>
@@ -383,26 +383,26 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
%1 (%2 wenn verfügbar) [sys]
-
+
System like PC System
System
-
+
System like PC System = %1, System Language like Deutsch = %2
%1 (%2 wenn verfügbar)
-
+
%1
%1
-
+
Der eigene Ordner wird initialisiert sobald du %1 neugestartet hast.
@@ -411,20 +411,20 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
Der eigene Ordner initialisiert sobald du %1 neugestartet hast.
-
+
Die Änderung der Sprache nimmt Effekt sobald du %1 neugestartet hast.
-
+
No Profile, as default
Kein Profil
-
-
+
+
Profil: %1
@@ -521,46 +521,87 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
Schließen
-
+
Exportiere als &JPG Bild...
-
+
Exportiere als >A Snapmatic...
-
-
+
+
+ Taste 1 - Avatar Vorschaumodus
+Taste 2 - Overlay umschalten
+Pfeiltasten - Navigieren
+
+
+
+
Snapmatic Bildansicht
-
-
+
+
Fehlgeschlagen bei %1
-
-
- Avatar Vorschaumodus<br>Drücke A für Standardansicht
+
+
+ Avatar Vorschaumodus
+Drücke 1 für Standardmodus
-
-
+
+ // L is for Left and R is for Right, Left Arrow Right Arrow
+ 1 - Avatar Vorschaumodus
+2 - Overlay umschalten
+Pfeiltasten - Navigieren
+
+
+
+ L is for Left and R is for Right, Left Arrow Right Arrow
+ 1 - Avatar Vorschaumodus
+2 - Overlay umschalten
+L Pfeil - Zurück
+R Pfeil - Weiter
+
+
+
+ Avatar Vorschaumodus
+Drücke A für Standardansicht
+
+
+
+ Avatar Vorschaumodus<br>Drücke A für Standardansicht
+
+
+
+
Keine Spieler
-
-
+
+
Keine Crew
-
+
Unbekannter Standort
@@ -732,52 +773,52 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
Lade...
-
+
Importieren...
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Importieren
-
+
Alle Profildateien (SGTA* PGTA*)
-
+
Spielstanddateien (SGTA*)
-
+
Snapmatic Bilder (PGTA*)
-
+
Alle Dateien (**)
-
+
@@ -786,35 +827,35 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
%1
-
+
Fehler beim Lesen vom Snapmatic Bild
-
+
Fehler beim Lesen von Spielstanddatei
-
+
Kann %1 nicht importieren weil das Dateiformat nicht gültig ist
-
+
Fehlgeschlagen beim Importieren vom Snapmatic Bild, dieses Bild ist bereits im Spiel
-
+
%1Exportiere Snapmatic Bilder%2<br><br>JPG Bilder machen es möglich sie mit ein Bildansicht Programm zu öffnen<br>Das GTA Snapmatic Format macht es möglich sie wieder ins Game zu importieren<br><br>Exportieren als:
-
-
+
+
Keine gültige Datei wurde ausgewählt
@@ -825,40 +866,40 @@ Grand Theft Auto V Snapmatic Bilder und Spielständen
Aktivierte Bilder: %1 von %2
-
+
Fehlgeschlagen beim Importieren vom Snapmatic Bild, Datei beginnt nicht mit PGTA
-
+
Fehlgeschlagen beim Importieren vom Snapmatic Bild, kann Snapmatic Bild nicht ins Profil kopieren
-
+
Fehlgeschlagen beim Importieren vom Spielstand, kann Spielstanddatei nicht ins Profil kopieren
-
+
Fehlgeschlagen beim Importieren vom Spielstand, kein Spielstandslot mehr frei
-
-
+
+
JPG Bilder und GTA Snapmatic
-
-
+
+
Nur JPG Bilder
-
-
+
+
Nur GTA Snapmatic
@@ -877,25 +918,25 @@ Das GTA Snapmatic Format macht es möglich sie wieder ins Game zu importieren
Exportieren als:
-
-
+
+
Keine Snapmatic Bilder oder Spielstände ausgewählt
-
-
-
+
+
+
Auswahl löschen
-
+
Möchtest du wirklich die ausgewählten Snapmatic Bilder und Spielstanddateien löschen?
-
+
Fehlgeschlagen beim kompletten entfernen der ausgewählten Snapmatic Bilder und/oder der Spielstanddateien
@@ -916,10 +957,10 @@ Exportieren als:
Fehlgeschlagenen beim Import vom Spielstand weil kein Spielstandslot mehr übrig ist
-
-
-
-
+
+
+
+
Auswahl exportieren
@@ -940,12 +981,12 @@ Exportieren als:
Wie sollen wir mit den Snapmatic Bilder umgehen?
-
+
Auswahl exportieren...
-
+
Initialisiere Export...
@@ -954,7 +995,7 @@ Exportieren als:
Initialisierung...
-
+
@@ -1277,36 +1318,36 @@ Exportieren als:
SnapmaticEditor
-
+
Snapmatic Eigenschaften
-
+
Snapmatic Typ
-
-
+
+
Editor
-
-
+
+
Selbstporträt
-
+
Typisch
-
-
+
+
Fahndungsfoto
@@ -1315,37 +1356,37 @@ Exportieren als:
Eigenes
-
+
Director
-
+
Meme
-
+
Extras
-
+
Beim Übernehmen als Avatar qualifizieren
-
+
Das Qualifizieren als Avatar erlaubt dir dieses Snapmatic als Social Club Profilbild zu nutzen
-
+
&Übernehmen
-
+
Abbre&chen
@@ -1824,7 +1865,7 @@ Exportieren als:
-
+
diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts
index b176550..aa9099e 100644
--- a/res/gta5sync_fr.ts
+++ b/res/gta5sync_fr.ts
@@ -74,7 +74,7 @@ Pictures and Savegames
et les fichiers de sauvegarde de Grand Theft Auto V
-
+
Un outil pour gérer et synchroniser les photos Snapmatic<br/>
@@ -306,44 +306,44 @@ et les fichiers de sauvegarde de Grand Theft Auto V
&Annuler
-
+
System like PC System = %1, System Language like Deutsch = %2
%1 (%2 si disponible)
-
+
System like PC System
Système
-
+
%1
%1
-
+
Le répertoire personnalisé sera actif au prochain lancement de %1.
-
+
Le changement de langue sera actif au prochain lancement de %1.
-
+
No Profile, as default
Aucun profil
-
-
+
+
Profil : %1
@@ -434,46 +434,58 @@ et les fichiers de sauvegarde de Grand Theft Auto V
Fichier invalide
-
+
Exporter comme image &JPG...
-
+
Exporter comme >A Snapmatic...
-
-
+
+
+
+
+
+
+
Visionneuse de photo Snapmatic
-
-
+
+
Echec de %1
-
-
- Aperçu avatar<br>Appuyer sur A pour la vue par défaut
+
+
+
-
-
+
+ Aperçu avatar<br>Appuyer sur A pour la vue par défaut
+
+
+
+
Aucun joueur
-
-
+
+
Aucun crew
-
+
Emplacement inconnu
@@ -566,52 +578,52 @@ et les fichiers de sauvegarde de Grand Theft Auto V
Chargement...
-
+
Importer...
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Importer
-
+
Fichiers de profil GTA (SGTA* PGTA*)
-
+
Fichiers de sauvegarde GTA (SGTA*)
-
+
Photos Snapmatic (PGTA*)
-
+
Tous les fichiers (**)
-
+
@@ -620,97 +632,97 @@ et les fichiers de sauvegarde de Grand Theft Auto V
%1
-
-
+
+
Fichier invalide
-
+
Impossible d'ouvrir la photo Snapmatic
-
+
Impossible de lire le fichier de sauvegarde
-
+
Impossible d'importer %1, format invalide
-
+
Impossible d'importer la photo Snapmatic,nom de fichier incorrect (PGTA*)
-
+
Impossible d'importer la photo Snapmatic, un fichier du même nom existe déjà
-
+
Impossible d'importer la photo Snapmatic, impossible de copier le fichier dans le profil
-
+
Impossible d'importer la sauvegarde, impossible de copier le fichier dans le profil
-
+
Impossible d'importer la sauvegarde, aucun emplacement libre
-
-
-
-
+
+
+
+
Exporter la sélection
-
-
+
+
Images JPG et GTA Snapmatic
-
-
+
+
Images JPG seulement
-
-
+
+
GTA Snapmatic seulement
-
+
%1Exporter les photos Snapmatic%2<br><br>Les fichiers JPG permettent d'ouvrir les photos avec une visionneuse d'images<br>Les GTA Snapmatic permettent d'importer les photos dans le jeu<br><br>Exporter comme :
-
+
Exporter la sélection...
-
+
Initialisation de l'export...
-
+
@@ -719,25 +731,25 @@ et les fichiers de sauvegarde de Grand Theft Auto V
%1
-
-
+
+
Aucun fichier de sauvegarde ou photo Snapmatic sélectionné
-
-
-
+
+
+
Supprimer la sélection
-
+
Supprimer la sélection ?
-
+
Impossible de supprimer la sélection
@@ -949,36 +961,36 @@ et les fichiers de sauvegarde de Grand Theft Auto V
SnapmaticEditor
-
+
Propriétés Snapmatic
-
+
Type
-
-
+
+
Éditeur
-
-
+
+
Selfie
-
+
Normal
-
-
+
+
Mugshot
@@ -987,37 +999,37 @@ et les fichiers de sauvegarde de Grand Theft Auto V
Personnalisé
-
+
Director
-
+
Meme
-
+
Extras
-
+
Qualifier comme Avatar
-
+
Qualifier comme Avatar permet d'utiliser cette image en tant que photo de profil sur le Social Club
-
+
A&ppliquer
-
+
A&nnuler
@@ -1317,7 +1329,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V
-
+