From a591adf6eadadcb642fa60bf36f75dd68c02f475 Mon Sep 17 00:00:00 2001 From: Syping Date: Sun, 12 Nov 2017 15:58:59 +0100 Subject: [PATCH] added ability to change Snapmatic Location --- .travis.yml | 8 +- DatabaseThread.cpp | 64 +++-- DatabaseThread.h | 5 +- ExportThread.cpp | 2 +- GlobalString.cpp | 8 +- ImportDialog.cpp | 36 ++- ImportDialog.h | 2 +- MapLocationDialog.cpp | 197 ++++++++++++++ MapPreviewDialog.h => MapLocationDialog.h | 38 ++- MapLocationDialog.ui | 218 +++++++++++++++ MapPreviewDialog.cpp | 73 ----- MapPreviewDialog.ui | 71 ----- OptionsDialog.cpp | 69 ++++- OptionsDialog.h | 1 + OptionsDialog.ui | 28 +- PictureDialog.cpp | 50 +++- ProfileInterface.cpp | 52 ++-- TranslationClass.cpp | 65 ++++- TranslationClass.h | 5 +- UserInterface.cpp | 32 ++- UserInterface.h | 1 + config.h | 2 +- gta5view.pro | 6 +- main.cpp | 14 +- res/app.qrc | 1 + res/app.rc | 4 +- res/global.zh.loc | 1 + res/gta5sync_de.qm | Bin 32872 -> 33883 bytes res/gta5sync_de.ts | 317 +++++++++++++-------- res/gta5sync_en_US.ts | 311 +++++++++++++-------- res/gta5sync_fr.ts | 318 ++++++++++++++-------- res/gta5sync_ru.qm | Bin 32303 -> 32539 bytes res/gta5sync_ru.ts | 317 +++++++++++++-------- 33 files changed, 1586 insertions(+), 730 deletions(-) create mode 100644 MapLocationDialog.cpp rename MapPreviewDialog.h => MapLocationDialog.h (54%) create mode 100644 MapLocationDialog.ui delete mode 100644 MapPreviewDialog.cpp delete mode 100644 MapPreviewDialog.ui create mode 100644 res/global.zh.loc diff --git a/.travis.yml b/.travis.yml index 9597e9f..c1e15cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,14 +32,14 @@ before_script: script: - cd qt5 - - qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev2\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro + - qmake -qt=5 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev3\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro - make -j 4 - - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev2 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=../../package + - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev3 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=../../package - cd .. - cd qt4 - - qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev2\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro + - qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=c++11 DEFINES+=GTA5SYNC_BUILDTYPE_DEV "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"$PACKAGE_VERSION-dev3\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro - make -j 4 - - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev2 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=../../package + - sudo checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=$PACKAGE_VERSION --pkgrelease=dev3 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=../../package - cd .. deploy: diff --git a/DatabaseThread.cpp b/DatabaseThread.cpp index aba55b9..2344dca 100755 --- a/DatabaseThread.cpp +++ b/DatabaseThread.cpp @@ -32,9 +32,11 @@ #include #define crewMaxPages 83 +#define maxLoadFails 3 DatabaseThread::DatabaseThread(CrewDatabase *crewDB, QObject *parent) : QThread(parent), crewDB(crewDB) { + continueLastCrew = true; threadRunning = true; } @@ -46,7 +48,7 @@ void DatabaseThread::run() QStringList crewListR; // Register thread loop end signal - QObject::connect(this, SIGNAL(threadEndCommited()), &threadLoop, SLOT(quit())); + QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit())); // Setup crewList for Quick time scan crewList = crewDB->getCrews(); @@ -130,7 +132,6 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r if (threadRunning && crewID != QLatin1String("0")) { QNetworkAccessManager *netManager = new QNetworkAccessManager(); - QNetworkRequest netRequest(AppEnv::getCrewFetchingUrl(crewID)); #if QT_VERSION >= 0x050600 netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); @@ -144,9 +145,10 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r QEventLoop *downloadLoop = new QEventLoop(); QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit())); - QObject::connect(this, SIGNAL(threadEndCommited()), downloadLoop, SLOT(quit())); + if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit())); } QTimer::singleShot(30000, downloadLoop, SLOT(quit())); downloadLoop->exec(); + downloadLoop->disconnect(); delete downloadLoop; if (netReply->isFinished()) @@ -168,11 +170,15 @@ void DatabaseThread::scanCrewReference(const QStringList &crewList, const int &r } } - QEventLoop *waitingLoop = new QEventLoop(); - QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit())); - QObject::connect(this, SIGNAL(threadEndCommited()), waitingLoop, SLOT(quit())); - waitingLoop->exec(); - delete waitingLoop; + if (threadRunning) + { + QEventLoop *waitingLoop = new QEventLoop(); + QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit())); + if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit())); } + waitingLoop->exec(); + waitingLoop->disconnect(); + delete waitingLoop; + } delete netReply; delete netManager; @@ -186,14 +192,14 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int { if (threadRunning && crewID != QLatin1String("0")) { + int currentFail = 0; int currentPage = 0; int foundPlayers = 0; int totalPlayers = 1000; - while(foundPlayers < totalPlayers && currentPage < maxPages) + while(foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning)) { QNetworkAccessManager *netManager = new QNetworkAccessManager(); - QNetworkRequest netRequest(AppEnv::getPlayerFetchingUrl(crewID, currentPage)); #if QT_VERSION >= 0x050600 netRequest.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true); @@ -207,9 +213,10 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int QEventLoop *downloadLoop = new QEventLoop(); QObject::connect(netReply, SIGNAL(finished()), downloadLoop, SLOT(quit())); - QObject::connect(this, SIGNAL(threadEndCommited()), downloadLoop, SLOT(quit())); + if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), downloadLoop, SLOT(quit())); } QTimer::singleShot(30000, downloadLoop, SLOT(quit())); downloadLoop->exec(); + downloadLoop->disconnect(); delete downloadLoop; if (netReply->isFinished()) @@ -227,30 +234,43 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int for (QVariant memberVariant : memberList) { QMap memberMap = memberVariant.toMap(); - foundPlayers++; if (memberMap.contains("RockstarId") && memberMap.contains("Name")) { int RockstarId = memberMap["RockstarId"].toInt(); QString memberName = memberMap["Name"].toString(); if (!memberName.isEmpty() && RockstarId != 0) { + foundPlayers++; emit playerNameFound(RockstarId, memberName); } } } } - QEventLoop *waitingLoop = new QEventLoop(); - QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit())); - QObject::connect(this, SIGNAL(threadEndCommited()), waitingLoop, SLOT(quit())); - waitingLoop->exec(); - delete waitingLoop; - currentPage++; } + else + { + currentFail++; + if (currentFail == maxLoadFails) + { + currentFail = 0; + currentPage++; + } + } delete netReply; delete netManager; + + if (foundPlayers < totalPlayers && currentPage < maxPages && (continueLastCrew ? true : threadRunning)) + { + QEventLoop *waitingLoop = new QEventLoop(); + QTimer::singleShot(requestDelay, waitingLoop, SLOT(quit())); + if (!continueLastCrew) { QObject::connect(this, SIGNAL(threadTerminated()), waitingLoop, SLOT(quit())); } + waitingLoop->exec(); + waitingLoop->disconnect(); + delete waitingLoop; + } } } } @@ -258,7 +278,7 @@ void DatabaseThread::scanCrewMembersList(const QStringList &crewList, const int void DatabaseThread::deleteCompatibleCrews(QStringList *crewList) { - for (QString& crewNID : *crewList) + for (QString crewNID : *crewList) { if (crewDB->isCompatibleCrew(crewNID)) { @@ -270,7 +290,7 @@ void DatabaseThread::deleteCompatibleCrews(QStringList *crewList) QStringList DatabaseThread::deleteCompatibleCrews(const QStringList &crewList) { QStringList crewListR = crewList; - for (QString& crewNID : crewListR) + for (QString crewNID : crewListR) { if (crewDB->isCompatibleCrew(crewNID)) { @@ -280,8 +300,8 @@ QStringList DatabaseThread::deleteCompatibleCrews(const QStringList &crewList) return crewListR; } -void DatabaseThread::doEndThread() +void DatabaseThread::terminateThread() { threadRunning = false; - emit threadEndCommited(); + emit threadTerminated(); } diff --git a/DatabaseThread.h b/DatabaseThread.h index 3abf047..8d8bbfa 100755 --- a/DatabaseThread.h +++ b/DatabaseThread.h @@ -30,7 +30,7 @@ public: explicit DatabaseThread(CrewDatabase *crewDB, QObject *parent = 0); public slots: - void doEndThread(); + void terminateThread(); private: CrewDatabase *crewDB; @@ -38,6 +38,7 @@ private: void scanCrewReference(const QStringList &crewList, const int &requestDelay); void deleteCompatibleCrews(QStringList *crewList); QStringList deleteCompatibleCrews(const QStringList &crewList); + bool continueLastCrew; bool threadRunning; int plyrPerReq; @@ -49,7 +50,7 @@ signals: void crewNameUpdated(); void playerNameFound(int playerID, QString playerName); void playerNameUpdated(); - void threadEndCommited(); + void threadTerminated(); }; #endif // DATABASETHREAD_H diff --git a/ExportThread.cpp b/ExportThread.cpp index 05af7db..b795824 100755 --- a/ExportThread.cpp +++ b/ExportThread.cpp @@ -76,7 +76,7 @@ void ExportThread::run() // End Picture Settings int intExportProgress = 0; - foreach(ProfileWidget *widget, profileMap.keys()) + for (ProfileWidget *widget : profileMap.keys()) { if (widget->isSelected()) { diff --git a/GlobalString.cpp b/GlobalString.cpp index f0a63ae..77c1591 100755 --- a/GlobalString.cpp +++ b/GlobalString.cpp @@ -74,11 +74,5 @@ QString GlobalString::getLanguageFile() QString GlobalString::getLanguage() { - QString language = TCInstance->getCurrentLanguage(); - QStringList langList = QString(language).replace("-", "_").split("_"); - if (langList.length() >= 1) - { - language = langList.at(0); - } - return language; + return TCInstance->getCurrentAreaLanguage(); } diff --git a/ImportDialog.cpp b/ImportDialog.cpp index 5f485a1..687da8a 100644 --- a/ImportDialog.cpp +++ b/ImportDialog.cpp @@ -73,6 +73,7 @@ ImportDialog::~ImportDialog() void ImportDialog::processImage() { + if (workImage.isNull()) return; QImage snapmaticImage = workImage; QPixmap snapmaticPixmap(snapmaticResolutionW, snapmaticResolutionH); snapmaticPixmap.fill(selectedColour); @@ -101,7 +102,7 @@ void ImportDialog::processImage() snapmaticImage = snapmaticImage.scaled(snapmaticAvatarResolution, snapmaticAvatarResolution, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); } snapmaticPainter.drawImage(snapmaticAvatarPlacementW + diffWidth, snapmaticAvatarPlacementH + diffHeight, snapmaticImage); - imageTitle = "Custom Avatar"; + imageTitle = tr("Custom Avatar", "Custom Avatar Description in SC, don't use Special Character!"); } else { @@ -127,7 +128,7 @@ void ImportDialog::processImage() snapmaticImage = snapmaticImage.scaled(snapmaticResolutionW, snapmaticResolutionH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); } snapmaticPainter.drawImage(0 + diffWidth, 0 + diffHeight, snapmaticImage); - imageTitle = "Custom Picture"; + imageTitle = tr("Custom Picture", "Custom Picture Description in SC, don't use Special Character!"); } snapmaticPainter.end(); newImage = snapmaticPixmap.toImage(); @@ -139,13 +140,38 @@ QImage ImportDialog::image() return newImage; } -void ImportDialog::setImage(const QImage &image_) +void ImportDialog::setImage(QImage *image_) { - workImage = image_; - if (workImage.width() == workImage.height()) + workImage = QImage(); + if (image_->width() == image_->height()) { insideAvatarZone = true; ui->cbAvatar->setChecked(true); + if (image_->height() > snapmaticResolutionH) + { + workImage = image_->scaled(snapmaticResolutionH, snapmaticResolutionH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + delete image_; + } + else + { + workImage = *image_; + delete image_; + } + } + else if (image_->width() > snapmaticResolutionW && image_->width() > image_->height()) + { + workImage = image_->scaledToWidth(snapmaticResolutionW, Qt::SmoothTransformation); + delete image_; + } + else if (image_->height() > snapmaticResolutionH && image_->height() > image_->width()) + { + workImage = image_->scaledToHeight(snapmaticResolutionH, Qt::SmoothTransformation); + delete image_; + } + else + { + workImage = *image_; + delete image_; } processImage(); } diff --git a/ImportDialog.h b/ImportDialog.h index 7953490..92a27c6 100644 --- a/ImportDialog.h +++ b/ImportDialog.h @@ -34,7 +34,7 @@ public: ~ImportDialog(); QImage image(); QString getImageTitle(); - void setImage(const QImage &image); + void setImage(QImage *image); bool isImportAgreed(); private slots: diff --git a/MapLocationDialog.cpp b/MapLocationDialog.cpp new file mode 100644 index 0000000..03c2a45 --- /dev/null +++ b/MapLocationDialog.cpp @@ -0,0 +1,197 @@ +/***************************************************************************** +* gta5sync GRAND THEFT AUTO V SYNC +* Copyright (C) 2017 Syping +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*****************************************************************************/ + +#include "MapLocationDialog.h" +#include "ui_MapLocationDialog.h" +#include "IconLoader.h" +#include "AppEnv.h" +#include +#include + +MapLocationDialog::MapLocationDialog(double x, double y, QWidget *parent) : + QDialog(parent), xpos_old(x), ypos_old(y), + ui(new Ui::MapLocationDialog) +{ + // Set Window Flags + setWindowFlags(windowFlags()^Qt::WindowContextHelpButtonHint); + ui->setupUi(this); + ui->cmdDone->setVisible(false); + ui->cmdApply->setVisible(false); + ui->cmdRevert->setVisible(false); + ui->cmdDone->setCursor(Qt::ArrowCursor); + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + int widgetMargin = qRound(3 * screenRatio); + ui->hlMapDialog->setContentsMargins(widgetMargin, widgetMargin, widgetMargin, widgetMargin); + ui->vlMapDialog->setSpacing(widgetMargin); + setMinimumSize(500 * screenRatio, 600 * screenRatio); + setMaximumSize(500 * screenRatio, 600 * screenRatio); + setFixedSize(500 * screenRatio, 600 * screenRatio); + setMouseTracking(true); + + changeMode = false; + propUpdate = false; + drawPointOnMap(xpos_old, ypos_old); +} + +MapLocationDialog::~MapLocationDialog() +{ + delete ui; +} + +void MapLocationDialog::drawPointOnMap(double xpos_d, double ypos_d) +{ + qreal screenRatio = AppEnv::screenRatio(); + int pointMakerSize = 8 * screenRatio; + QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize)); + QSize mapPixelSize = size(); + + int pointMakerHalfSize = pointMakerSize / 2; + long xpos_ms = qRound(xpos_d); + long ypos_ms = qRound(ypos_d); + double xpos_ma = xpos_ms + 4000; + double ypos_ma = ypos_ms + 4000; + double xrat = (double)mapPixelSize.width() / 10000; + double yrat = (double)mapPixelSize.height() / 12000; + long xpos_mp = qRound(xpos_ma * xrat); + long ypos_mp = qRound(ypos_ma * yrat); + long xpos_pr = xpos_mp - pointMakerHalfSize; + long ypos_pr = ypos_mp + pointMakerHalfSize; + + QPixmap mapPixmap(mapPixelSize); + QPainter mapPainter(&mapPixmap); + mapPainter.drawPixmap(0, 0, mapPixelSize.width(), mapPixelSize.height(), QPixmap(":/img/mappreview.jpg").scaled(mapPixelSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + mapPainter.drawPixmap(xpos_pr, mapPixelSize.height() - ypos_pr, pointMakerSize, pointMakerSize, pointMakerPixmap); + mapPainter.end(); + + QPalette backgroundPalette; + backgroundPalette.setBrush(backgroundRole(), QBrush(mapPixmap)); + setPalette(backgroundPalette); + + xpos_new = xpos_d; + ypos_new = ypos_d; + ui->labPos->setText(tr("X: %1\nY: %2", "X and Y position").arg(QString::number(xpos_d), QString::number(ypos_d))); +} + +void MapLocationDialog::on_cmdChange_clicked() +{ + qreal screenRatio = AppEnv::screenRatio(); + int pointMakerSize = 8 * screenRatio; + QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize)); + QCursor pointMakerCursor(pointMakerPixmap); + ui->cmdDone->setVisible(true); + ui->cmdApply->setVisible(false); + ui->cmdChange->setVisible(false); + ui->cmdRevert->setVisible(false); + + setCursor(pointMakerCursor); + changeMode = true; +} + +void MapLocationDialog::on_cmdDone_clicked() +{ + ui->cmdDone->setVisible(false); + ui->cmdChange->setVisible(true); + if (xpos_new != xpos_old || ypos_new != ypos_old) + { + ui->cmdApply->setVisible(true); + ui->cmdRevert->setVisible(true); + } + + setCursor(Qt::ArrowCursor); + changeMode = false; +} + +void MapLocationDialog::updatePosFromEvent(int x, int y) +{ + QSize mapPixelSize = size(); + int xpos_ad = x; + int ypos_ad = mapPixelSize.height() - y; + double xrat = 10000 / (double)mapPixelSize.width(); + double yrat = 12000 / (double)mapPixelSize.height(); + double xpos_rv = xrat * xpos_ad; + double ypos_rv = yrat * ypos_ad; + double xpos_fp = xpos_rv - 4000; + double ypos_fp = ypos_rv - 4000; + drawPointOnMap(xpos_fp, ypos_fp); +} + +void MapLocationDialog::mouseMoveEvent(QMouseEvent *ev) +{ + if (!changeMode) { ev->ignore(); } + else if (ev->buttons() & Qt::LeftButton) + { + updatePosFromEvent(ev->x(), ev->y()); + ev->accept(); + } + else + { + ev->ignore(); + } +} + +void MapLocationDialog::mouseReleaseEvent(QMouseEvent *ev) +{ + if (!changeMode) { ev->ignore(); } + else if (ev->button() == Qt::LeftButton) + { + updatePosFromEvent(ev->x(), ev->y()); + ev->accept(); + } + else + { + ev->ignore(); + } +} + +void MapLocationDialog::on_cmdApply_clicked() +{ + propUpdate = true; + xpos_old = xpos_new; + ypos_old = ypos_new; + ui->cmdApply->setVisible(false); + ui->cmdRevert->setVisible(false); +} + +void MapLocationDialog::on_cmdRevert_clicked() +{ + drawPointOnMap(xpos_old, ypos_old); + ui->cmdApply->setVisible(false); + ui->cmdRevert->setVisible(false); +} + +bool MapLocationDialog::propUpdated() +{ + return propUpdate; +} + +double MapLocationDialog::getXpos() +{ + return xpos_old; +} + +double MapLocationDialog::getYpos() +{ + return ypos_old; +} + +void MapLocationDialog::on_cmdClose_clicked() +{ + close(); +} diff --git a/MapPreviewDialog.h b/MapLocationDialog.h similarity index 54% rename from MapPreviewDialog.h rename to MapLocationDialog.h index e69666b..5d0793a 100644 --- a/MapPreviewDialog.h +++ b/MapLocationDialog.h @@ -16,26 +16,48 @@ * along with this program. If not, see . *****************************************************************************/ -#ifndef MAPPREVIEWDIALOG_H -#define MAPPREVIEWDIALOG_H +#ifndef MAPLOCATIONDIALOG_H +#define MAPLOCATIONDIALOG_H #include +#include namespace Ui { -class MapPreviewDialog; +class MapLocationDialog; } -class MapPreviewDialog : public QDialog +class MapLocationDialog : public QDialog { Q_OBJECT public: - explicit MapPreviewDialog(QWidget *parent = 0); + explicit MapLocationDialog(double x, double y, QWidget *parent = 0); void drawPointOnMap(double x, double y); - ~MapPreviewDialog(); + bool propUpdated(); + double getXpos(); + double getYpos(); + ~MapLocationDialog(); + +protected: + void mouseMoveEvent(QMouseEvent *ev); + void mouseReleaseEvent(QMouseEvent *ev); + +private slots: + void on_cmdDone_clicked(); + void on_cmdApply_clicked(); + void on_cmdChange_clicked(); + void on_cmdRevert_clicked(); + void updatePosFromEvent(int x, int y); + void on_cmdClose_clicked(); private: - Ui::MapPreviewDialog *ui; + Ui::MapLocationDialog *ui; + double xpos_old; + double ypos_old; + double xpos_new; + double ypos_new; + bool propUpdate; + bool changeMode; }; -#endif // MAPPREVIEWDIALOG_H +#endif // MAPLOCATIONDIALOG_H diff --git a/MapLocationDialog.ui b/MapLocationDialog.ui new file mode 100644 index 0000000..d62edf0 --- /dev/null +++ b/MapLocationDialog.ui @@ -0,0 +1,218 @@ + + + MapLocationDialog + + + + 0 + 0 + 500 + 600 + + + + + 500 + 600 + + + + + 500 + 600 + + + + Snapmatic Map Viewer + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QLabel{ +color: rgb(255, 255, 255); +} + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::NoFocus + + + &Close + + + false + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + Qt::NoFocus + + + &Apply + + + false + + + + + + + Qt::NoFocus + + + &Revert + + + false + + + + + + + Qt::NoFocus + + + &Set + + + false + + + + + + + Qt::NoFocus + + + &Done + + + false + + + + + + + + + + + + diff --git a/MapPreviewDialog.cpp b/MapPreviewDialog.cpp deleted file mode 100644 index 8477bf0..0000000 --- a/MapPreviewDialog.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/***************************************************************************** -* gta5sync GRAND THEFT AUTO V SYNC -* Copyright (C) 2017 Syping -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*****************************************************************************/ - -#include "MapPreviewDialog.h" -#include "ui_MapPreviewDialog.h" -#include "IconLoader.h" -#include "AppEnv.h" -#include -#include - -MapPreviewDialog::MapPreviewDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::MapPreviewDialog) -{ - // Set Window Flags - setWindowFlags(windowFlags()^Qt::WindowContextHelpButtonHint); - - ui->setupUi(this); - - // DPI calculation - qreal screenRatio = AppEnv::screenRatio(); - setMinimumSize(500 * screenRatio, 600 * screenRatio); - setMaximumSize(500 * screenRatio, 600 * screenRatio); - setFixedSize(500 * screenRatio, 600 * screenRatio); -} - -MapPreviewDialog::~MapPreviewDialog() -{ - delete ui; -} - -void MapPreviewDialog::drawPointOnMap(double xpos_d, double ypos_d) -{ - qreal screenRatio = AppEnv::screenRatio(); - int pointMakerSize = 8 * screenRatio; - QPixmap pointMakerPixmap = IconLoader::loadingPointmakerIcon().pixmap(QSize(pointMakerSize, pointMakerSize)); - QSize mapPixelSize = size(); - - int pointMakerHalfSize = pointMakerSize / 2; - long xpos_ms = qRound(xpos_d); - long ypos_ms = qRound(ypos_d); - double xpos_ma = xpos_ms + 4000; - double ypos_ma = ypos_ms + 4000; - double xrat = (double)mapPixelSize.width() / 10000; - double yrat = (double)mapPixelSize.height() / 12000; - long xpos_mp = qRound(xpos_ma * xrat); - long ypos_mp = qRound(ypos_ma * yrat); - long xpos_pr = xpos_mp - pointMakerHalfSize; - long ypos_pr = ypos_mp + pointMakerHalfSize; - - QPixmap mapPixmap(mapPixelSize); - QPainter mapPainter(&mapPixmap); - mapPainter.drawPixmap(0, 0, mapPixelSize.width(), mapPixelSize.height(), QPixmap(":/img/mappreview.jpg").scaled(mapPixelSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); - mapPainter.drawPixmap(xpos_pr, mapPixelSize.height() - ypos_pr, pointMakerSize, pointMakerSize, pointMakerPixmap); - mapPainter.end(); - - ui->labPicture->setPixmap(mapPixmap); -} diff --git a/MapPreviewDialog.ui b/MapPreviewDialog.ui deleted file mode 100644 index 35fed61..0000000 --- a/MapPreviewDialog.ui +++ /dev/null @@ -1,71 +0,0 @@ - - - MapPreviewDialog - - - - 0 - 0 - 500 - 600 - - - - - 500 - 600 - - - - - 500 - 600 - - - - Snapmatic Map Viewer - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - true - - - - - - - - UiModLabel - QLabel -
uimod/UiModLabel.h
- - mouseMoved() - mouseReleased() - mousePressed() - mouseDoubleClicked() - -
-
- - -
diff --git a/OptionsDialog.cpp b/OptionsDialog.cpp index a6db0c2..a9d8fea 100755 --- a/OptionsDialog.cpp +++ b/OptionsDialog.cpp @@ -125,18 +125,21 @@ void OptionsDialog::setupLanguageBox() { settings->beginGroup("Interface"); currentLanguage = settings->value("Language", "System").toString(); + currentAreaLanguage = settings->value("AreaLanguage", "Auto").toString(); settings->endGroup(); QString cbSysStr = tr("%1 (Next Closest Language)", "First language a person can talk with a different person/application. \"Native\" or \"Not Native\".").arg(tr("System", "System in context of System default")); + QString cbAutoStr = tr("%1 (Closest to Interface)", "Next closest language compared to the Interface").arg(tr("Auto", "Automatic language choice.")); ui->cbLanguage->addItem(cbSysStr, "System"); + ui->cbAreaLanguage->addItem(cbAutoStr, "Auto"); QStringList availableLanguages; availableLanguages << QString("en_GB"); #ifndef GTA5SYNC_QCONF - availableLanguages << TCInstance->listTranslations(AppEnv::getExLangFolder()); + availableLanguages << TranslationClass::listTranslations(AppEnv::getExLangFolder()); #endif - availableLanguages << TCInstance->listTranslations(AppEnv::getInLangFolder()); + availableLanguages << TranslationClass::listTranslations(AppEnv::getInLangFolder()); availableLanguages.removeDuplicates(); availableLanguages.sort(); @@ -144,7 +147,6 @@ void OptionsDialog::setupLanguageBox() { QLocale langLocale(lang); QString cbLangStr = langLocale.nativeLanguageName() % " (" % langLocale.nativeCountryName() % ") [" % lang % "]"; - QString langIconStr = "flag-" % TranslationClass::getCountryCode(langLocale); ui->cbLanguage->addItem(QIcon::fromTheme(langIconStr), cbLangStr, lang); @@ -158,6 +160,59 @@ void OptionsDialog::setupLanguageBox() #endif } } + + QString aCurrentLanguage = QString("en_GB"); + if (TCInstance->isLanguageLoaded()) { aCurrentLanguage = TCInstance->getCurrentLanguage(); } + QLocale currentLocale = QLocale(aCurrentLanguage); + ui->labCurrentLanguage->setText(tr("Current: %1").arg(currentLocale.nativeLanguageName() % " (" % currentLocale.nativeCountryName() % ") [" % aCurrentLanguage % "]")); + + availableLanguages.clear(); + availableLanguages << TranslationClass::listAreaTranslations(); + availableLanguages.removeDuplicates(); + availableLanguages.sort(); + + for (QString lang : availableLanguages) + { + // correcting Language Location if possible + QString aLang = lang; + if (QFile::exists(":/global/global." % lang % ".loc")) + { + QFile locFile(":/global/global." % lang % ".loc"); + if (locFile.open(QFile::ReadOnly)) + { + aLang = QString::fromUtf8(locFile.readLine()).trimmed(); + locFile.close(); + } + } + + QLocale langLocale(aLang); + QString cbLangStr = langLocale.nativeLanguageName() % " (" % langLocale.nativeCountryName() % ") [" % aLang % "]"; + QString langIconStr = "flag-" % TranslationClass::getCountryCode(langLocale); + + ui->cbAreaLanguage->addItem(QIcon::fromTheme(langIconStr), cbLangStr, lang); + if (currentAreaLanguage == lang) + { +#if QT_VERSION >= 0x050000 + ui->cbAreaLanguage->setCurrentText(cbLangStr); +#else + int indexOfLang = ui->cbAreaLanguage->findText(cbLangStr); + ui->cbAreaLanguage->setCurrentIndex(indexOfLang); +#endif + } + } + + QString aCurrentAreaLanguage = TCInstance->getCurrentAreaLanguage(); + if (QFile::exists(":/global/global." % currentAreaLanguage % ".loc")) + { + QFile locFile(":/global/global." % currentAreaLanguage % ".loc"); + if (locFile.open(QFile::ReadOnly)) + { + aCurrentAreaLanguage = QString::fromUtf8(locFile.readLine()).trimmed(); + locFile.close(); + } + } + currentLocale = QLocale(aCurrentAreaLanguage); + ui->labCurrentAreaLanguage->setText(tr("Current: %1").arg(currentLocale.nativeLanguageName() % " (" % currentLocale.nativeCountryName() % ") [" % aCurrentAreaLanguage % "]")); } void OptionsDialog::setupRadioButtons() @@ -195,8 +250,10 @@ void OptionsDialog::applySettings() settings->beginGroup("Interface"); #if QT_VERSION >= 0x050000 settings->setValue("Language", ui->cbLanguage->currentData()); + settings->setValue("AreaLanguage", ui->cbAreaLanguage->currentData()); #else settings->setValue("Language", ui->cbLanguage->itemData(ui->cbLanguage->currentIndex())); + settings->setValue("AreaLanguage", ui->cbAreaLanguage->itemData(ui->cbAreaLanguage->currentIndex())); #endif #ifdef GTA5SYNC_WIN #if QT_VERSION >= 0x050200 @@ -255,8 +312,10 @@ void OptionsDialog::applySettings() #if QT_VERSION >= 0x050000 bool languageChanged = ui->cbLanguage->currentData().toString() != currentLanguage; + bool languageAreaChanged = ui->cbAreaLanguage->currentData().toString() != currentAreaLanguage; #else bool languageChanged = ui->cbLanguage->itemData(ui->cbLanguage->currentIndex()).toString() != currentLanguage; + bool languageAreaChanged = ui->cbAreaLanguage->itemData(ui->cbLanguage->currentIndex()).toString() != currentAreaLanguage; #endif if (languageChanged) { @@ -264,6 +323,10 @@ void OptionsDialog::applySettings() TCInstance->initUserLanguage(); TCInstance->loadTranslation(qApp); } + else if (languageAreaChanged) + { + TCInstance->initUserLanguage(); + } emit settingsApplied(newContentMode, languageChanged); diff --git a/OptionsDialog.h b/OptionsDialog.h index af57d87..18715b6 100755 --- a/OptionsDialog.h +++ b/OptionsDialog.h @@ -55,6 +55,7 @@ private: Ui::OptionsDialog *ui; QList playerItems; Qt::AspectRatioMode aspectRatio; + QString currentAreaLanguage; QString currentLanguage; QString currentCFolder; QString defaultProfile; diff --git a/OptionsDialog.ui b/OptionsDialog.ui index 7025371..c23d9ba 100755 --- a/OptionsDialog.ui +++ b/OptionsDialog.ui @@ -390,12 +390,38 @@ - Language + Interface + + + + Current: %1 + + + + + + + + + + Areas + + + + + + + + + Current: %1 + + + diff --git a/PictureDialog.cpp b/PictureDialog.cpp index 61c255c..d8c1646 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -21,7 +21,7 @@ #include "ProfileDatabase.h" #include "ui_PictureDialog.h" #include "SidebarGenerator.h" -#include "MapPreviewDialog.h" +#include "MapLocationDialog.h" #include "SnapmaticEditor.h" #include "StandardPaths.h" #include "PictureExport.h" @@ -691,21 +691,48 @@ int PictureDialog::getIndex() void PictureDialog::openPreviewMap() { - MapPreviewDialog *mapPreviewDialog; + MapLocationDialog *mapLocDialog; if (rqFullscreen && fullscreenWidget != nullptr) { - mapPreviewDialog = new MapPreviewDialog(fullscreenWidget); + mapLocDialog = new MapLocationDialog(smpic->getSnapmaticProperties().location.x, smpic->getSnapmaticProperties().location.y, fullscreenWidget); } else { - mapPreviewDialog = new MapPreviewDialog(this); + mapLocDialog = new MapLocationDialog(smpic->getSnapmaticProperties().location.x, smpic->getSnapmaticProperties().location.y, this); } - mapPreviewDialog->setWindowIcon(windowIcon()); - mapPreviewDialog->setModal(true); - mapPreviewDialog->drawPointOnMap(smpic->getSnapmaticProperties().location.x, smpic->getSnapmaticProperties().location.y); - mapPreviewDialog->show(); - mapPreviewDialog->exec(); - delete mapPreviewDialog; + mapLocDialog->setWindowIcon(windowIcon()); + mapLocDialog->setModal(true); + mapLocDialog->show(); + mapLocDialog->exec(); + if (mapLocDialog->propUpdated()) + { + // Update Snapmatic Properties + SnapmaticProperties localSpJson = smpic->getSnapmaticProperties(); + localSpJson.location.x = mapLocDialog->getXpos(); + localSpJson.location.y = mapLocDialog->getYpos(); + localSpJson.location.z = 0; + + // Update Snapmatic Picture + QString currentFilePath = smpic->getPictureFilePath(); + QString originalFilePath = smpic->getOriginalPictureFilePath(); + QString backupFileName = originalFilePath % ".bak"; + if (!QFile::exists(backupFileName)) + { + QFile::copy(currentFilePath, backupFileName); + } + SnapmaticProperties fallbackProperties = smpic->getSnapmaticProperties(); + smpic->setSnapmaticProperties(localSpJson); + if (!smpic->exportPicture(currentFilePath)) + { + QMessageBox::warning(this, SnapmaticEditor::tr("Snapmatic Properties"), SnapmaticEditor::tr("Patching of Snapmatic Properties failed because of I/O Error")); + smpic->setSnapmaticProperties(fallbackProperties); + } + else + { + updated(); + } + } + delete mapLocDialog; } void PictureDialog::editSnapmaticProperties() @@ -739,6 +766,9 @@ void PictureDialog::updated() crewID = QString::number(smpic->getSnapmaticProperties().crewID); crewStr = QString::number(smpic->getSnapmaticProperties().crewID); } + locX = QString::number(smpic->getSnapmaticProperties().location.x); + locY = QString::number(smpic->getSnapmaticProperties().location.y); + locZ = QString::number(smpic->getSnapmaticProperties().location.z); picTitl = StringParser::escapeString(smpic->getPictureTitle()); ui->labJSON->setText(jsonDrawString.arg(locX, locY, locZ, generatePlayersString(), generateCrewString(), picTitl, picAreaStr, created)); } diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index af7058b..88dbcdd 100755 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -96,25 +96,27 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre ProfileInterface::~ProfileInterface() { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { - widgets.remove(widget); widget->removeEventFilter(this); widget->disconnect(); delete widget; } - foreach (SavegameData *savegame, savegames) + widgets.clear(); + + for (SavegameData *savegame : savegames) { - savegames.removeAll(savegame); delete savegame; } - foreach (SnapmaticPicture *picture, pictures) + savegames.clear(); + + for (SnapmaticPicture *picture : pictures) { - pictures.removeAll(picture); delete picture; } - delete profileLoader; + pictures.clear(); + delete profileLoader; delete ui; } @@ -617,7 +619,7 @@ bool ProfileInterface::importFile(QString selectedFile, bool notMultiple) } QString currentTime = QTime::currentTime().toString("HHmmss"); SnapmaticProperties spJson = picture->getSnapmaticProperties(); - spJson.uid = QString(currentTime + + spJson.uid = QString(currentTime % QString::number(QDate::currentDate().dayOfYear())).toInt(); bool fExists = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid)); bool fExistsHidden = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid) % ".hidden"); @@ -625,7 +627,7 @@ bool ProfileInterface::importFile(QString selectedFile, bool notMultiple) while ((fExists || fExistsHidden) && cEnough < 5000) { currentTime = QString::number(currentTime.toInt() - 1); - spJson.uid = QString(currentTime + + spJson.uid = QString(currentTime % QString::number(QDate::currentDate().dayOfYear())).toInt(); fExists = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid)); fExistsHidden = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid) % ".hidden"); @@ -650,11 +652,11 @@ bool ProfileInterface::importFile(QString selectedFile, bool notMultiple) delete picture; return false; } - QImage snapmaticImage; + QImage *importImage = new QImage(); QImageReader snapmaticImageReader; snapmaticImageReader.setDecideFormatFromContent(true); snapmaticImageReader.setDevice(&snapmaticFile); - if (!snapmaticImageReader.read(&snapmaticImage)) + if (!snapmaticImageReader.read(importImage)) { QMessageBox::warning(this, tr("Import"), tr("Can't import %1 because file can't be parsed properly").arg("\""+selectedFileName+"\"")); delete picture; @@ -662,7 +664,7 @@ bool ProfileInterface::importFile(QString selectedFile, bool notMultiple) } ImportDialog *importDialog = new ImportDialog(this); importDialog->setWindowFlags(importDialog->windowFlags()^Qt::WindowContextHelpButtonHint); - importDialog->setImage(snapmaticImage); + importDialog->setImage(importImage); importDialog->setModal(true); importDialog->show(); importDialog->exec(); @@ -680,7 +682,7 @@ bool ProfileInterface::importFile(QString selectedFile, bool notMultiple) while ((fExists || fExistsHidden) && cEnough < 25) { currentTime = QString::number(currentTime.toInt() - 1); - spJson.uid = QString(currentTime + + spJson.uid = QString(currentTime % QString::number(QDate::currentDate().dayOfYear())).toInt(); fExists = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid)); fExistsHidden = QFile::exists(profileFolder % "/PGTA5" % QString::number(spJson.uid) % ".hidden"); @@ -820,7 +822,7 @@ void ProfileInterface::profileWidgetSelected() { if (selectedWidgts == 0) { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { widget->setSelectionMode(true); } @@ -833,7 +835,7 @@ void ProfileInterface::profileWidgetDeselected() if (selectedWidgts == 1) { int scrollBarValue = ui->saProfile->verticalScrollBar()->value(); - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (contentMode != 2) { @@ -847,7 +849,7 @@ void ProfileInterface::profileWidgetDeselected() void ProfileInterface::selectAllWidgets() { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { widget->setSelected(true); } @@ -855,7 +857,7 @@ void ProfileInterface::selectAllWidgets() void ProfileInterface::deselectAllWidgets() { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { widget->setSelected(false); } @@ -879,7 +881,7 @@ void ProfileInterface::exportSelected() if (exportDirectory != "") { settings.setValue(profileName, exportDirectory); - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (widget->isSelected()) { @@ -1022,7 +1024,7 @@ void ProfileInterface::deleteSelected() { if (QMessageBox::Yes == QMessageBox::warning(this, tr("Remove selected"), tr("You really want remove the selected Snapmatic picutres and Savegame files?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)) { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (widget->isSelected()) { @@ -1069,7 +1071,7 @@ void ProfileInterface::settingsApplied(int _contentMode, bool languageChanged) contentMode = _contentMode; if (contentMode == 2) { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { widget->setSelectionMode(true); widget->setContentMode(contentMode); @@ -1078,7 +1080,7 @@ void ProfileInterface::settingsApplied(int _contentMode, bool languageChanged) } else { - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (selectedWidgts == 0) { @@ -1093,7 +1095,7 @@ void ProfileInterface::settingsApplied(int _contentMode, bool languageChanged) void ProfileInterface::enableSelected() { int fails = 0; - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (widget->isSelected()) { @@ -1112,7 +1114,7 @@ void ProfileInterface::enableSelected() void ProfileInterface::disableSelected() { int fails = 0; - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (widget->isSelected()) { @@ -1286,7 +1288,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event) if ((watched->objectName() == "SavegameWidget" || watched->objectName() == "SnapmaticWidget") && isProfileLoaded) { ProfileWidget *pWidget = nullptr; - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { QPoint mousePos = widget->mapFromGlobal(QCursor::pos()); if (widget->rect().contains(mousePos)) @@ -1355,7 +1357,7 @@ bool ProfileInterface::eventFilter(QObject *watched, QEvent *event) void ProfileInterface::hoverProfileWidgetCheck() { ProfileWidget *pWidget = nullptr; - foreach (ProfileWidget *widget, widgets.keys()) + for (ProfileWidget *widget : widgets.keys()) { if (widget->underMouse()) { diff --git a/TranslationClass.cpp b/TranslationClass.cpp index fcb00d7..279d2cb 100644 --- a/TranslationClass.cpp +++ b/TranslationClass.cpp @@ -42,6 +42,7 @@ void TranslationClass::initUserLanguage() QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR); settings.beginGroup("Interface"); userLanguage = settings.value("Language", "System").toString(); + userAreaLanguage = settings.value("AreaLanguage", "Auto").toString(); settings.endGroup(); } @@ -279,13 +280,26 @@ QStringList TranslationClass::listTranslations(const QString &langPath) langDir.setNameFilters(QStringList("gta5sync_*.qm")); langDir.setPath(langPath); QStringList availableLanguages; - for (QString &lang : langDir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort)) + for (QString lang : langDir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort)) { availableLanguages << QString(lang).remove("gta5sync_").remove(".qm"); } return availableLanguages; } +QStringList TranslationClass::listAreaTranslations() +{ + QDir langDir; + langDir.setNameFilters(QStringList("global.*.ini")); + langDir.setPath(":/global"); + QStringList availableLanguages; + for (QString lang : langDir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort)) + { + availableLanguages << QString(lang).remove("global.").remove(".ini"); + } + return availableLanguages; +} + bool TranslationClass::loadSystemTranslation_p(const QString &langPath, QTranslator *appTranslator) { #ifdef GTA5SYNC_DEBUG @@ -498,6 +512,55 @@ bool TranslationClass::isUserLanguageSystem_p() return (userLanguage == "System" || userLanguage.trimmed().isEmpty()); } +QString TranslationClass::getCurrentAreaLanguage() +{ + const QStringList areaTranslations = listAreaTranslations(); + if (userAreaLanguage == "Auto" || userAreaLanguage.trimmed().isEmpty()) + { +#ifdef GTA5SYNC_DEBUG + qDebug() << "autoAreaLanguageMode"; +#endif + QString langCode = QString(currentLanguage).replace("-", "_"); + if (areaTranslations.contains(langCode)) + { +#ifdef GTA5SYNC_DEBUG + qDebug() << "autoAreaLanguageSelected" << langCode; +#endif + return langCode; + } + else if (langCode.contains("_")) + { + langCode = langCode.split("_").at(0); + if (!areaTranslations.contains(langCode)) goto outputDefaultLanguage; +#ifdef GTA5SYNC_DEBUG + qDebug() << "autoAreaLanguageSelected" << langCode; +#endif + return langCode; + } + } + else if (areaTranslations.contains(userAreaLanguage)) + { +#ifdef GTA5SYNC_DEBUG + qDebug() << "userAreaLanguageSelected" << userAreaLanguage; +#endif + return userAreaLanguage; + } + else if (userAreaLanguage.contains("_")) + { + QString langCode = QString(userAreaLanguage).replace("-", "_").split("_").at(0); + if (!areaTranslations.contains(langCode)) goto outputDefaultLanguage; +#ifdef GTA5SYNC_DEBUG + qDebug() << "userAreaLanguageSelected" << langCode; +#endif + return langCode; + } +outputDefaultLanguage: +#ifdef GTA5SYNC_DEBUG + qDebug() << "defaultAreaLanguageSelected"; +#endif + return "en"; +} + QString TranslationClass::getCurrentLanguage() { return currentLanguage; diff --git a/TranslationClass.h b/TranslationClass.h index 532be3b..db62010 100644 --- a/TranslationClass.h +++ b/TranslationClass.h @@ -36,7 +36,9 @@ public: void initUserLanguage(); void loadTranslation(QApplication *app); void unloadTranslation(QApplication *app); - QStringList listTranslations(const QString &langPath); + static QStringList listTranslations(const QString &langPath); + static QStringList listAreaTranslations(); + QString getCurrentAreaLanguage(); QString getCurrentLanguage(); bool isLanguageLoaded(); @@ -50,6 +52,7 @@ private: QTranslator exQtTranslator; QTranslator inAppTranslator; QTranslator inQtTranslator; + QString userAreaLanguage; QString currentLanguage; QString userLanguage; int currentLangIndex; diff --git a/UserInterface.cpp b/UserInterface.cpp index 41dc44a..67d4a97 100755 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -189,12 +189,12 @@ void UserInterface::changeFolder_clicked() void UserInterface::on_cmdReload_clicked() { - foreach (QPushButton *profileBtn, profileBtns) + for (QPushButton *profileBtn : profileBtns) { ui->vlButtons->removeWidget(profileBtn); - profileBtns.removeAll(profileBtn); delete profileBtn; } + profileBtns.clear(); setupDirEnv(); } @@ -223,28 +223,40 @@ void UserInterface::closeProfile() { if (profileOpen) { - profileOpen = false; - profileName.clear(); - ui->menuProfile->setEnabled(false); - ui->actionSelect_profile->setEnabled(false); - ui->swProfile->removeWidget(profileUI); - delete profileUI; + closeProfile_p(); } this->setWindowTitle(defaultWindowTitle.arg(tr("Select Profile"))); } +void UserInterface::closeProfile_p() +{ + profileOpen = false; + profileName.clear(); + profileName.squeeze(); + ui->menuProfile->setEnabled(false); + ui->actionSelect_profile->setEnabled(false); + ui->swProfile->removeWidget(profileUI); + profileUI->disconnect(); + delete profileUI; +} + void UserInterface::closeEvent(QCloseEvent *ev) { Q_UNUSED(ev) - threadDB->doEndThread(); + threadDB->terminateThread(); } UserInterface::~UserInterface() { - foreach (QPushButton *profileBtn, profileBtns) + if (profileOpen) + { + closeProfile_p(); + } + for (QPushButton *profileBtn : profileBtns) { delete profileBtn; } + profileBtns.clear(); delete ui; } diff --git a/UserInterface.h b/UserInterface.h index 29bce56..38557b6 100755 --- a/UserInterface.h +++ b/UserInterface.h @@ -84,6 +84,7 @@ private: QStringList GTAV_Profiles; void setupProfileUi(); void openProfile(const QString &profileName); + void closeProfile_p(); void openSelectProfile(); void retranslateUi(); diff --git a/config.h b/config.h index a7b1b70..f43dc83 100755 --- a/config.h +++ b/config.h @@ -50,7 +50,7 @@ #ifndef GTA5SYNC_APPVER #ifndef GTA5SYNC_DAILYB -#define GTA5SYNC_APPVER "1.5.0-dev2" +#define GTA5SYNC_APPVER "1.5.0-dev3" #else #define GTA5SYNC_APPVER GTA5SYNC_DAILYB #endif diff --git a/gta5view.pro b/gta5view.pro index d1812a9..9d7ec08 100755 --- a/gta5view.pro +++ b/gta5view.pro @@ -38,7 +38,7 @@ SOURCES += main.cpp \ GlobalString.cpp \ IconLoader.cpp \ ImportDialog.cpp \ - MapPreviewDialog.cpp \ + MapLocationDialog.cpp \ OptionsDialog.cpp \ PictureDialog.cpp \ PictureExport.cpp \ @@ -72,7 +72,7 @@ HEADERS += \ GlobalString.h \ IconLoader.h \ ImportDialog.h \ - MapPreviewDialog.h \ + MapLocationDialog.h \ OptionsDialog.h \ PictureDialog.h \ PictureExport.h \ @@ -100,7 +100,7 @@ FORMS += \ AboutDialog.ui \ ExportDialog.ui \ ImportDialog.ui \ - MapPreviewDialog.ui \ + MapLocationDialog.ui \ OptionsDialog.ui \ PictureDialog.ui \ ProfileInterface.ui \ diff --git a/main.cpp b/main.cpp index 918d281..ebd7d6b 100755 --- a/main.cpp +++ b/main.cpp @@ -148,20 +148,17 @@ int main(int argc, char *argv[]) if (crewID != 0) { crewDB.addCrew(crewID); } if (!readOk) { return 1; } - QEventLoop threadLoop; QObject::connect(&threadDB, SIGNAL(crewNameFound(int, QString)), &crewDB, SLOT(setCrewName(int, QString))); QObject::connect(&threadDB, SIGNAL(crewNameUpdated()), &picDialog, SLOT(crewNameUpdated())); QObject::connect(&threadDB, SIGNAL(playerNameFound(int, QString)), &profileDB, SLOT(setPlayerName(int, QString))); QObject::connect(&threadDB, SIGNAL(playerNameUpdated()), &picDialog, SLOT(playerNameUpdated())); - QObject::connect(&threadDB, SIGNAL(finished()), &threadLoop, SLOT(quit())); - QObject::connect(&picDialog, SIGNAL(endDatabaseThread()), &threadDB, SLOT(doEndThread())); + QObject::connect(&threadDB, SIGNAL(finished()), &a, SLOT(quit())); + QObject::connect(&picDialog, SIGNAL(endDatabaseThread()), &threadDB, SLOT(terminateThread())); threadDB.start(); picDialog.show(); - threadLoop.exec(); - - return 0; + return a.exec(); } else if (selectedAction == "showsgd") { @@ -174,6 +171,7 @@ int main(int argc, char *argv[]) if (!readOk) { return 1; } + a.setQuitOnLastWindowClosed(true); savegameDialog.show(); return a.exec(); @@ -197,7 +195,5 @@ int main(int argc, char *argv[]) uiWindow.show(); #endif - a.exec(); - - return 0; + return a.exec(); } diff --git a/res/app.qrc b/res/app.qrc index 26fe7f2..d5a3d0e 100755 --- a/res/app.qrc +++ b/res/app.qrc @@ -30,6 +30,7 @@ global.ja.ini global.ru.ini global.zh.ini + global.zh.loc template.g5e diff --git a/res/app.rc b/res/app.rc index 43bfa7a..ee9308c 100755 --- a/res/app.rc +++ b/res/app.rc @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Syping" VALUE "FileDescription", "gta5view\0" - VALUE "FileVersion", "1.5.0-dev2\0" + VALUE "FileVersion", "1.5.0-dev3\0" VALUE "InternalName", "gta5view\0" VALUE "LegalCopyright", "Copyright 2016-2017 Syping\0" VALUE "OriginalFilename", "gta5view.exe\0" VALUE "ProductName", "gta5view\0" - VALUE "ProductVersion", "1.5.0-dev2\0" + VALUE "ProductVersion", "1.5.0-dev3\0" END END END diff --git a/res/global.zh.loc b/res/global.zh.loc new file mode 100644 index 0000000..dad8857 --- /dev/null +++ b/res/global.zh.loc @@ -0,0 +1 @@ +zh_TW diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm index fe43ac6480a12c41bfce3f14865614d3cf43cb0f..c934152338f2f829b6bc74e5b7a40975a4431b77 100755 GIT binary patch delta 3228 zcmZ{m3sh8f9>>3P=MFRX&J2T!ypchLctwhWuSy>B62TXw5FiM{OPC=TP&ua^%w8Ic zC6VneW+sxUn*~`aX)9u7nz&S2R+gqEYxyd&ho|;C+?KV@?(vMDJ2U_P@A3UThKr5D z$Bzn+yE_^ItN;wpD;%2%2&(}1Za{n=@cjnR%moV910m6XhbIs|12Ae8dN_cIu6#dH zp~rS$$swTR3kZ9Afl<8>n>GV36UbeFXDP&vl|cD(5W7Xdv7{4XA0O(sLp(|6^BmCJ zNk;`a(4>%lH=ubb0Wdc})AtsT_lQEP1l{HZ46p(rQ4aty?Fy}rAnesdI-Z3vrvqCT z!kqSPR}pq12&i6*u&*bO`w_lB6%I_;gm9uPUHw#{9$Sk?FriNDTyq%EmE*Oa z>ZsDgxbQyj8Ip1FISu7o+JS4<3}!G}C4UkDEX+_?+N{u4qVj)XEZ|e2D!FHnN^Dcr zPWleWcT?TpmJftgtDdO;f~EOD_1x>dy$D9Z6%Rql9xE?m*RU;l~7KW|}1YJYf`@D?zRHd67+8td=@H04mee9&i5w zL^P_s?K~G~Q%Bbg0@j)8teuYn5}jQVpsdhYBgp^f~I| zjg(B+C%WiatMJ#w=%1&vBp-@X;%F%Eb#dO*O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2eB-Tc<#s^GtHv@jhX0m?Z%!M-F zMCK%i8)rf*_gc}M)w)V+;09(us+(ZwmrY&QFbaXOq% zoBeLmL6(O(Y%TXfzX=)#c9_G>oQeta%#&AN;rQj6ldbHP(McL@F$LyhCsTodqZ+4{ znA=hZaI8Ky-z}npw|pGMzFq!yo} - + Background Colour: <span style="color: %1">%1</span> Hintergrundfarbe: <span style="color: %1">%1</span> @@ -425,25 +425,37 @@ When you plan to use it as Avatar the picture will be cut! Wenn du planst es als Avatar zu verwenden das Bild wird abgetrennt! - + + Custom Avatar + Custom Avatar Description in SC, don't use Special Character! + Eigener Avatar + + + + Custom Picture + Custom Picture Description in SC, don't use Special Character! + Eigenes Bild + + + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Bist du sicher ein Quadrat Bild außerhalb der Avatar Zone zu verwenden? Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - + Snapmatic Avatar Zone Snapmatic Avatar Zone - + Select Colour... Farbe auswählen... - MapPreviewDialog + MapLocationDialog Map Preview Map Vorschau @@ -453,10 +465,50 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! Snapmatic Koordinatenansicht - + Snapmatic Map Viewer Snapmatic Kartenansicht + + X: %1 +Y: %2 + X and Y position + X: %1 +Y: %2 + + + + &Close + S&chließen + + + + &Apply + &Übernehmen + + + + &Revert + &Zurücksetzen + + + + &Set + &Ändern + + + + &Done + &Fertig + + + + X: %1 +Y: %2 + X and Y position + X: %1 +Y: %2 + OptionsDialog @@ -621,38 +673,55 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - Language Sprache - + + Interface + Oberfläche + + + + + + + Current: %1 + Aktuell: %1 + + + + Areas + Standorte + + + Sync Sync - + Sync is not implemented at current time Sync wurde bisher nicht implementiert - + Apply changes Änderungen übernehmen - + &OK OK, Cancel, Apply &OK - + Discard changes Änderungen verwerfen - + &Cancel OK, Cancel, Apply Abbre&chen @@ -673,7 +742,7 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! %1 (%2 wenn verfügbar) - + %1 %1 %1 @@ -687,19 +756,31 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! Der eigene Ordner initialisiert sobald du %1 neugestartet hast. - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". %1 (Erste näheste Sprache) - + System System in context of System default System - + + %1 (Closest to Interface) + Next closest language compared to the Interface + %1 (Näheste zur Oberfläche) + + + + Auto + Automatic language choice. + Automatisch + + + The new Custom Folder will initialise after you restart %1. Der eigene Ordner wird initialisiert sobald du %1 neugestartet hast. @@ -708,15 +789,15 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! Die Änderung der Sprache nimmt Effekt sobald du %1 neugestartet hast. - + No Profile No Profile, as default Kein Profil - - - + + + Profile: %1 Profil: %1 @@ -831,7 +912,7 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - + Export as &Picture... Als &Bild exportieren... @@ -841,7 +922,7 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - + Export as &Snapmatic... Als &Snapmatic exportieren... @@ -856,7 +937,7 @@ Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - + &Edit Properties... Eigenschaften bearb&eiten... @@ -1177,30 +1258,30 @@ Drücke A für Standardansicht Profil schließen - + Loading... Lade... - - + + Import... Importieren... - - - - - - - - - - - - - + + + + + + + + + + + + + Import Importieren @@ -1213,14 +1294,14 @@ Drücke A für Standardansicht Importfähige Dateien (*.g5e *.jpg *.png SGTA* PGTA*) - - + + Savegames files (SGTA*) Spielstanddateien (SGTA*) - - + + Snapmatic pictures (PGTA*) Snapmatic Bilder (PGTA*) @@ -1229,29 +1310,29 @@ Drücke A für Standardansicht Alle Bilddateien (*.jpg *.png) - + Importable files (%1) Importfähige Dateien (%1) - + All image files (%1) Alle Bilddateien (%1) - - + + All files (**) Alle Dateien (**) - - + + Import file %1 of %2 files Importiere Datei %1 von %2 Dateien - + Import failed with... %1 @@ -1260,29 +1341,29 @@ Drücke A für Standardansicht %1 - - + + Failed to read Snapmatic picture Fehler beim Lesen vom Snapmatic Bild - - + + Failed to read Savegame file Fehler beim Lesen von Spielstanddatei - + Can't import %1 because file can't be parsed properly Kann %1 nicht importieren weil die Datei nicht richtig gelesen werden kann - + Can't import %1 because file format can't be detected Kann %1 nicht importieren weil das Dateiformat nicht erkannt werden kann - + Initialising export... Initialisiere Export... @@ -1291,24 +1372,24 @@ Drücke A für Standardansicht Kann %1 nicht importieren weil das Dateiformat nicht gültig ist - + Failed to import the Snapmatic picture, file not begin with PGTA or end with .g5e Fehlgeschlagen beim Importieren vom Snapmatic Bild, Datei beginnt nicht mit PGTA oder endet mit .g5e - + Failed to import the Snapmatic picture, the picture is already in the game Fehlgeschlagen beim Importieren vom Snapmatic Bild, dieses Bild ist bereits im Spiel - + %1Export Snapmatic pictures%2<br><br>JPG pictures make it possible to open the picture with a Image Viewer<br>GTA Snapmatic make it possible to import the picture into the game<br><br>Export as: %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: - - - + + + No valid file is selected Keine gültige Datei wurde ausgewählt @@ -1322,35 +1403,35 @@ Drücke A für Standardansicht Fehlgeschlagen beim Importieren vom Snapmatic Bild, Datei beginnt nicht mit PGTA - + Failed to import the Snapmatic picture, can't copy the file into profile Fehlgeschlagen beim Importieren vom Snapmatic Bild, kann Snapmatic Bild nicht ins Profil kopieren - + Failed to import the Savegame, can't copy the file into profile Fehlgeschlagen beim Importieren vom Spielstand, kann Spielstanddatei nicht ins Profil kopieren - + Failed to import the Savegame, no Savegame slot is left Fehlgeschlagen beim Importieren vom Spielstand, kein Spielstandslot mehr frei - - + + JPG pictures and GTA Snapmatic JPG Bilder und GTA Snapmatic - - + + JPG pictures only Nur JPG Bilder - - + + GTA Snapmatic only Nur GTA Snapmatic @@ -1369,25 +1450,25 @@ Das GTA Snapmatic Format macht es möglich sie wieder ins Game zu importieren Exportieren als: - - + + No Snapmatic pictures or Savegames files are selected Keine Snapmatic Bilder oder Spielstände ausgewählt - - - + + + Remove selected Auswahl löschen - + You really want remove the selected Snapmatic picutres and Savegame files? Möchtest du wirklich die ausgewählten Snapmatic Bilder und Spielstanddateien löschen? - + Failed at remove the complete selected Snapmatic pictures and/or Savegame files Fehlgeschlagen beim kompletten entfernen der ausgewählten Snapmatic Bilder und/oder der Spielstanddateien @@ -1408,10 +1489,10 @@ Exportieren als: Fehlgeschlagenen beim Import vom Spielstand weil kein Spielstandslot mehr übrig ist - - - - + + + + Export selected Auswahl exportieren @@ -1432,7 +1513,7 @@ Exportieren als: Wie sollen wir mit den Snapmatic Bilder umgehen? - + Export selected... Auswahl exportieren... @@ -1445,7 +1526,7 @@ Exportieren als: Initialisierung... - + Export failed with... %1 @@ -1475,13 +1556,13 @@ Exportieren als: Exportiere Datei %1 von %2 Dateien - + All profile files (*.g5e SGTA* PGTA*) Alle Profildateien (*.g5e SGTA* PGTA*) - - + + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1644,32 +1725,32 @@ Exportieren als: Fehlgeschlagen beim Löschen %1 von deinen Spielständen - + &View A&nsehen - + &Remove Entfe&rnen - + &Select Au&swählen - + &Deselect A&bwählen - + Select &All &Alles auswählen - + &Deselect All Alles a&bwählen @@ -1708,7 +1789,7 @@ Exportieren als: Spielstand kopieren - + &Export &Exportieren @@ -1784,6 +1865,7 @@ Exportieren als: + Snapmatic Properties Snapmatic Eigenschaften @@ -1908,6 +1990,7 @@ Exportieren als: Nein + Patching of Snapmatic Properties failed because of I/O Error Patchen von Snapmatic Eigenschaften fehlgeschlagen wegen I/O Fehler @@ -1981,7 +2064,7 @@ Exportieren als: Bist du sicher %1 von deine Snapmatic Bilder zu löschen? - + Edi&t Bearbei&ten @@ -1994,7 +2077,7 @@ Exportieren als: &Im Spiel deaktivieren - + &Export &Exportieren @@ -2007,12 +2090,12 @@ Exportieren als: Exportiere als &GTA Snapmatic - + Show &In-game &Im Spiel anzeigen - + Hide &In-game &Im Spiel ausblenden @@ -2045,32 +2128,32 @@ Exportieren als: Exportiere als &Snapmatic... - + &View A&nsehen - + &Remove Entfe&rnen - + &Select Au&swählen - + &Deselect A&bwählen - + Select &All Alles &auswählen - + &Deselect All Alles a&bwählen @@ -2409,16 +2492,16 @@ Exportieren als: - - + + Select Profile Profil auswählen - + - + Select GTA V Folder... Wähle GTA V Ordner... @@ -2427,7 +2510,7 @@ Exportieren als: Wähle GTA V &Ordner... - + Open File... Datei öffnen... @@ -2444,20 +2527,20 @@ Exportieren als: - + &About %1 &Über %1 - - - - + + + + Open File Datei öffnen - + Can't open %1 because of not valid file format Kann nicht %1 öffnen weil Dateiformat nicht gültig ist diff --git a/res/gta5sync_en_US.ts b/res/gta5sync_en_US.ts index be65ee6..cc2c4b6 100644 --- a/res/gta5sync_en_US.ts +++ b/res/gta5sync_en_US.ts @@ -196,7 +196,7 @@ Pictures and Savegames - + Background Colour: <span style="color: %1">%1</span> Background Color: <span style="color: %1">%1</span> @@ -236,28 +236,72 @@ Pictures and Savegames - + + Custom Avatar + Custom Avatar Description in SC, don't use Special Character! + + + + + Custom Picture + Custom Picture Description in SC, don't use Special Character! + + + + Snapmatic Avatar Zone - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! - + Select Colour... Select Color... - MapPreviewDialog + MapLocationDialog - + Snapmatic Map Viewer - + + + + + &Close + + + + + &Apply + + + + + &Revert + + + + + &Set + + + + + &Done + + + + + X: %1 +Y: %2 + X and Y position + @@ -395,75 +439,104 @@ When you want to use it as Avatar the image will be detached! - Language - + + Interface + + + + + + + + Current: %1 + + + + + Areas + + + + Sync - + Sync is not implemented at current time - + Apply changes - + &OK OK, Cancel, Apply - + Discard changes - + &Cancel OK, Cancel, Apply - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default - + + %1 (Closest to Interface) + Next closest language compared to the Interface + + + + + Auto + Automatic language choice. + + + + %1 %1 - + The new Custom Folder will initialise after you restart %1. The new Custom Folder will initialize after you restart %1. - + No Profile No Profile, as default - - - + + + Profile: %1 @@ -505,13 +578,13 @@ When you want to use it as Avatar the image will be detached! - + Export as &Picture... - + Export as &Snapmatic... @@ -522,7 +595,7 @@ When you want to use it as Avatar the image will be detached! - + &Edit Properties... @@ -722,207 +795,207 @@ Press 1 for Default View - + Loading... - - + + Import... - - - - - - - - - - - - - + + + + + + + + + + + + + Import - + Importable files (%1) - - + + GTA V Export (*.g5e) - - + + Savegames files (SGTA*) - - + + Snapmatic pictures (PGTA*) - + All image files (%1) - - + + All files (**) - - - + + + No valid file is selected - - + + Import file %1 of %2 files - + Import failed with... %1 - - + + Failed to read Snapmatic picture - - + + Failed to read Savegame file - + Can't import %1 because file can't be parsed properly - + Can't import %1 because file format can't be detected - + Failed to import the Snapmatic picture, file not begin with PGTA or end with .g5e - + Failed to import the Snapmatic picture, the picture is already in the game - + Failed to import the Snapmatic picture, can't copy the file into profile - + Failed to import the Savegame, can't copy the file into profile - + Failed to import the Savegame, no Savegame slot is left - - - - + + + + Export selected - - + + JPG pictures and GTA Snapmatic - - + + JPG pictures only - - + + GTA Snapmatic only - + %1Export Snapmatic pictures%2<br><br>JPG pictures make it possible to open the picture with a Image Viewer<br>GTA Snapmatic make it possible to import the picture into the game<br><br>Export as: - + Export selected... - + Initialising export... Initializing export... - + Export failed with... %1 - - + + No Snapmatic pictures or Savegames files are selected - - - + + + Remove selected - + You really want remove the selected Snapmatic picutres and Savegame files? - + Failed at remove the complete selected Snapmatic pictures and/or Savegame files - + All profile files (*.g5e SGTA* PGTA*) @@ -1013,37 +1086,37 @@ Press 1 for Default View - + &View - + &Export - + &Remove - + &Select - + &Deselect - + Select &All - + &Deselect All @@ -1137,6 +1210,7 @@ Press 1 for Default View + Snapmatic Properties @@ -1244,6 +1318,7 @@ Press 1 for Default View + Patching of Snapmatic Properties failed because of I/O Error @@ -1332,52 +1407,52 @@ Press 1 for Default View - + Edi&t - + Show &In-game - + Hide &In-game - + &Export - + &View - + &Remove - + &Select - + &Deselect - + Select &All - + &Deselect All @@ -1459,7 +1534,7 @@ Press 1 for Default View - + &About %1 @@ -1571,9 +1646,9 @@ Press 1 for Default View - + - + Select GTA V Folder... @@ -1604,26 +1679,26 @@ Press 1 for Default View - - + + Select Profile - + Open File... - - - - + + + + Open File - + Can't open %1 because of not valid file format diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts index f83a274..caa233d 100644 --- a/res/gta5sync_fr.ts +++ b/res/gta5sync_fr.ts @@ -331,7 +331,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V - + Background Colour: <span style="color: %1">%1</span> @@ -361,28 +361,79 @@ et les fichiers de sauvegarde de Grand Theft Auto V A&nnuler - + + Custom Avatar + Custom Avatar Description in SC, don't use Special Character! + + + + + Custom Picture + Custom Picture Description in SC, don't use Special Character! + + + + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! - + Snapmatic Avatar Zone - + Select Colour... + + MapLocationDialog + + + Snapmatic Map Viewer + + + + + &Close + + + + + &Apply + A&ppliquer + + + + &Revert + + + + + &Set + + + + + &Done + + + + + X: %1 +Y: %2 + X and Y position + + + MapPreviewDialog - - Snapmatic Map Viewer - + &Apply + A&ppliquer @@ -520,38 +571,55 @@ When you want to use it as Avatar the image will be detached! - Language Langue - + + Interface + + + + + + + + Current: %1 + + + + + Areas + + + + Sync Synchronisation - + Sync is not implemented at current time La synchronisation n'est pas encore implémentée - + Apply changes - + &OK OK, Cancel, Apply &OK - + Discard changes - + &Cancel OK, Cancel, Apply &Annuler @@ -567,25 +635,37 @@ When you want to use it as Avatar the image will be detached! Système - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default Système - + + %1 (Closest to Interface) + Next closest language compared to the Interface + + + + + Auto + Automatic language choice. + + + + %1 %1 %1 - + The new Custom Folder will initialise after you restart %1. @@ -598,15 +678,15 @@ When you want to use it as Avatar the image will be detached! Le changement de langue sera actif au prochain lancement de %1. - + No Profile No Profile, as default Aucun profil - - - + + + Profile: %1 Profil : %1 @@ -773,7 +853,7 @@ When you want to use it as Avatar the image will be detached! - + Export as &Picture... @@ -783,7 +863,7 @@ When you want to use it as Avatar the image will be detached! - + Export as &Snapmatic... @@ -798,7 +878,7 @@ When you want to use it as Avatar the image will be detached! - + &Edit Properties... Modifier les &propriétés... @@ -943,30 +1023,30 @@ Appuyer sur 1 pour le mode par défaut Photos activées : %1 sur %2 - + Loading... Chargement... - - + + Import... Importer... - - - - - - - - - - - - - + + + + + + + + + + + + + Import Importer @@ -975,36 +1055,36 @@ Appuyer sur 1 pour le mode par défaut Fichiers de profil GTA (SGTA* PGTA*) - - + + Savegames files (SGTA*) Fichiers de sauvegarde GTA (SGTA*) - - + + Snapmatic pictures (PGTA*) Photos Snapmatic (PGTA*) - + All image files (%1) - - + + All files (**) Tous les fichiers (**) - - + + Import file %1 of %2 files Importation du fichier %1 sur %2 - + Import failed with... %1 @@ -1013,26 +1093,26 @@ Appuyer sur 1 pour le mode par défaut %1 - - - + + + No valid file is selected Fichier invalide - + Importable files (%1) - - + + Failed to read Snapmatic picture Impossible d'ouvrir la photo Snapmatic - - + + Failed to read Savegame file Impossible de lire le fichier de sauvegarde @@ -1053,78 +1133,78 @@ Appuyer sur 1 pour le mode par défaut Tous les fichiers image (*.jpg *.png) - + Can't import %1 because file can't be parsed properly - + Can't import %1 because file format can't be detected - + Failed to import the Snapmatic picture, file not begin with PGTA or end with .g5e Impossible d'importer la photo Snapmatic,nom de fichier incorrect (PGTA*, *.g5e) - + Failed to import the Snapmatic picture, the picture is already in the game Impossible d'importer la photo Snapmatic, un fichier du même nom existe déjà - + Failed to import the Snapmatic picture, can't copy the file into profile Impossible d'importer la photo Snapmatic, impossible de copier le fichier dans le profil - + Failed to import the Savegame, can't copy the file into profile Impossible d'importer la sauvegarde, impossible de copier le fichier dans le profil - + Failed to import the Savegame, no Savegame slot is left Impossible d'importer la sauvegarde, aucun emplacement libre - - - - + + + + Export selected Exporter la sélection - - + + JPG pictures and GTA Snapmatic Images JPG et GTA Snapmatic - - + + JPG pictures only Images JPG seulement - - + + GTA Snapmatic only GTA Snapmatic seulement - + %1Export Snapmatic pictures%2<br><br>JPG pictures make it possible to open the picture with a Image Viewer<br>GTA Snapmatic make it possible to import the picture into the game<br><br>Export as: %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 : - + Export selected... Exporter la sélection... - + Initialising export... @@ -1133,7 +1213,7 @@ Appuyer sur 1 pour le mode par défaut Initialisation de l'export... - + Export failed with... %1 @@ -1142,36 +1222,36 @@ Appuyer sur 1 pour le mode par défaut %1 - - + + No Snapmatic pictures or Savegames files are selected Aucun fichier de sauvegarde ou photo Snapmatic sélectionné - - - + + + Remove selected Supprimer la sélection - + You really want remove the selected Snapmatic picutres and Savegame files? Supprimer la sélection ? - + Failed at remove the complete selected Snapmatic pictures and/or Savegame files Impossible de supprimer la sélection - + All profile files (*.g5e SGTA* PGTA*) Tous les fichiers de profil (*.g5e SGTA* PGTA*) - - + + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1262,7 +1342,7 @@ Appuyer sur 1 pour le mode par défaut Supprimer - + &Export &Exporter @@ -1353,32 +1433,32 @@ Appuyer sur 1 pour le mode par défaut Impossible de supprimer %1 - + &View &Voir - + &Remove &Supprimer - + &Select &Sélectionner - + &Deselect &Déselectionner - + Select &All Sélectionner to&ut - + &Deselect All &Déselectionner tout @@ -1388,6 +1468,7 @@ Appuyer sur 1 pour le mode par défaut + Snapmatic Properties Propriétés Snapmatic @@ -1506,6 +1587,7 @@ Appuyer sur 1 pour le mode par défaut Non + Patching of Snapmatic Properties failed because of I/O Error La modification des propriétés Snapmatic a échoué : erreur d'entrée/sortie @@ -1599,17 +1681,17 @@ Appuyer sur 1 pour le mode par défaut Impossible de supprimer %1 - + Edi&t Édi&ter - + Show &In-game &Visible en jeu - + Hide &In-game &Invisible en jeu @@ -1618,7 +1700,7 @@ Appuyer sur 1 pour le mode par défaut Modifier les &propriétés... - + &Export &Exporter @@ -1631,32 +1713,32 @@ Appuyer sur 1 pour le mode par défaut Exporter comme &GTA Snapmatic... - + &View &Voir - + &Remove S&upprimer - + &Select &Sélectionner - + &Deselect &Déselectionner - + Select &All Sélectionner &tout - + &Deselect All &Déselectionner tout @@ -1830,9 +1912,9 @@ Appuyer sur 1 pour le mode par défaut - + - + Select GTA V Folder... Modifier l'emplacement de GTA V... @@ -1875,32 +1957,32 @@ Appuyer sur 1 pour le mode par défaut - + &About %1 &À propos de %1 - - + + Select Profile Sélectionner un profil - + Open File... Ouvrir... - - - - + + + + Open File Ouvrir - + Can't open %1 because of not valid file format Impossible d'ouvrir %1, format invalide diff --git a/res/gta5sync_ru.qm b/res/gta5sync_ru.qm index ff96a180195b84d39143a4aaa5634c3c375e8e55..8579c33255d6edb154d0109202a0e5d00730acbe 100644 GIT binary patch delta 2481 zcmY+Fc~n&A8OEQPxwG7RXHgtM1QazW0s;~?F>yl_1XK`&K~Z)Efl)z|_EZP7u`wl} zQfeA8xZsM$4UCasjv&WyXv7e;TAR2;(@>LGO^NH#KGT~&(tqZ6zdPUe-gkN4_dD`j zwe5v!lhqLn;7!2Tq;U8cKwSw8nhyw<0C#slI|o?U0{DgjRxRK^5isc$T9*Lh&0LRH zXx#!V?f`NG2vs`)odLq$-vD`EL1-0#j5Y{8*uA~5t1V3nBqu~X1Xk$tDZ=pRJ z4R~?ga~??FqOi~xhMmd4kiGB?SqHqjQDNb6_&E(1J%pdr@Uk)RyXZrnhu`-MZrNk_ zx5WYD*23RuZ%)6$+%CKx83PBRb%@Dlq$Qb{`4$=X6tUsA81*&8H*uZ+434xUz@rZp z6}th~tN7!QUPe-hJ$VCx1RD-*>;w$)_~_{>AkdDxmw3(?kMDLdTbW&WP&%6qhpD80 z1OT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P21cp4YDE zbWK-k?ENq1f3KVw<_^SmDV>kjFtQruQVyGFlBj$g$#I&Mq;#)64JfHPXARPsn4>c* zQtAGvl3neqTpy9b4fu`nZT(Z0q*1xoNM&R8D~?V!X^f9*=nrT{fohC!;~4g-_93U+ z*(53Iq#37XJzDZ z>$S6wOL%!iXw3$4V5!y?D9}*2b}8P2cSNrCXdi3rTWaxia7vbxS^UB{9WM12|66ph z z*8Z;LULhS!&36|2clk8Cv*%ZL>B!aj^wK=;g)W`5&pMwg;JnWoDTp1 diff --git a/res/gta5sync_ru.ts b/res/gta5sync_ru.ts index b28a2bf..f73b9a3 100644 --- a/res/gta5sync_ru.ts +++ b/res/gta5sync_ru.ts @@ -293,7 +293,7 @@ Grand Theft Auto V Snapmatic картинок и сохранений - + Background Colour: <span style="color: %1">%1</span> Цвет фона: <span style="color: %1">%1</span> @@ -324,29 +324,81 @@ Grand Theft Auto V Snapmatic картинок и сохраненийОт&мена - + + Custom Avatar + Custom Avatar Description in SC, don't use Special Character! + + + + + Custom Picture + Custom Picture Description in SC, don't use Special Character! + + + + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Ты точно хочешь использовать квадратное изображение вне зоны аватарки? Если это аватар, то изображение будет обрезано! - + Snapmatic Avatar Zone Зона Snapmatic Аватарки - + Select Colour... Выбрать цвет... - MapPreviewDialog + MapLocationDialog - + Snapmatic Map Viewer Просмотрщик карты Snapmatic + + X: %1 +Y: %2 + X and Y position + X: %1 +Y: %2 + + + + &Close + &Закрыть + + + + &Apply + &Применить + + + + &Revert + + + + + &Set + + + + + &Done + + + + + X: %1 +Y: %2 + X and Y position + X: %1 +Y: %2 + OptionsDialog @@ -483,38 +535,55 @@ When you want to use it as Avatar the image will be detached! - Language Язык - + + Interface + + + + + + + + Current: %1 + + + + + Areas + + + + Sync Sync - + Sync is not implemented at current time Синхронизация пока ещё не реализована - + Apply changes Применить изменения - + &OK OK, Cancel, Apply &ОК - + Discard changes Отвергнуть изменения - + &Cancel OK, Cancel, Apply От&мена @@ -531,25 +600,37 @@ When you want to use it as Avatar the image will be detached! %1 (%2 если имеется) - + %1 (Next Closest Language) First language a person can talk with a different person/application. "Native" or "Not Native". - + System System in context of System default Система - + + %1 (Closest to Interface) + Next closest language compared to the Interface + + + + + Auto + Automatic language choice. + + + + %1 %1 %1 - + The new Custom Folder will initialise after you restart %1. Другая папка будет загружена после перезапуска %1. @@ -562,15 +643,15 @@ When you want to use it as Avatar the image will be detached! Язык изменится после перезапуска %1. - + No Profile No Profile, as default Нет профиля - - - + + + Profile: %1 Профиль: %1 @@ -651,7 +732,7 @@ When you want to use it as Avatar the image will be detached! - + Export as &Picture... Экспортировать как &картинку... @@ -661,7 +742,7 @@ When you want to use it as Avatar the image will be detached! - + Export as &Snapmatic... Экспортировать как &Snapmatic... @@ -676,7 +757,7 @@ When you want to use it as Avatar the image will be detached! - + &Edit Properties... &Изменить свойства... @@ -917,30 +998,30 @@ Press 1 for Default View Закрыть профиль - + Loading... Загрузка... - - + + Import... Импортировать... - - - - - - - - - - - - - + + + + + + + + + + + + + Import Импортировать @@ -949,31 +1030,31 @@ Press 1 for Default View Все файлы профиля (SGTA* PGTA*) - - + + Savegames files (SGTA*) Файлы сохранения (SGTA*) - - + + Snapmatic pictures (PGTA*) Картинка Snapmatic (PGTA*) - - + + All files (**) Все файлы (**) - - + + Import file %1 of %2 files Импортируются файлы %1 из %2 - + Import failed with... %1 @@ -982,14 +1063,14 @@ Press 1 for Default View %1 - - + + Failed to read Snapmatic picture Не удалось загрузить картинку Snapmatic - - + + Failed to read Savegame file Не удалось загрузить файл сохранения @@ -998,9 +1079,9 @@ Press 1 for Default View Не получилось импортировать %1 из-за неправильного формата файла - - - + + + No valid file is selected Выбранный файл неверен @@ -1018,93 +1099,93 @@ Press 1 for Default View Все изображения (*.jpg *.png) - + Importable files (%1) Файлы для импорта (%1) - + All image files (%1) Все файлы изображений (%1) - + Can't import %1 because file can't be parsed properly Не получилось импортировать %1, файл не может быть правильно обработан - + Can't import %1 because file format can't be detected Не получилось импортировать %1, не удалось определить формат файла - + Failed to import the Snapmatic picture, file not begin with PGTA or end with .g5e Не удалось импортировать картинку Snapmatic, название не начинается с PGTA или не заканчивается с .g5e - + Failed to import the Snapmatic picture, the picture is already in the game Не удалось импортировать картинку Snapmatic, картинка уже в игре - + Failed to import the Snapmatic picture, can't copy the file into profile Не удалось импортировать картинку Snapmatic, не получилось скопировать файл в профиль - + Failed to import the Savegame, can't copy the file into profile Не удалось импортировать сохранение, не получилось скопировать файл в профиль - + Failed to import the Savegame, no Savegame slot is left Не удалось импортировать сохранение, нет пустых ячеек под сохранения - - + + JPG pictures and GTA Snapmatic Картинки JPG и GTA Snapmatic - - + + JPG pictures only Только картинки JPG - - + + GTA Snapmatic only Только GTA Snapmatic - + Initialising export... Подготовка к экспорту... - - + + No Snapmatic pictures or Savegames files are selected Не выделены ни один Snapmatic или сохранение - - - + + + Remove selected Снять выделение - + You really want remove the selected Snapmatic picutres and Savegame files? Точно ли хочешь удалить выбранные картинки Snapmatic и файлы сохранений? - + Failed at remove the complete selected Snapmatic pictures and/or Savegame files Не удалось удалить полностью выбранные картинки Snapmatic и/или файлы сохранений @@ -1125,20 +1206,20 @@ Press 1 for Default View Не получилось имортировать копию сохранения, потому что не осталось свободных под них слотов - - - - + + + + Export selected Экспортировать выделенное - + %1Export Snapmatic pictures%2<br><br>JPG pictures make it possible to open the picture with a Image Viewer<br>GTA Snapmatic make it possible to import the picture into the game<br><br>Export as: %1Эскпортировать картинки Snapmatic%2<br><br>Картинки JPG можно открыть любым просмотрщиком<br>Картинки формата GTA Snapmatic можно снова импортировать в игру<br><br>Экспортировать как: - + Export selected... Экпортировать выделенное... @@ -1147,7 +1228,7 @@ Press 1 for Default View Подготавливаю эскпорт... - + Export failed with... %1 @@ -1163,13 +1244,13 @@ Press 1 for Default View Экспортируется файл %1 из %2 - + All profile files (*.g5e SGTA* PGTA*) Все файлы профиля (*.g5e SGTA* PGTA*) - - + + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -1319,32 +1400,32 @@ Press 1 for Default View Не удалось удалить сохранение %1 - + &View &Просмотр - + &Remove &Удалить - + &Select &Выбрать - + &Deselect Сн&ять выбор - + Select &All В&ыбрать все - + &Deselect All Снять выбо&р со всех @@ -1354,7 +1435,7 @@ Press 1 for Default View Копировать сохранение - + &Export &Экспортировать @@ -1414,6 +1495,7 @@ Press 1 for Default View + Snapmatic Properties Свойства Snapmatic @@ -1526,6 +1608,7 @@ Press 1 for Default View Нет + Patching of Snapmatic Properties failed because of I/O Error Не удалось измененить свойства Snapmatic из-за проблемы ввода/вывода @@ -1609,17 +1692,17 @@ Press 1 for Default View Не удалось удалить %1 из колелкции картинок Snapmatic - + Edi&t &Правка - + Show &In-game Показывать в &игре - + Hide &In-game Ск&рыть в игре @@ -1628,7 +1711,7 @@ Press 1 for Default View &Изменить свойства... - + &Export &Экспорт @@ -1641,32 +1724,32 @@ Press 1 for Default View Экс&портировать как GTA Snapmatic... - + &View По&казать - + &Remove У&далить - + &Select &Выделить - + &Deselect Сн&ять выделение - + Select &All В&ыбрать все - + &Deselect All Снять выбо&р со всех @@ -1887,16 +1970,16 @@ Press 1 for Default View - - + + Select Profile Выбор профиля - + - + Select GTA V Folder... Выбрать папку GTA V... @@ -1909,25 +1992,25 @@ Press 1 for Default View - + &About %1 &О программе %1 - + Open File... Открыть файл... - - - - + + + + Open File Открыть файл - + Can't open %1 because of not valid file format Не удалось открыть %1 из-за неверного формата файла