From ed559f3ce9e97f2c00f7e6d2ed9387959883a257 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 1 May 2017 05:05:55 +0200 Subject: [PATCH] DPI awareness and latest changes from gta5sync --- .travis.yml | 6 +- AboutDialog.cpp | 5 + AppEnv.cpp | 18 ++- AppEnv.h | 3 + ImportDialog.cpp | 12 +- ImportDialog.h | 2 + OptionsDialog.cpp | 4 + PictureDialog.cpp | 72 +++++++--- ProfileInterface.cpp | 6 + ProfileInterface.ui | 9 +- SavegameDialog.cpp | 5 + SavegameDialog.ui | 2 +- SavegameWidget.cpp | 8 ++ SavegameWidget.ui | 7 +- SnapmaticEditor.cpp | 5 + SnapmaticPicture.cpp | 1 + SnapmaticWidget.cpp | 4 + UserInterface.cpp | 11 +- config.h | 4 +- gta5view.pro | 6 +- lang/gta5sync_ru.ts | 336 +++++++++++++++++++++++-------------------- res/app.rc | 8 +- res/gta5view.desktop | 22 +-- res/gta5view.png | Bin 0 -> 7189 bytes 24 files changed, 343 insertions(+), 213 deletions(-) create mode 100644 res/gta5view.png diff --git a/.travis.yml b/.travis.yml index a4bbfb3..9a051ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,15 +24,15 @@ before_script: - echo "Grand Theft Auto V Snapmatic and Savegame viewer" > ./description-pak script: - - qmake -qt=5 "DEFINES+=GTA5SYNC_BUILDTYPE=\\\\\\\"Developer\\\\\\\"" "DEFINES+=GTA5SYNC_DAILYB=\\\\\\\"$PACKAGE_VERSION-dev2\\\\\\\"" ../gta5view.pro + - qmake -qt=5 "DEFINES+=GTA5SYNC_BUILDTYPE=\\\\\\\"Developer\\\\\\\"" "DEFINES+=GTA5SYNC_DAILYB=\\\\\\\"$PACKAGE_VERSION-dev4\\\\\\\"" ../gta5view.pro - make -j 4 - - sudo checkinstall -D --default --nodoc --pkgname=gta5view --pkgversion=$PACKAGE_VERSION --pkgrelease=dev2 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5 --pakdir=../package + - sudo checkinstall -D --default --nodoc --pkgname=gta5view --pkgversion=$PACKAGE_VERSION --pkgrelease=dev4 --pkggroup=utility --maintainer="Syping on Travis \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5 --pakdir=../package deploy: provider: releases api_key: secure: "o7VneEz1aHfdVwZvOZLfopf6uJWNrFsZaBvunTmXFzpmNFhlNS1qwqgMUkIA2yBRbZ3wIzVs4vfwIHv7W9yE/PqK+AYL+R8+AwKGrwlgT4HqJNuk6VM/LNJ6GwT/qkQuaoOVw29bUjmzzgIRdHmw53SlJv6Hh1VE8HphlTT//aex6nCfcFhUZ0BETdZDWz5FSHwL3NalUoqfKfQrJeky5RXzCyCANQC2tKt0bV46GaWIgWrDo2KCTNqPtRWWf5GDmnkXE5IYRMQ3mXvO9iYh0v5Y2jo4PiXGUiFUU6Z3aAWFAiPdGclrBO697cf3lCTzDMhuCETR153qFYsLShUlFf61ITAmCeHAWETjZDri0lmPONo3GoNB6alGfYEA51qw14kXakrTpICtTJj7gw/gtUYOabW6hrzmieNzMBIy62RikDPjyakFnuwW2qNHRlD65e0jYv+6nCpb6E+OV16Ysh1zhV2vTfpfzVmSuyu2J+ELqXD3OZCXRSPpDIih9UQ8335p8FBji6jHORcgym/TRgdgRmENibh8tLzWp+UjpWHuWfcpvZgOskjfwU0iDMCayMJ7tDpOhXHcAhDRnd6XRIiOJ5YZCzflj2nEwmt3YUd7DwXS/AU+WHOmcNQBjXBxF/FJa35XXcy3HKJM5TTKqtph3medo30us5yXHeG6NNg=" - file: "../package/gta5view_$PACKAGE_VERSION-dev2_amd64.deb" + file: "../package/gta5view_$PACKAGE_VERSION-dev4_amd64.deb" skip_cleanup: true on: tags: true diff --git a/AboutDialog.cpp b/AboutDialog.cpp index 871d21a..31edc7d 100755 --- a/AboutDialog.cpp +++ b/AboutDialog.cpp @@ -19,6 +19,7 @@ #include #include "AboutDialog.h" #include "ui_AboutDialog.h" +#include "AppEnv.h" #include "config.h" AboutDialog::AboutDialog(QWidget *parent) : @@ -51,6 +52,10 @@ AboutDialog::AboutDialog(QWidget *parent) : { ui->cmdClose->setIcon(QIcon::fromTheme("dialog-close")); } + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + resize(375 * screenRatio, 260 * screenRatio); } AboutDialog::~AboutDialog() diff --git a/AppEnv.cpp b/AppEnv.cpp index 52ba5fd..d5b9c08 100755 --- a/AppEnv.cpp +++ b/AppEnv.cpp @@ -20,10 +20,14 @@ #include "AppEnv.h" #include "StringParser.h" #include "StandardPaths.h" -#include -#include #include +#include +#include #include +#include +#include +#include +#include #include using namespace std; @@ -130,3 +134,13 @@ QUrl AppEnv::getPlayerFetchingUrl(QString crewID, QString pageNumber) { return QUrl(QString("https://socialclub.rockstargames.com/crewsapi/GetMembersList?crewId=%1&pageNumber=%2").arg(crewID, pageNumber)); } + +qreal AppEnv::screenRatio() +{ +#if QT_VERSION >= 0x050000 + qreal dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch(); +#else + qreal dpi = qApp->desktop()->logicalDpiX(); +#endif + return (dpi / 96); +} diff --git a/AppEnv.h b/AppEnv.h index 56aefcd..332b6e1 100755 --- a/AppEnv.h +++ b/AppEnv.h @@ -37,6 +37,9 @@ public: static QByteArray getUserAgent(); static QUrl getCrewFetchingUrl(QString crewID); static QUrl getPlayerFetchingUrl(QString crewID, QString pageNumber); + + // Screen Stuff + static qreal screenRatio(); }; #endif // APPENV_H diff --git a/ImportDialog.cpp b/ImportDialog.cpp index ebce66c..19de296 100644 --- a/ImportDialog.cpp +++ b/ImportDialog.cpp @@ -18,6 +18,7 @@ #include "ImportDialog.h" #include "ui_ImportDialog.h" +#include "AppEnv.h" #include #include #include @@ -26,8 +27,6 @@ // IMAGES VALUES #define snapmaticResolutionW 960 #define snapmaticResolutionH 536 -#define snapmaticResolutionLW 430 -#define snapmaticResolutionLH 240 #define snapmaticAvatarResolution 470 #define snapmaticAvatarPlacementW 145 #define snapmaticAvatarPlacementH 66 @@ -50,6 +49,15 @@ ImportDialog::ImportDialog(QWidget *parent) : } ui->rbKeep->setChecked(true); + + qreal screenRatio = AppEnv::screenRatio(); + snapmaticResolutionLW = 430 * screenRatio; + snapmaticResolutionLH = 240 * screenRatio; + setMinimumSize(430 * screenRatio, 380 * screenRatio); + setMaximumSize(430 * screenRatio, 380 * screenRatio); + setFixedSize(430 * screenRatio, 380 * screenRatio); + ui->vlButtom->setSpacing(6 * screenRatio); + ui->vlButtom->setContentsMargins(9 * screenRatio, 6 * screenRatio, 9 * screenRatio, 9 * screenRatio); } ImportDialog::~ImportDialog() diff --git a/ImportDialog.h b/ImportDialog.h index 0503dd3..1da27fd 100644 --- a/ImportDialog.h +++ b/ImportDialog.h @@ -53,6 +53,8 @@ private: QImage workImage; QImage newImage; bool doImport; + int snapmaticResolutionLW; + int snapmaticResolutionLH; }; #endif // IMPORTDIALOG_H diff --git a/OptionsDialog.cpp b/OptionsDialog.cpp index 68bc8f9..f42c3c3 100755 --- a/OptionsDialog.cpp +++ b/OptionsDialog.cpp @@ -70,6 +70,10 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) : ui->cmdCancel->setIcon(QIcon::fromTheme("dialog-cancel")); } + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + resize(435 * screenRatio, 405 * screenRatio); + setupTreeWidget(); setupLanguageBox(); setupRadioButtons(); diff --git a/PictureDialog.cpp b/PictureDialog.cpp index dca0ef3..24ec3ee 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -26,6 +26,7 @@ #include "StringParser.h" #include "GlobalString.h" #include "UiModLabel.h" +#include "AppEnv.h" #ifdef GTA5SYNC_WIN #if QT_VERSION >= 0x050200 @@ -118,7 +119,15 @@ void PictureDialog::setupPictureDialog(bool withDatabase_) withDatabase = withDatabase_; // Avatar area - avatarAreaPicture = QImage(":/img/avatararea.png"); + qreal screenRatio = AppEnv::screenRatio(); + if (screenRatio != 1) + { + avatarAreaPicture = QImage(":/img/avatararea.png").scaledToHeight(536 * screenRatio, Qt::FastTransformation); + } + else + { + avatarAreaPicture = QImage(":/img/avatararea.png"); + } avatarLocX = 145; avatarLocY = 66; avatarSize = 470; @@ -147,6 +156,7 @@ void PictureDialog::setupPictureDialog(bool withDatabase_) installEventFilter(this); installEventFilter(ui->labPicture); + ui->labPicture->setFixedSize(960 * screenRatio, 536 * screenRatio); ui->labPicture->setFocusPolicy(Qt::StrongFocus); } @@ -343,28 +353,29 @@ void PictureDialog::dialogPreviousPictureRequested() void PictureDialog::renderOverlayPicture() { // Generating Overlay Preview - QRect preferedRect = QRect(0, 0, 200, 160); + qreal screenRatio = AppEnv::screenRatio(); + QRect preferedRect = QRect(0, 0, 200 * screenRatio, 160 * screenRatio); QString overlayText = tr("Key 1 - Avatar Preview Mode\nKey 2 - Toggle Overlay\nArrow Keys - Navigate"); QImage overlayImage(1, 1, QImage::Format_ARGB32_Premultiplied); overlayImage.fill(Qt::transparent); QPainter overlayPainter(&overlayImage); QFont overlayPainterFont; - overlayPainterFont.setPixelSize(12); + overlayPainterFont.setPixelSize(12 * screenRatio); 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) + if (overlaySpace.height() < 74 * screenRatio) { hOverlay = Qt::AlignVCenter; - preferedRect.setHeight(71); - overlaySpace.setHeight(80); + preferedRect.setHeight(71 * screenRatio); + overlaySpace.setHeight(80 * screenRatio); } else { - overlaySpace.setHeight(overlaySpace.height() + 6); + overlaySpace.setHeight(overlaySpace.height() + 6 * screenRatio); } overlayImage = overlayImage.scaled(overlaySpace.size()); @@ -374,13 +385,13 @@ void PictureDialog::renderOverlayPicture() overlayPainter.drawText(preferedRect, Qt::AlignLeft | hOverlay | Qt::TextDontClip | Qt::TextWordWrap, overlayText); overlayPainter.end(); - if (overlaySpace.width() < 194) + if (overlaySpace.width() < 194 * screenRatio) { - overlaySpace.setWidth(200); + overlaySpace.setWidth(200 * screenRatio); } else { - overlaySpace.setWidth(overlaySpace.width() + 6); + overlaySpace.setWidth(overlaySpace.width() + 6 * screenRatio); } QImage overlayBorderImage(overlaySpace.width(), overlaySpace.height(), QImage::Format_ARGB6666_Premultiplied); @@ -390,7 +401,7 @@ void PictureDialog::renderOverlayPicture() overlayTempImage.fill(Qt::transparent); QPainter overlayTempPainter(&overlayTempImage); overlayTempPainter.drawImage(0, 0, overlayBorderImage); - overlayTempPainter.drawImage(3, 3, overlayImage); + overlayTempPainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayImage); overlayTempPainter.end(); } @@ -502,35 +513,58 @@ void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture) void PictureDialog::renderPicture() { + qreal screenRatio = AppEnv::screenRatio(); if (!previewMode) { if (overlayEnabled) { - QPixmap overlayAreaPixmap(960, 536); + QPixmap overlayAreaPixmap(960 * screenRatio, 536 * screenRatio); overlayAreaPixmap.fill(Qt::transparent); QPainter overlayAreaPainter(&overlayAreaPixmap); - overlayAreaPainter.drawImage(0, 0, snapmaticPicture); - overlayAreaPainter.drawImage(3, 3, overlayTempImage); + if (screenRatio == 1) + { + overlayAreaPainter.drawImage(0, 0, snapmaticPicture); + overlayAreaPainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayTempImage); + } + else + { + overlayAreaPainter.drawImage(0, 0, snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation)); + overlayAreaPainter.drawImage(3 * screenRatio, 3 * screenRatio, overlayTempImage); + } overlayAreaPainter.end(); ui->labPicture->setPixmap(overlayAreaPixmap); } else { - ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture)); + if (screenRatio != 1) + { + ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation))); + } + else + { + ui->labPicture->setPixmap(QPixmap::fromImage(snapmaticPicture)); + } } } else { // Generating Avatar Preview - QPixmap avatarPixmap(960, 536); + QPixmap avatarPixmap(960 * screenRatio, 536 * screenRatio); QPainter snapPainter(&avatarPixmap); QFont snapPainterFont; - snapPainterFont.setPixelSize(12); - snapPainter.drawImage(0, 0, snapmaticPicture); + snapPainterFont.setPixelSize(12 * screenRatio); + if (screenRatio == 1) + { + snapPainter.drawImage(0, 0, snapmaticPicture); + } + else + { + snapPainter.drawImage(0, 0, snapmaticPicture.scaledToHeight(536 * screenRatio, Qt::SmoothTransformation)); + } 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.drawText(QRect(3 * screenRatio, 3 * screenRatio, 140 * screenRatio, 60 * screenRatio), Qt::AlignLeft | Qt::TextWordWrap, tr("Avatar Preview Mode\nPress 1 for Default View")); snapPainter.end(); ui->labPicture->setPixmap(avatarPixmap); } diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index 8a74524..0c33024 100755 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -28,6 +28,7 @@ #include "ProfileLoader.h" #include "ExportThread.h" #include "ImportDialog.h" +#include "AppEnv.h" #include "config.h" #include #include @@ -73,6 +74,11 @@ ProfileInterface::ProfileInterface(ProfileDatabase *profileDB, CrewDatabase *cre { ui->cmdCloseProfile->setIcon(QIcon::fromTheme("dialog-close")); } + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + ui->hlButtons->setSpacing(6 * screenRatio); + ui->hlButtons->setContentsMargins(9 * screenRatio, 9 * screenRatio, 9 * screenRatio, 9 * screenRatio); } ProfileInterface::~ProfileInterface() diff --git a/ProfileInterface.ui b/ProfileInterface.ui index 0e33355..1186939 100755 --- a/ProfileInterface.ui +++ b/ProfileInterface.ui @@ -27,7 +27,7 @@ 0 - 9 + 0 @@ -108,8 +108,8 @@ 0 0 - 398 - 256 + 98 + 28 @@ -160,6 +160,9 @@ 9 + + 9 + diff --git a/SavegameDialog.cpp b/SavegameDialog.cpp index b9ee746..99447ce 100755 --- a/SavegameDialog.cpp +++ b/SavegameDialog.cpp @@ -1,6 +1,7 @@ #include "SavegameDialog.h" #include "ui_SavegameDialog.h" #include "SavegameCopy.h" +#include "AppEnv.h" #include SavegameDialog::SavegameDialog(QWidget *parent) : @@ -18,6 +19,10 @@ SavegameDialog::SavegameDialog(QWidget *parent) : { ui->cmdClose->setIcon(QIcon::fromTheme("dialog-close")); } + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + resize(400 * screenRatio, 105 * screenRatio); } SavegameDialog::~SavegameDialog() diff --git a/SavegameDialog.ui b/SavegameDialog.ui index 75a2cc7..a0a5e52 100755 --- a/SavegameDialog.ui +++ b/SavegameDialog.ui @@ -7,7 +7,7 @@ 0 0 400 - 104 + 105 diff --git a/SavegameWidget.cpp b/SavegameWidget.cpp index 200713d..6783bf9 100755 --- a/SavegameWidget.cpp +++ b/SavegameWidget.cpp @@ -23,6 +23,7 @@ #include "StandardPaths.h" #include "SavegameData.h" #include "SavegameCopy.h" +#include "AppEnv.h" #include #include #include @@ -46,6 +47,13 @@ SavegameWidget::SavegameWidget(QWidget *parent) : ui->cmdDelete->setVisible(false); ui->cbSelected->setVisible(false); + qreal screenRatio = AppEnv::screenRatio(); + ui->labSavegamePic->setFixedSize(48 * screenRatio, 27 * screenRatio); + + QPixmap savegamePixmap(":/img/savegame.png"); + if (screenRatio != 1) savegamePixmap = savegamePixmap.scaledToHeight(ui->labSavegamePic->height(), Qt::SmoothTransformation); + ui->labSavegamePic->setPixmap(savegamePixmap); + QString exportSavegameStr = tr("Export Savegame..."); Q_UNUSED(exportSavegameStr) diff --git a/SavegameWidget.ui b/SavegameWidget.ui index d148f66..81ea544 100755 --- a/SavegameWidget.ui +++ b/SavegameWidget.ui @@ -50,9 +50,6 @@ - - :/img/savegame.png - @@ -130,8 +127,6 @@ - - - + diff --git a/SnapmaticEditor.cpp b/SnapmaticEditor.cpp index b4cbb0a..046ce8e 100644 --- a/SnapmaticEditor.cpp +++ b/SnapmaticEditor.cpp @@ -20,6 +20,7 @@ #include "ui_SnapmaticEditor.h" #include "SnapmaticPicture.h" #include "StringParser.h" +#include "AppEnv.h" #include #include #include @@ -44,6 +45,10 @@ SnapmaticEditor::SnapmaticEditor(CrewDatabase *crewDB, QWidget *parent) : snapmaticTitle = ""; smpic = 0; + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + resize(400 * screenRatio, 360 * screenRatio); } SnapmaticEditor::~SnapmaticEditor() diff --git a/SnapmaticPicture.cpp b/SnapmaticPicture.cpp index b13aff0..d5cbf29 100755 --- a/SnapmaticPicture.cpp +++ b/SnapmaticPicture.cpp @@ -813,6 +813,7 @@ bool SnapmaticPicture::exportPicture(const QString &fileName, const QString form } else { + delete picFile; return false; } } diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp index 4f28c0c..ddb9b73 100755 --- a/SnapmaticWidget.cpp +++ b/SnapmaticWidget.cpp @@ -24,6 +24,7 @@ #include "PictureDialog.h" #include "PictureExport.h" #include "StringParser.h" +#include "AppEnv.h" #include "config.h" #include #include @@ -87,6 +88,9 @@ void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture) picStr = picture->getPictureStr(); QObject::connect(picture, SIGNAL(updated()), this, SLOT(snapmaticUpdated())); + qreal screenRatio = AppEnv::screenRatio(); + ui->labPicture->setFixedSize(48 * screenRatio, 27 * screenRatio); + QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getImage().scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::AutoColor); ui->labPicStr->setText(picStr + "\n" + picTitl + ""); ui->labPicture->setPixmap(SnapmaticPixmap); diff --git a/UserInterface.cpp b/UserInterface.cpp index d546bfd..60e7afb 100755 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -78,6 +78,12 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D ui->actionExit->setIcon(QIcon::fromTheme("application-exit")); #endif } + + // DPI calculation + qreal screenRatio = AppEnv::screenRatio(); + resize(625 * screenRatio, 500 * screenRatio); + ui->vlUserInterface->setSpacing(6 * screenRatio); + ui->vlUserInterface->setContentsMargins(9 * screenRatio, 9 * screenRatio, 9 * screenRatio, 9 * screenRatio); } void UserInterface::setupDirEnv() @@ -139,11 +145,12 @@ void UserInterface::setupDirEnv() void UserInterface::setupProfileUi() { + qreal screenRatio = AppEnv::screenRatio(); if (GTAV_Profiles.length() == 0) { QPushButton *changeDirBtn = new QPushButton(tr("Select >A V Folder..."), ui->swSelection); changeDirBtn->setObjectName("cmdChangeDir"); - changeDirBtn->setMinimumSize(0, 40); + changeDirBtn->setMinimumSize(0, 40 * screenRatio); changeDirBtn->setAutoDefault(true); ui->vlButtons->addWidget(changeDirBtn); profileBtns.append(changeDirBtn); @@ -154,7 +161,7 @@ void UserInterface::setupProfileUi() { QPushButton *profileBtn = new QPushButton(GTAV_Profile, ui->swSelection); profileBtn->setObjectName(GTAV_Profile); - profileBtn->setMinimumSize(0, 40); + profileBtn->setMinimumSize(0, 40 * screenRatio); profileBtn->setAutoDefault(true); ui->vlButtons->addWidget(profileBtn); profileBtns.append(profileBtn); diff --git a/config.h b/config.h index 71257a2..dfe4780 100755 --- a/config.h +++ b/config.h @@ -1,5 +1,5 @@ /***************************************************************************** -* gta5sync GRAND THEFT AUTO V SYNC +* gta5view Grand Theft Auto V Profile Viewer * Copyright (C) 2016-2017 Syping * * This program is free software: you can redistribute it and/or modify @@ -50,7 +50,7 @@ #ifndef GTA5SYNC_APPVER #ifndef GTA5SYNC_DAILYB -#define GTA5SYNC_APPVER "1.4.0-dev3" +#define GTA5SYNC_APPVER "1.4.0-dev4" #else #define GTA5SYNC_APPVER QString("%1").arg(GTA5SYNC_DAILYB) #endif diff --git a/gta5view.pro b/gta5view.pro index 7bace77..80327dd 100755 --- a/gta5view.pro +++ b/gta5view.pro @@ -21,11 +21,10 @@ QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras -DEFINES += GTA5SYNC_DISABLED # disabling sync (remove it for building gta5sync) +DEFINES += GTA5SYNC_DISABLED DEPLOYMENT.display_name = gta5view TARGET = gta5view - TEMPLATE = app SOURCES += main.cpp \ @@ -118,6 +117,7 @@ DISTFILES += res/app.rc \ res/gta5sync_de.ts \ res/gta5sync_fr.ts \ res/gta5view.exe.manifest \ + res/gta5view.png \ lang/qtbase_ru.qm \ lang/gta5sync_ru.ts \ lang/qt_ru.qm \ @@ -157,6 +157,6 @@ isEqual(QT_MAJOR_VERSION, 4): SOURCES += qjson4/QJsonArray.cpp \ unix: !macx: appfiles.path = $$(INSTALL_PATH)/share/applications unix: !macx: appfiles.files = $$PWD/res/gta5view.desktop unix: !macx: pixmaps.path = $$(INSTALL_PATH)/share/pixmaps -unix: !macx: pixmaps.files = $$PWD/res/gta5view.xpm +unix: !macx: pixmaps.files = $$PWD/res/gta5view.png unix: !macx: target.path = $$(INSTALL_PATH)/bin unix: !macx: INSTALLS += target pixmaps appfiles diff --git a/lang/gta5sync_ru.ts b/lang/gta5sync_ru.ts index bd2cb52..cbfb4ed 100755 --- a/lang/gta5sync_ru.ts +++ b/lang/gta5sync_ru.ts @@ -40,18 +40,26 @@ Copyright &copy; <a href="%5">%6</a> %7<br/>%8 i Закрыть - + A project for viewing Grand Theft Auto V Snapmatic<br/> Pictures and Savegames - + A project for viewing and sync Grand Theft Auto V Snapmatic<br/> Pictures and Savegames + + CrewDatabase + + + No Crew + + + ExportDialog @@ -315,44 +323,44 @@ Pictures and Savegames - + System System like PC System - + %1 (%2 if available) System like PC System = %1, System Language like Deutsch = %2 - + %1 %1 - + The new Custom Folder will initialize after you restart %1. - + The language change will take effect after you restart %1. - + No Profile No Profile, as default - - + + Profile: %1 @@ -389,7 +397,6 @@ Pictures and Savegames - &Export @@ -400,6 +407,7 @@ Pictures and Savegames + Export Экспорт @@ -413,54 +421,54 @@ Pictures and Savegames Закрыть - + Export as &JPG picture... - + Export as &GTA Snapmatic... - + Key 1 - Avatar Preview Mode Key 2 - Toggle Overlay Arrow Keys - Navigate - - + + Snapmatic Picture Viewer Просмотрщик фотографий Snapmatic - - + + Failed at %1 Ошибка при %1 - + Avatar Preview Mode Press 1 for Default View - - + + No player Игроков нет - - + + No crew Без группы - + Unknown Location @@ -573,27 +581,27 @@ Press 1 for Default View Загружается файл %1 из %2 - + %1 %2 - + Import exported file - + &Import... - + Close profile - + &Close @@ -606,29 +614,29 @@ Press 1 for Default View Закрыть профиль - + Loading... Загрузка... - - + + Import... - - - - - - - - - - - - + + + + + + + + + + + + Import @@ -637,138 +645,138 @@ Press 1 for Default View Все файлы профиля (SGTA* PGTA*) - - + + Savegames files (SGTA*) Файлы сохранения (SGTA*) - - + + Snapmatic pictures (PGTA*) Картинка Snapmatic (PGTA*) - - + + All files (**) Все файлы (**) - + Import file %1 of %2 files - + Import failed with... %1 - - + + Failed to read Snapmatic picture Не удалось загрузить картинку Snapmatic - - + + Failed to read Savegame file Не удалось загрузить файл сохранения - + Can't import %1 because of not valid file format Не получилось импортировать %1 из-за неправильного формата файла - - - + + + No valid file is selected Выбранный файл неверен - + Enabled pictures: %1 of %2 - + Importable files (*.g5e *.jpg *.png SGTA* PGTA*) - + All image files (*.jpg *.png) - + 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 - - + + JPG pictures and GTA Snapmatic - - + + JPG pictures only - - + + GTA Snapmatic only - - + + 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 @@ -789,30 +797,30 @@ 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: - + Export selected... - + Initializing export... - + Export failed with... %1 @@ -826,13 +834,13 @@ Press 1 for Default View - + All profile files (*.g5e SGTA* PGTA*) - - + + GTA V Export (*.g5e) @@ -854,7 +862,7 @@ Press 1 for Default View SavegameDialog - + Savegame Viewer Просмотрщик сохранений @@ -882,7 +890,7 @@ Press 1 for Default View Закрыть - + Failed at %1 Ошибка при %1 @@ -974,34 +982,34 @@ Press 1 for Default View Не удалось удалить сохранение %1 - + &View - + &Remove - - + + &Select - + &Deselect - - + + Select &All - + &Deselect All @@ -1011,7 +1019,7 @@ Press 1 for Default View Копировать сохранение - + &Export @@ -1071,7 +1079,7 @@ Press 1 for Default View - + Snapmatic Properties @@ -1082,13 +1090,11 @@ Press 1 for Default View - Editor - Selfie @@ -1099,96 +1105,116 @@ Press 1 for Default View - Mugshot - + Director - + + Snapmatic Values + + + + + + Crew: %1 (%2) + + + + Meme - - + Snapmatic Title - - + + Title: %1 (%2) - - - + + + Appropriate: %1 - + Extras - + Qualify as Avatar automatically at apply - + Qualify as Avatar allows you to use this Snapmatic as a Social Club profile picture - + &Apply - + &Cancel - + + Edit - + Yes Yes, should work fine - + No No, could lead to issues - + Patching of Snapmatic Properties failed because of I/O Error - + New Snapmatic title: + + + Snapmatic Crew + + + + + New Snapmatic crew: + + SnapmaticPicture - + PHOTO - %1 @@ -1232,85 +1258,85 @@ Press 1 for Default View - - + + Delete picture Удалить картинку - + Are you sure to delete %1 from your Snapmatic pictures? Уверены, что хотите удалить %1 из коллекции картинок Snapmatic? - + Failed at deleting %1 from your Snapmatic pictures Не удалось удалить %1 из колелкции картинок Snapmatic - + Edi&t - + Show &In-game - + Hide &In-game - + &Edit Properties... - + &Export - + Export as &JPG picture... - + Export as &GTA Snapmatic... - + &View - + &Remove - - + + &Select - + &Deselect - - + + Select &All - + &Deselect All @@ -1520,15 +1546,15 @@ Press 1 for Default View - + Select Profile - + - + Select GTA V Folder... @@ -1545,20 +1571,20 @@ Press 1 for Default View - + Open File... - - - - + + + + Open File - + Can't open %1 because of not valid file format diff --git a/res/app.rc b/res/app.rc index 1f7cbcb..8ec6e6c 100755 --- a/res/app.rc +++ b/res/app.rc @@ -7,8 +7,8 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "gta5view.exe.manifest" #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 1, 4, 0, 0 -PRODUCTVERSION 1, 4, 0, 0 +FILEVERSION 1, 4, 0, 4 +PRODUCTVERSION 1, 4, 0, 4 FILEFLAGSMASK 0x3fL FILEFLAGS 0 FILEOS VOS_NT_WINDOWS32 @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Syping" VALUE "FileDescription", "gta5view\0" - VALUE "FileVersion", "1.4.0-dev3\0" + VALUE "FileVersion", "1.4.0-dev4\0" VALUE "InternalName", "gta5view\0" VALUE "LegalCopyright", "Copyright 2016-2017 Syping\0" VALUE "OriginalFilename", "gta5view.exe\0" VALUE "ProductName", "gta5view\0" - VALUE "ProductVersion", "1.4.0-dev3\0" + VALUE "ProductVersion", "1.4.0-dev4\0" END END END diff --git a/res/gta5view.desktop b/res/gta5view.desktop index 168bfd0..28c99d7 100644 --- a/res/gta5view.desktop +++ b/res/gta5view.desktop @@ -1,11 +1,11 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Type=Application -Name=gta5view -Comment=gta5view -Categories=Qt;Application;Utility; -Exec=gta5view -Icon=gta5view -Terminal=false -StartupNotify=false +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Type=Application +Name=gta5view +Comment=gta5view +Categories=Qt;Application;Utility; +Exec=gta5view +Icon=gta5view +Terminal=false +StartupNotify=false diff --git a/res/gta5view.png b/res/gta5view.png new file mode 100644 index 0000000000000000000000000000000000000000..bf41d479af7bb427e459e294b9b3f99f84de21a8 GIT binary patch literal 7189 zcmbVxi9eKI*#3+)yONX%No5^J6S8k(tR))CR|_qoq`2G4Gq8S!umb3z~x9^-5JmJkRO zfKbR0HsH<9r^E$}d@YUiAZ0zL7l44pRo7G(0;x>mqC2qyF^Bgx8(#>7w+;M(c6gOM z00vL_8Cd&SdAaxnI{6?W-cIhGe)673zcWhm|H)rcxXR+O2!X(2jrDbJ1=%lAxX9>V zS?sI746aWnb3gn~TKGP9VLMXEha=-$ARAAz^z^ZeYl!Wcrux&#cAUg5*QO3k6Lo*NIy`jc^QH}hu@jyx`*%))utq?tvjoNcidnPy zoxKk89;R5Tz{l2+{q@hK0wBLy2TTf3lIomq5GF$}_>T%5NBU`VEkaW8kGSF$WHQ@s zgXBZsz+}zCWKJMiiw8{BmbKNo7KU?g4=El46f{dmc5B??*p^ml z_mlZcAnAn)X1Q9c$&h4X5fD~!(3z~Gi9}CjnRrW!05+2Kjfx(_`21U`k`Ry5^VWgR z1{N}%9L>TWo(}8)?3#;ECjUm2ROU+wBDuEV6>OQKgSr-}@jgP1*v~APo+cnZQqle< z(^To9KqAOG##Y)g>tcnKjkmNRKtY^)|V4%KGbj~l#~3WWk{l{ORIER6DWjmQV!QxJ9lP;ll1;D}={5`<1596f|c(C7G}Pf5_{7(2jsJd~49-;X#erD4d3M0d8CzFg9tBEiIbsP|<$1ywH|WSC(iGY* zjD~sip+yb{>Z6p+Nb{qA+O@uV=1E;Q2)GmaSXA5HT&Vnld8O1^F?>d zpBGrI4S|((#iqb30p{n>0jeWmua$2C93$A^xQ;{j2cR9zLwL;*t6ZBKSp>04?eviW zi);j#@AQ!dVLzxiENblxcXGISyf9yj352#FYyco}={^9f!Z?9_T{;eqqBxsaNRGZh z+X0mhgaCU?762hTu*G#YLVtk1OO0PcfHmR*VCR|v2nE1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