Browse Source

icon added, about dialog added, translation updated

1.3.x
Rafael 6 years ago
parent
commit
7e8dd80a74
  1. BIN
      5sync.ico
  2. BIN
      5sync.png
  3. 40
      AboutDialog.cpp
  4. 44
      AboutDialog.h
  5. 114
      AboutDialog.ui
  6. 1
      PictureDialog.cpp
  7. 12
      UserInterface.cpp
  8. 1
      UserInterface.h
  9. 2
      app.qrc
  10. 2
      app.rc
  11. 9
      gta5sync.pro
  12. BIN
      gta5sync_de.qm
  13. 36
      gta5sync_de.ts

BIN
5sync.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
5sync.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

40
AboutDialog.cpp

@ -0,0 +1,40 @@
/*****************************************************************************
* 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 "AboutDialog.h"
#include "ui_AboutDialog.h"
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":/img/5sync.png"));
aboutStr = ui->labAbout->text();
ui->labAbout->setText(aboutStr.arg(qApp->applicationVersion(), QT_VERSION_STR, qVersion()));
}
AboutDialog::~AboutDialog()
{
delete ui;
}
void AboutDialog::on_cmdClose_clicked()
{
this->close();
}

44
AboutDialog.h

@ -0,0 +1,44 @@
/*****************************************************************************
* 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 ABOUTDIALOG_H
#define ABOUTDIALOG_H
#include <QDialog>
namespace Ui {
class AboutDialog;
}
class AboutDialog : public QDialog
{
Q_OBJECT
public:
explicit AboutDialog(QWidget *parent = 0);
~AboutDialog();
private slots:
void on_cmdClose_clicked();
private:
Ui::AboutDialog *ui;
QString aboutStr;
};
#endif // ABOUTDIALOG_H

114
AboutDialog.ui

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutDialog</class>
<widget class="QDialog" name="AboutDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>375</width>
<height>250</height>
</rect>
</property>
<property name="windowTitle">
<string>About gta5sync</string>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="vlAbout">
<item>
<widget class="QScrollArea" name="saAbout">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="saAboutContent">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>357</width>
<height>201</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vlAboutContent">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labAbout">
<property name="text">
<string>&lt;span style=&quot; font-weight:600;&quot;&gt;gta5sync&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;A project for viewing and sync Grand Theft Auto 5 Snapmatic Pictures and Savegames&lt;br/&gt;&lt;br/&gt;Project version: %1&lt;br/&gt;Compiled with Qt %2&lt;br/&gt;Running with Qt %3&lt;br/&gt;&lt;br/&gt;Copyright © &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping&lt;/a&gt; 2016&lt;br/&gt;gta5sync is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="vsAboutContent">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="hlButtons">
<item>
<spacer name="hsButtons">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cmdClose">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

1
PictureDialog.cpp

@ -42,6 +42,7 @@ PictureDialog::PictureDialog(ProfileDatabase *profileDB, QWidget *parent) :
ui(new Ui::PictureDialog)
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":/img/5sync.png"));
windowTitleStr = this->windowTitle();
jsonDrawString = ui->labJSON->text();
ui->cmdExport->setEnabled(0);

12
UserInterface.cpp

@ -19,6 +19,7 @@
#include "UserInterface.h"
#include "ui_UserInterface.h"
#include "ProfileInterface.h"
#include "AboutDialog.h"
#include <QHBoxLayout>
#include <QSpacerItem>
#include <QPushButton>
@ -41,6 +42,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D
ui(new Ui::UserInterface)
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":/img/5sync.png"));
profileOpen = 0;
profileUI = 0;
@ -174,3 +176,13 @@ void UserInterface::openSelectProfile()
{
// not needed right now
}
void UserInterface::on_actionAbout_gta5sync_triggered()
{
AboutDialog *aboutDialog = new AboutDialog(this);
aboutDialog->setWindowFlags(aboutDialog->windowFlags()^Qt::WindowContextHelpButtonHint);
aboutDialog->show();
aboutDialog->exec();
aboutDialog->deleteLater();
delete aboutDialog;
}

1
UserInterface.h

@ -43,6 +43,7 @@ private slots:
void on_actionExit_triggered();
void on_actionSelect_profile_triggered();
void on_profileButton_clicked();
void on_actionAbout_gta5sync_triggered();
private:
ProfileDatabase *profileDB;

2
app.qrc

@ -6,5 +6,7 @@
</qresource>
<qresource prefix="/img">
<file>savegame.png</file>
<file>5sync.ico</file>
<file>5sync.png</file>
</qresource>
</RCC>

2
app.rc

@ -1,4 +1,4 @@
//IDI_ICON1 ICON DISCARDABLE "gta5sync.ico"
IDI_ICON1 ICON DISCARDABLE "5sync.ico"
#include <windows.h>

9
gta5sync.pro

@ -38,7 +38,8 @@ SOURCES += main.cpp \
ProfileInterface.cpp \
SnapmaticWidget.cpp \
SavegameWidget.cpp \
ProfileLoader.cpp
ProfileLoader.cpp \
AboutDialog.cpp
HEADERS += \
SnapmaticPicture.h \
@ -53,7 +54,8 @@ HEADERS += \
ProfileInterface.h \
SnapmaticWidget.h \
SavegameWidget.h \
ProfileLoader.h
ProfileLoader.h \
AboutDialog.h
FORMS += \
PictureDialog.ui \
@ -61,7 +63,8 @@ FORMS += \
UserInterface.ui \
ProfileInterface.ui \
SnapmaticWidget.ui \
SavegameWidget.ui
SavegameWidget.ui \
AboutDialog.ui
TRANSLATIONS += \
gta5sync_de.ts

BIN
gta5sync_de.qm

Binary file not shown.

36
gta5sync_de.ts

@ -1,6 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="de_DE">
<context>
<name>AboutDialog</name>
<message>
<location filename="AboutDialog.ui" line="14"/>
<source>About gta5sync</source>
<translation>Über gta5sync</translation>
</message>
<message utf8="true">
<location filename="AboutDialog.ui" line="59"/>
<source>&lt;span style=&quot; font-weight:600;&quot;&gt;gta5sync&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;A project for viewing and sync Grand Theft Auto 5 Snapmatic Pictures and Savegames&lt;br/&gt;&lt;br/&gt;Project version: %1&lt;br/&gt;Compiled with Qt %2&lt;br/&gt;Running with Qt %3&lt;br/&gt;&lt;br/&gt;Copyright © &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping&lt;/a&gt; 2016&lt;br/&gt;gta5sync is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="AboutDialog.ui" line="101"/>
<source>Close</source>
<translation>Schließen</translation>
</message>
</context>
<context>
<name>PictureDialog</name>
<message>
@ -48,28 +66,28 @@
<translation>Keine Crew</translation>
</message>
<message>
<location filename="PictureDialog.cpp" line="155"/>
<location filename="PictureDialog.cpp" line="158"/>
<source>JPEG picture (*.jpg);;Portable Network Graphics (*.png)</source>
<translation>JPEG Bild (*.jpg);;Portable Network Graphics (*.png)</translation>
</message>
<message>
<location filename="PictureDialog.cpp" line="156"/>
<location filename="PictureDialog.cpp" line="159"/>
<source>Export picture</source>
<translation>Bild exportieren</translation>
</message>
<message>
<location filename="PictureDialog.cpp" line="232"/>
<location filename="PictureDialog.cpp" line="238"/>
<location filename="PictureDialog.cpp" line="235"/>
<location filename="PictureDialog.cpp" line="241"/>
<source>Snapmatic Picture Exporter</source>
<translation>Snapmatic Bild Exporter</translation>
</message>
<message>
<location filename="PictureDialog.cpp" line="232"/>
<location filename="PictureDialog.cpp" line="235"/>
<source>Failed to save the picture</source>
<translation>Fehlgeschlagen beim Speichern des Bildes</translation>
</message>
<message>
<location filename="PictureDialog.cpp" line="238"/>
<location filename="PictureDialog.cpp" line="241"/>
<source>No valid file is selected</source>
<translation>Keine gültige Datei wurde ausgewählt</translation>
</message>
@ -213,7 +231,7 @@
</message>
<message>
<location filename="UserInterface.ui" line="110"/>
<location filename="UserInterface.cpp" line="121"/>
<location filename="UserInterface.cpp" line="122"/>
<source>Close</source>
<translation>Schließen</translation>
</message>
@ -238,12 +256,12 @@
<translation>Strg+P</translation>
</message>
<message>
<location filename="UserInterface.cpp" line="74"/>
<location filename="UserInterface.cpp" line="75"/>
<source>GTA V Folder not found!</source>
<translation>GTA V Ordner nicht gefunden!</translation>
</message>
<message>
<location filename="UserInterface.cpp" line="74"/>
<location filename="UserInterface.cpp" line="75"/>
<source>gta5sync</source>
<translation>gta5sync</translation>
</message>

Loading…
Cancel
Save