picture parsing is now on Thread, design changes
This commit is contained in:
parent
e7a878c36a
commit
7d099291ad
48 changed files with 235 additions and 128 deletions
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -38,7 +38,7 @@ CrewDatabase::CrewDatabase(QObject *parent) : QObject(parent)
|
|||
QString dirPath = dir.absolutePath();
|
||||
QString defaultConfPath = dirPath + "/crews.ini";
|
||||
|
||||
QSettings confPathSettings("Syping Gaming Team","gta5sync");
|
||||
QSettings confPathSettings("Syping","gta5sync");
|
||||
confPathSettings.beginGroup("Database");
|
||||
QString confPathFile = confPathSettings.value("Location", defaultConfPath).toString();
|
||||
confPathSettings.endGroup();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -68,7 +68,7 @@ void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture, bool readOk)
|
|||
|
||||
if (picture->isPicOk())
|
||||
{
|
||||
ui->labPicture->setPixmap(picture->getPixmap());
|
||||
ui->labPicture->setPixmap(QPixmap::fromImage(picture->getPicture(), Qt::AutoColor));
|
||||
ui->cmdExport->setEnabled(true);
|
||||
}
|
||||
if (picture->isJsonOk())
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -38,7 +38,7 @@ ProfileDatabase::ProfileDatabase(QObject *parent) : QObject(parent)
|
|||
QString dirPath = dir.absolutePath();
|
||||
QString defaultConfPath = dirPath + "/players.ini";
|
||||
|
||||
QSettings confPathSettings("Syping Gaming Team","gta5sync");
|
||||
QSettings confPathSettings("Syping","gta5sync");
|
||||
confPathSettings.beginGroup("Database");
|
||||
QString confPathFile = confPathSettings.value("Location", defaultConfPath).toString();
|
||||
confPathSettings.endGroup();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "ui_ProfileInterface.h"
|
||||
#include "SnapmaticWidget.h"
|
||||
#include "SavegameWidget.h"
|
||||
#include "ProfileLoader.h"
|
||||
#include <QSpacerItem>
|
||||
#include <QFileInfo>
|
||||
#include <QRegExp>
|
||||
|
@ -50,42 +51,26 @@ void ProfileInterface::setProfileFolder(QString folder, QString profile)
|
|||
|
||||
void ProfileInterface::setupProfileInterface()
|
||||
{
|
||||
QDir profileDir;
|
||||
profileDir.setPath(profileFolder);
|
||||
ui->labProfileContent->setText(contentStr.arg(profileName));
|
||||
|
||||
profileDir.setNameFilters(QStringList("PGTA*"));
|
||||
QStringList SnapmaticPics = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
||||
foreach(const QString &SnapmaticPic, SnapmaticPics)
|
||||
{
|
||||
QString picturePath = profileFolder + "/" + SnapmaticPic;
|
||||
SnapmaticPicture *picture = new SnapmaticPicture(picturePath);
|
||||
if (picture->readingPicture())
|
||||
{
|
||||
SnapmaticWidget *picWidget = new SnapmaticWidget(profileDB);
|
||||
picWidget->setSnapmaticPicture(picture, picturePath);
|
||||
ui->vlSnapmatic->addWidget(picWidget);
|
||||
crewDB->addCrew(picture->getCrewNumber());
|
||||
}
|
||||
}
|
||||
QSpacerItem *snapmaticSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
ui->vlSnapmatic->addSpacerItem(snapmaticSpacer);
|
||||
ProfileLoader *profileLoader = new ProfileLoader(profileFolder, crewDB);
|
||||
QObject::connect(profileLoader, SIGNAL(savegameLoaded(SavegameData*, QString)), this, SLOT(on_savegameLoaded(SavegameData*, QString)));
|
||||
QObject::connect(profileLoader, SIGNAL(pictureLoaded(SnapmaticPicture*, QString)), this, SLOT(on_pictureLoaded(SnapmaticPicture*, QString)));
|
||||
profileLoader->start();
|
||||
}
|
||||
|
||||
profileDir.setNameFilters(QStringList("SGTA*"));
|
||||
QStringList SavegameFiles = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
||||
foreach(const QString &SavegameFile, SavegameFiles)
|
||||
{
|
||||
QString sgdPath = profileFolder + "/" + SavegameFile;
|
||||
SavegameData *savegame = new SavegameData(sgdPath);
|
||||
if (savegame->readingSavegame())
|
||||
{
|
||||
SavegameWidget *sgdWidget = new SavegameWidget();
|
||||
sgdWidget->setSavegameData(savegame, sgdPath);
|
||||
ui->vlSavegame->addWidget(sgdWidget);
|
||||
}
|
||||
}
|
||||
QSpacerItem *savegameSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
ui->vlSavegame->addSpacerItem(savegameSpacer);
|
||||
void ProfileInterface::on_savegameLoaded(SavegameData *savegame, QString savegamePath)
|
||||
{
|
||||
SavegameWidget *sgdWidget = new SavegameWidget();
|
||||
sgdWidget->setSavegameData(savegame, savegamePath);
|
||||
ui->vlSavegame->addWidget(sgdWidget);
|
||||
}
|
||||
|
||||
void ProfileInterface::on_pictureLoaded(SnapmaticPicture *picture, QString picturePath)
|
||||
{
|
||||
SnapmaticWidget *picWidget = new SnapmaticWidget(profileDB);
|
||||
picWidget->setSnapmaticPicture(picture, picturePath);
|
||||
ui->vlSnapmatic->addWidget(picWidget);
|
||||
}
|
||||
|
||||
void ProfileInterface::on_cmdCloseProfile_clicked()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -19,7 +19,9 @@
|
|||
#ifndef PROFILEINTERFACE_H
|
||||
#define PROFILEINTERFACE_H
|
||||
|
||||
#include "SnapmaticPicture.h"
|
||||
#include "ProfileDatabase.h"
|
||||
#include "SavegameData.h"
|
||||
#include "CrewDatabase.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
@ -38,6 +40,8 @@ public:
|
|||
|
||||
private slots:
|
||||
void on_cmdCloseProfile_clicked();
|
||||
void on_pictureLoaded(SnapmaticPicture *picture, QString picturePath);
|
||||
void on_savegameLoaded(SavegameData *savegame, QString savegamePath);
|
||||
|
||||
private:
|
||||
ProfileDatabase *profileDB;
|
||||
|
|
|
@ -64,13 +64,16 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hlContent">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="vlSnapmatic"/>
|
||||
</item>
|
||||
<layout class="QVBoxLayout" name="vlContent">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="vlSavegame"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="vlSnapmatic"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
66
ProfileLoader.cpp
Executable file
66
ProfileLoader.cpp
Executable file
|
@ -0,0 +1,66 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "ProfileLoader.h"
|
||||
#include "SnapmaticPicture.h"
|
||||
#include "SavegameData.h"
|
||||
#include "CrewDatabase.h"
|
||||
#include <QStringList>
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
ProfileLoader::ProfileLoader(QString profileFolder, CrewDatabase *crewDB, QObject *parent) : QThread(parent), profileFolder(profileFolder), crewDB(crewDB)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ProfileLoader::run()
|
||||
{
|
||||
QDir profileDir;
|
||||
profileDir.setPath(profileFolder);
|
||||
profileDir.setNameFilters(QStringList("SGTA*"));
|
||||
QStringList SavegameFiles = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
||||
QStringList BackupFiles = SavegameFiles.filter(".bak", Qt::CaseInsensitive);
|
||||
foreach(const QString &BackupFile, BackupFiles)
|
||||
{
|
||||
SavegameFiles.removeAll(BackupFile);
|
||||
}
|
||||
foreach(const QString &SavegameFile, SavegameFiles)
|
||||
{
|
||||
QString sgdPath = profileFolder + "/" + SavegameFile;
|
||||
SavegameData *savegame = new SavegameData(sgdPath);
|
||||
if (savegame->readingSavegame())
|
||||
{
|
||||
emit savegameLoaded(savegame, sgdPath);
|
||||
}
|
||||
}
|
||||
|
||||
profileDir.setNameFilters(QStringList("PGTA*"));
|
||||
QStringList SnapmaticPics = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
||||
foreach(const QString &SnapmaticPic, SnapmaticPics)
|
||||
{
|
||||
QString picturePath = profileFolder + "/" + SnapmaticPic;
|
||||
SnapmaticPicture *picture = new SnapmaticPicture(picturePath);
|
||||
if (picture->readingPicture())
|
||||
{
|
||||
emit pictureLoaded(picture, picturePath);
|
||||
crewDB->addCrew(picture->getCrewNumber());
|
||||
}
|
||||
}
|
||||
}
|
46
ProfileLoader.h
Executable file
46
ProfileLoader.h
Executable file
|
@ -0,0 +1,46 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef PROFILELOADER_H
|
||||
#define PROFILELOADER_H
|
||||
|
||||
#include "SnapmaticPicture.h"
|
||||
#include "SavegameData.h"
|
||||
#include "CrewDatabase.h"
|
||||
#include <QThread>
|
||||
#include <QDir>
|
||||
|
||||
class ProfileLoader : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ProfileLoader(QString profileFolder, CrewDatabase *crewDB, QObject *parent = 0);
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
private:
|
||||
QString profileFolder;
|
||||
CrewDatabase *crewDB;
|
||||
|
||||
signals:
|
||||
void pictureLoaded(SnapmaticPicture *picture, QString picturePath);
|
||||
void savegameLoaded(SavegameData *savegame, QString savegamePath);
|
||||
};
|
||||
|
||||
#endif // PROFILELOADER_H
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -14,8 +14,24 @@
|
|||
<string>Savegame Widget</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hlSavegameContent">
|
||||
<item>
|
||||
<widget class="QLabel" name="labSavegamePic">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="app.qrc">:/img/savegame.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labSavegameStr">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>The Third Way (100%) - 00/00/00 00:00:00</string>
|
||||
</property>
|
||||
|
@ -24,19 +40,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hsSavegameWidget">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdCopy">
|
||||
<property name="text">
|
||||
|
@ -53,6 +56,8 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="app.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -21,8 +21,8 @@
|
|||
#include <QJsonObject>
|
||||
#include <QVariantMap>
|
||||
#include <QJsonArray>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QImage>
|
||||
#include <QFile>
|
||||
|
||||
SnapmaticPicture::SnapmaticPicture(QString fileName, QObject *parent) : QObject(parent), picFileName(fileName)
|
||||
|
@ -36,7 +36,7 @@ SnapmaticPicture::SnapmaticPicture(QString fileName, QObject *parent) : QObject(
|
|||
jsonStreamLength = 3076;
|
||||
|
||||
// INIT PIC
|
||||
cachePicture = QPixmap(0,0);
|
||||
cachePicture = QImage(0, 0, QImage::Format_RGB32);
|
||||
pictureStr = "";
|
||||
lastStep = "";
|
||||
picOk = 0;
|
||||
|
@ -95,7 +95,7 @@ bool SnapmaticPicture::readingPicture()
|
|||
return false;
|
||||
}
|
||||
QByteArray jpegRawContent = picFile->read(jpegPicStreamLength);
|
||||
picOk = cachePicture.loadFromData(jpegRawContent);
|
||||
picOk = cachePicture.loadFromData(jpegRawContent, "JPEG");
|
||||
|
||||
// Read JSON Stream
|
||||
if (!picFile->isReadable())
|
||||
|
@ -145,9 +145,9 @@ bool SnapmaticPicture::readingPictureFromFile(QString fileName)
|
|||
}
|
||||
}
|
||||
|
||||
void SnapmaticPicture::setPixmap(QPixmap pixmap)
|
||||
void SnapmaticPicture::setPicture(QImage picture)
|
||||
{
|
||||
cachePicture = pixmap;
|
||||
cachePicture = picture;
|
||||
}
|
||||
|
||||
QString SnapmaticPicture::getPictureStr()
|
||||
|
@ -160,7 +160,7 @@ QString SnapmaticPicture::getLastStep()
|
|||
return lastStep;
|
||||
}
|
||||
|
||||
QPixmap SnapmaticPicture::getPixmap()
|
||||
QImage SnapmaticPicture::getPicture()
|
||||
{
|
||||
return cachePicture;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -21,8 +21,8 @@
|
|||
|
||||
#include <QStringList>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QString>
|
||||
#include <QImage>
|
||||
#include <QFile>
|
||||
|
||||
class SnapmaticPicture : public QObject
|
||||
|
@ -32,9 +32,9 @@ public:
|
|||
explicit SnapmaticPicture(QString fileName = "", QObject *parent = 0);
|
||||
bool readingPictureFromFile(QString fileName);
|
||||
bool readingPicture();
|
||||
void setPixmap(QPixmap pixmap);
|
||||
void setPicture(QImage picture);
|
||||
bool isPicOk();
|
||||
QPixmap getPixmap();
|
||||
QImage getPicture();
|
||||
QString getLastStep();
|
||||
QString getPictureStr();
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
|||
QString getSnapmaticJSONString(QByteArray jsonBytes);
|
||||
QString convertDrawStringForLog(QString inputStr);
|
||||
QString convertLogStringForDraw(QString inputStr);
|
||||
QPixmap cachePicture;
|
||||
QImage cachePicture;
|
||||
QString picFileName;
|
||||
QString pictureStr;
|
||||
QString lastStep;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -38,7 +38,7 @@ SnapmaticWidget::~SnapmaticWidget()
|
|||
|
||||
void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture, QString picturePath)
|
||||
{
|
||||
QPixmap SnapmaticPixmap = picture->getPixmap();
|
||||
QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getPicture(), Qt::AutoColor);
|
||||
SnapmaticPixmap.scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
ui->labPicStr->setText(picture->getPictureStr());
|
||||
ui->labPicture->setPixmap(SnapmaticPixmap);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -41,6 +41,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labPicStr">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PHOTO - 00/00/00 00:00:00</string>
|
||||
</property>
|
||||
|
@ -49,19 +55,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hsView">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cmdView">
|
||||
<property name="text">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -40,7 +40,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, Q
|
|||
ui->setupUi(this);
|
||||
|
||||
// init settings
|
||||
QSettings SyncSettings("Syping Gaming Team", "gta5sync");
|
||||
QSettings SyncSettings("Syping", "gta5sync");
|
||||
SyncSettings.beginGroup("dir");
|
||||
bool forceDir = SyncSettings.value("force", false).toBool();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>625</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
<width>625</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -48,7 +48,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<width>625</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
3
app.qrc
3
app.qrc
|
@ -4,4 +4,7 @@
|
|||
<file>qt_de.qm</file>
|
||||
<file>qtbase_de.qm</file>
|
||||
</qresource>
|
||||
<qresource prefix="/img">
|
||||
<file>savegame.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
4
app.rc
4
app.rc
|
@ -19,11 +19,11 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Syping Gaming Team\0"
|
||||
VALUE "CompanyName", "Syping"
|
||||
VALUE "FileDescription", "Grand Theft Auto V Sync\0"
|
||||
VALUE "FileVersion", "1.0.0.0\0"
|
||||
VALUE "InternalName", "gta5sync\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2015-2016 Syping Gaming Team\0"
|
||||
VALUE "LegalCopyright", "Copyright © 2015-2016 Syping\0"
|
||||
VALUE "OriginalFilename", "gta5sync.exe\0"
|
||||
VALUE "ProductName", "Grand Theft Auto V Sync\0"
|
||||
VALUE "ProductVersion", "1.0.0.0\0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#/*****************************************************************************
|
||||
#* gta5sync GRAND THEFT AUTO V SYNC
|
||||
#* Copyright (C) 2015-2016 Syping Gaming Team
|
||||
#* Copyright (C) 2015-2016 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
|
||||
|
@ -37,7 +37,8 @@ SOURCES += main.cpp \
|
|||
UserInterface.cpp \
|
||||
ProfileInterface.cpp \
|
||||
SnapmaticWidget.cpp \
|
||||
SavegameWidget.cpp
|
||||
SavegameWidget.cpp \
|
||||
ProfileLoader.cpp
|
||||
|
||||
HEADERS += \
|
||||
SnapmaticPicture.h \
|
||||
|
@ -51,7 +52,8 @@ HEADERS += \
|
|||
UserInterface.h \
|
||||
ProfileInterface.h \
|
||||
SnapmaticWidget.h \
|
||||
SavegameWidget.h
|
||||
SavegameWidget.h \
|
||||
ProfileLoader.h
|
||||
|
||||
FORMS += \
|
||||
PictureDialog.ui \
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
@ -40,7 +40,7 @@ int main(int argc, char *argv[])
|
|||
a.setApplicationVersion("1.0.0");
|
||||
|
||||
// Loading translation settings
|
||||
QSettings settings("Syping Gaming Team", "gta5sync");
|
||||
QSettings settings("Syping", "gta5sync");
|
||||
settings.beginGroup("Interface");
|
||||
QString language = settings.value("Language","System").toString();
|
||||
settings.endGroup();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* gta5sync GRAND THEFT AUTO V SYNC
|
||||
* Copyright (C) 2016 Syping Gaming Team
|
||||
* Copyright (C) 2016 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
|
||||
|
|
BIN
savegame.png
Executable file
BIN
savegame.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in a new issue