diff --git a/PictureCopy.cpp b/PictureCopy.cpp
new file mode 100755
index 0000000..3ccba87
--- /dev/null
+++ b/PictureCopy.cpp
@@ -0,0 +1,98 @@
+/*****************************************************************************
+* 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 .
+*****************************************************************************/
+
+#include "PictureCopy.h"
+#include "PictureDialog.h"
+#include "SidebarGenerator.h"
+#include
+#include
+#include
+
+PictureCopy::PictureCopy()
+{
+
+}
+
+void PictureCopy::CopyPicture(QWidget *parent, QString picPath)
+{
+ QSettings settings("Syping", "gta5sync");
+ settings.beginGroup("FileDialogs");
+
+fileDialogPreSave:
+ QFileInfo sgdFileInfo(picPath);
+ QFileDialog fileDialog(parent);
+ fileDialog.setFileMode(QFileDialog::AnyFile);
+ fileDialog.setViewMode(QFileDialog::Detail);
+ fileDialog.setAcceptMode(QFileDialog::AcceptSave);
+ fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
+ fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true);
+ fileDialog.setDefaultSuffix("");
+ fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
+ fileDialog.setWindowTitle(PictureDialog::tr("Copy picture"));
+
+ QStringList filters;
+ filters << PictureDialog::tr("Snapmatic pictures (PGTA*)");
+ filters << PictureDialog::tr("All files (**)");
+ fileDialog.setNameFilters(filters);
+
+ QList sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls());
+
+ fileDialog.setSidebarUrls(sidebarUrls);
+ fileDialog.restoreState(settings.value("CopyPicture","").toByteArray());
+ fileDialog.selectFile(sgdFileInfo.fileName());
+
+ if (fileDialog.exec())
+ {
+ QStringList selectedFiles = fileDialog.selectedFiles();
+ if (selectedFiles.length() == 1)
+ {
+ QString selectedFile = selectedFiles.at(0);
+
+ if (QFile::exists(selectedFile))
+ {
+ if (QMessageBox::Yes == QMessageBox::warning(parent, PictureDialog::tr("Copy picture"), PictureDialog::tr("Overwrite %1 with current Snapmatic picture?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))
+ {
+ if (!QFile::remove(selectedFile))
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Copy picture"), PictureDialog::tr("Failed to overwrite %1 with current Snapmatic picture").arg("\""+selectedFile+"\""));
+ goto fileDialogPreSave;
+ }
+ }
+ else
+ {
+ goto fileDialogPreSave;
+ }
+ }
+
+ bool isCopied = QFile::copy(picPath, selectedFile);
+ if (!isCopied)
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Copy picture"), PictureDialog::tr("Failed to copy current Snapmatic picture"));
+ goto fileDialogPreSave;
+ }
+ }
+ else
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Copy picture"), PictureDialog::tr("No valid file is selected"));
+ goto fileDialogPreSave;
+ }
+ }
+
+ settings.setValue("CopyPicture", fileDialog.saveState());
+ settings.endGroup();
+}
diff --git a/PictureCopy.h b/PictureCopy.h
new file mode 100755
index 0000000..b80ef05
--- /dev/null
+++ b/PictureCopy.h
@@ -0,0 +1,32 @@
+/*****************************************************************************
+* 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 .
+*****************************************************************************/
+
+#ifndef PICTURECOPY_H
+#define PICTURECOPY_H
+
+#include
+#include
+
+class PictureCopy
+{
+public:
+ PictureCopy();
+ static void CopyPicture(QWidget *parent, QString picPath);
+};
+
+#endif // PICTURECOPY_H
diff --git a/PictureDialog.cpp b/PictureDialog.cpp
index 379e15c..1163c0d 100755
--- a/PictureDialog.cpp
+++ b/PictureDialog.cpp
@@ -21,6 +21,8 @@
#include "ui_PictureDialog.h"
#include "SidebarGenerator.h"
#include "StandardPaths.h"
+#include "PictureExport.h"
+#include "PictureCopy.h"
#include "UiModLabel.h"
#include
@@ -161,200 +163,12 @@ void PictureDialog::on_cmdClose_clicked()
void PictureDialog::on_cmdExport_clicked()
{
- QSettings settings("Syping", "gta5sync");
- settings.beginGroup("FileDialogs");
-
-fileDialogPreSave:
- QFileDialog fileDialog(this);
- fileDialog.setFileMode(QFileDialog::AnyFile);
- fileDialog.setViewMode(QFileDialog::Detail);
- fileDialog.setAcceptMode(QFileDialog::AcceptSave);
- fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
- fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true);
- fileDialog.setDefaultSuffix("suffix");
- fileDialog.setWindowTitle(tr("Export picture"));
- fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
-
- QStringList filters;
- filters << tr("JPEG picture (*.jpg)");
- filters << tr("Portable Network Graphics (*.png)");
- fileDialog.setNameFilters(filters);
-
- QList sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls());
-
- fileDialog.setSidebarUrls(sidebarUrls);
- fileDialog.restoreState(settings.value("ExportPicture","").toByteArray());
-
- if (smpic != 0)
- {
- QString newPictureFileName;
- QString pictureStr = smpic->getPictureStr();
- QStringList pictureStrList = pictureStr.split(" - ");
- if (pictureStrList.length() <= 2)
- {
- QString dtStr = pictureStrList.at(1);
- QStringList dtStrList = dtStr.split(" ");
- if (dtStrList.length() <= 2)
- {
- QString dayStr;
- QString yearStr;
- QString monthStr;
- QString dateStr = dtStrList.at(0);
- QString timeStr = dtStrList.at(1);
- timeStr.replace(":","");
- QStringList dateStrList = dateStr.split("/");
- if (dateStrList.length() <= 3)
- {
- dayStr = dateStrList.at(1);
- yearStr = dateStrList.at(2);
- monthStr = dateStrList.at(0);
- }
- QString cmpPicTitl = picTitl;
- cmpPicTitl.replace(" ", "_");
- newPictureFileName = yearStr + monthStr + dayStr + timeStr + "_" + cmpPicTitl + ".jpg";
- }
- }
- fileDialog.selectFile(newPictureFileName);
- }
-
- if (fileDialog.exec())
- {
- QStringList selectedFiles = fileDialog.selectedFiles();
- if (selectedFiles.length() == 1)
- {
- QString saveFileFormat;
- QString selectedFile = selectedFiles.at(0);
-
- if (selectedFile.right(4) == ".jpg")
- {
- saveFileFormat = "JPEG";
- }
- else if (selectedFile.right(4) == ".jpeg")
- {
- saveFileFormat = "JPEG";
- }
- else if (selectedFile.right(4) == ".png")
- {
- saveFileFormat = "PNG";
- }
- else if (selectedFile.right(7) == ".suffix")
- {
- if (fileDialog.selectedNameFilter() == "JPEG picture (*.jpg)")
- {
- selectedFile.replace(".suffix", ".jpg");
- }
- else if (fileDialog.selectedNameFilter() == "Portable Network Graphics (*.png)")
- {
- selectedFile.replace(".suffix", ".png");
- }
- else
- {
- selectedFile.replace(".suffix", ".jpg");
- }
- }
-
- if (QFile::exists(selectedFile))
- {
- if (QMessageBox::Yes == QMessageBox::warning(this, tr("Export picture"), tr("Overwrite %1 with current Snapmatic picture?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))
- {
- if (!QFile::remove(selectedFile))
- {
- QMessageBox::warning(this, tr("Export picture"), tr("Failed to overwrite %1 with current Snapmatic picture").arg("\""+selectedFile+"\""));
- goto fileDialogPreSave;
- }
- }
- else
- {
- goto fileDialogPreSave;
- }
- }
-
- bool isSaved = ui->labPicture->pixmap()->save(selectedFile, saveFileFormat.toStdString().c_str(), 100);
-
- if (!isSaved)
- {
- QMessageBox::warning(this, tr("Export picture"), tr("Failed to export current Snapmatic picture"));
- goto fileDialogPreSave;
- }
- }
- else
- {
- QMessageBox::warning(this, tr("Export picture"), tr("No valid file is selected"));
- goto fileDialogPreSave;
- }
- }
-
- settings.setValue("ExportPicture", fileDialog.saveState());
- settings.endGroup();
+ PictureExport::ExportPicture(this, smpic);
}
void PictureDialog::on_cmdCopy_clicked()
{
- QSettings settings("Syping", "gta5sync");
- settings.beginGroup("FileDialogs");
-
-fileDialogPreSave:
- QFileInfo sgdFileInfo(picPath);
- QFileDialog fileDialog(this);
- fileDialog.setFileMode(QFileDialog::AnyFile);
- fileDialog.setViewMode(QFileDialog::Detail);
- fileDialog.setAcceptMode(QFileDialog::AcceptSave);
- fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
- fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true);
- fileDialog.setDefaultSuffix("");
- fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
- fileDialog.setWindowTitle(tr("Copy picture"));
-
- QStringList filters;
- filters << tr("Snapmatic pictures (PGTA*)");
- filters << tr("All files (**)");
- fileDialog.setNameFilters(filters);
-
- QList sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls());
-
- fileDialog.setSidebarUrls(sidebarUrls);
- fileDialog.restoreState(settings.value("CopyPicture","").toByteArray());
- fileDialog.selectFile(sgdFileInfo.fileName());
-
- if (fileDialog.exec())
- {
- QStringList selectedFiles = fileDialog.selectedFiles();
- if (selectedFiles.length() == 1)
- {
- QString selectedFile = selectedFiles.at(0);
-
- if (QFile::exists(selectedFile))
- {
- if (QMessageBox::Yes == QMessageBox::warning(this, tr("Copy picture"), tr("Overwrite %1 with current Snapmatic picture?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))
- {
- if (!QFile::remove(selectedFile))
- {
- QMessageBox::warning(this, tr("Copy picture"), tr("Failed to overwrite %1 with current Snapmatic picture").arg("\""+selectedFile+"\""));
- goto fileDialogPreSave;
- }
- }
- else
- {
- goto fileDialogPreSave;
- }
- }
-
- bool isCopied = QFile::copy(picPath, selectedFile);
- if (!isCopied)
- {
- QMessageBox::warning(this, tr("Copy picture"), tr("Failed to copy current Snapmatic picture"));
- goto fileDialogPreSave;
- }
- }
- else
- {
- QMessageBox::warning(this, tr("Copy picture"), tr("No valid file is selected"));
- goto fileDialogPreSave;
- }
- }
-
- settings.setValue("CopyPicture", fileDialog.saveState());
- settings.endGroup();
+ PictureCopy::CopyPicture(this, picPath);
}
void PictureDialog::on_labPicture_mouseDoubleClicked()
diff --git a/PictureExport.cpp b/PictureExport.cpp
new file mode 100755
index 0000000..88030fb
--- /dev/null
+++ b/PictureExport.cpp
@@ -0,0 +1,158 @@
+/*****************************************************************************
+* 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 .
+*****************************************************************************/
+
+#include "PictureExport.h"
+#include "PictureDialog.h"
+#include "SidebarGenerator.h"
+#include
+#include
+#include
+
+PictureExport::PictureExport()
+{
+
+}
+
+void PictureExport::ExportPicture(QWidget *parent, SnapmaticPicture *picture)
+{
+ QSettings settings("Syping", "gta5sync");
+ settings.beginGroup("FileDialogs");
+
+fileDialogPreSave:
+ QFileDialog fileDialog(parent);
+ fileDialog.setFileMode(QFileDialog::AnyFile);
+ fileDialog.setViewMode(QFileDialog::Detail);
+ fileDialog.setAcceptMode(QFileDialog::AcceptSave);
+ fileDialog.setOption(QFileDialog::DontUseNativeDialog, true);
+ fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true);
+ fileDialog.setDefaultSuffix("suffix");
+ fileDialog.setWindowTitle(PictureDialog::tr("Export picture"));
+ fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint);
+
+ QStringList filters;
+ filters << PictureDialog::tr("JPEG picture (*.jpg)");
+ filters << PictureDialog::tr("Portable Network Graphics (*.png)");
+ fileDialog.setNameFilters(filters);
+
+ QList sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls());
+
+ fileDialog.setSidebarUrls(sidebarUrls);
+ fileDialog.restoreState(settings.value("ExportPicture","").toByteArray());
+
+ if (picture != 0)
+ {
+ QString newPictureFileName;
+ QString pictureStr = picture->getPictureStr();
+ QStringList pictureStrList = pictureStr.split(" - ");
+ if (pictureStrList.length() <= 2)
+ {
+ QString dtStr = pictureStrList.at(1);
+ QStringList dtStrList = dtStr.split(" ");
+ if (dtStrList.length() <= 2)
+ {
+ QString dayStr;
+ QString yearStr;
+ QString monthStr;
+ QString dateStr = dtStrList.at(0);
+ QString timeStr = dtStrList.at(1);
+ timeStr.replace(":","");
+ QStringList dateStrList = dateStr.split("/");
+ if (dateStrList.length() <= 3)
+ {
+ dayStr = dateStrList.at(1);
+ yearStr = dateStrList.at(2);
+ monthStr = dateStrList.at(0);
+ }
+ QString cmpPicTitl = picture->getPictureTitl();
+ cmpPicTitl.replace(" ", "_");
+ newPictureFileName = yearStr + monthStr + dayStr + timeStr + "_" + cmpPicTitl + ".jpg";
+ }
+ }
+ fileDialog.selectFile(newPictureFileName);
+ }
+
+ if (fileDialog.exec())
+ {
+ QStringList selectedFiles = fileDialog.selectedFiles();
+ if (selectedFiles.length() == 1)
+ {
+ QString saveFileFormat;
+ QString selectedFile = selectedFiles.at(0);
+
+ if (selectedFile.right(4) == ".jpg")
+ {
+ saveFileFormat = "JPEG";
+ }
+ else if (selectedFile.right(4) == ".jpeg")
+ {
+ saveFileFormat = "JPEG";
+ }
+ else if (selectedFile.right(4) == ".png")
+ {
+ saveFileFormat = "PNG";
+ }
+ else if (selectedFile.right(7) == ".suffix")
+ {
+ if (fileDialog.selectedNameFilter() == "JPEG picture (*.jpg)")
+ {
+ selectedFile.replace(".suffix", ".jpg");
+ }
+ else if (fileDialog.selectedNameFilter() == "Portable Network Graphics (*.png)")
+ {
+ selectedFile.replace(".suffix", ".png");
+ }
+ else
+ {
+ selectedFile.replace(".suffix", ".jpg");
+ }
+ }
+
+ if (QFile::exists(selectedFile))
+ {
+ if (QMessageBox::Yes == QMessageBox::warning(parent, PictureDialog::tr("Export picture"), PictureDialog::tr("Overwrite %1 with current Snapmatic picture?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))
+ {
+ if (!QFile::remove(selectedFile))
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Export picture"), PictureDialog::tr("Failed to overwrite %1 with current Snapmatic picture").arg("\""+selectedFile+"\""));
+ goto fileDialogPreSave;
+ }
+ }
+ else
+ {
+ goto fileDialogPreSave;
+ }
+ }
+
+ bool isSaved = picture->getPicture().save(selectedFile, saveFileFormat.toStdString().c_str(), 100);
+
+ if (!isSaved)
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Export picture"), PictureDialog::tr("Failed to export current Snapmatic picture"));
+ goto fileDialogPreSave;
+ }
+ }
+ else
+ {
+ QMessageBox::warning(parent, PictureDialog::tr("Export picture"), PictureDialog::tr("No valid file is selected"));
+ goto fileDialogPreSave;
+ }
+ }
+
+ settings.setValue("ExportPicture", fileDialog.saveState());
+ settings.endGroup();
+}
diff --git a/PictureExport.h b/PictureExport.h
new file mode 100755
index 0000000..4749e61
--- /dev/null
+++ b/PictureExport.h
@@ -0,0 +1,33 @@
+/*****************************************************************************
+* 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 .
+*****************************************************************************/
+
+#ifndef PICTUREEXPORT_H
+#define PICTUREEXPORT_H
+
+#include "SnapmaticPicture.h"
+#include
+#include
+
+class PictureExport
+{
+public:
+ PictureExport();
+ static void ExportPicture(QWidget *parent, SnapmaticPicture *picture);
+};
+
+#endif // PICTUREEXPORT_H
diff --git a/SavegameCopy.h b/SavegameCopy.h
index 68decee..7f9db79 100755
--- a/SavegameCopy.h
+++ b/SavegameCopy.h
@@ -20,6 +20,7 @@
#define SAVEGAMECOPY_H
#include
+#include
class SavegameCopy
{
diff --git a/SavegameWidget.cpp b/SavegameWidget.cpp
index 4720e39..aec6deb 100755
--- a/SavegameWidget.cpp
+++ b/SavegameWidget.cpp
@@ -105,9 +105,14 @@ void SavegameWidget::mouseDoubleClickEvent(QMouseEvent *ev)
}
}
+void SavegameWidget::setChecked(bool isChecked)
+{
+ ui->cbSelected->setChecked(isChecked);
+}
+
void SavegameWidget::on_savegameSelected()
{
- ui->cbSelected->setChecked(true);
+ setChecked(true);
}
void SavegameWidget::contextMenuEvent(QContextMenuEvent *ev)
diff --git a/SavegameWidget.h b/SavegameWidget.h
index 492850f..81a72cf 100755
--- a/SavegameWidget.h
+++ b/SavegameWidget.h
@@ -37,6 +37,7 @@ public:
SavegameWidget(QWidget *parent = 0);
void setSavegameData(SavegameData *savegame, QString savegamePath);
void setSelectionMode(bool selectionMode);
+ void setChecked(bool isChecked);
~SavegameWidget();
private slots:
diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp
index ffe9aee..b2cba48 100755
--- a/SnapmaticWidget.cpp
+++ b/SnapmaticWidget.cpp
@@ -21,6 +21,8 @@
#include "SnapmaticPicture.h"
#include "DatabaseThread.h"
#include "PictureDialog.h"
+#include "PictureExport.h"
+#include "PictureCopy.h"
#include
#include
#include
@@ -34,6 +36,7 @@ SnapmaticWidget::SnapmaticWidget(ProfileDatabase *profileDB, DatabaseThread *thr
ui->setupUi(this);
ui->cmdView->setVisible(false);
ui->cmdCopy->setVisible(false);
+ ui->cmdExport->setVisible(false);
ui->cmdDelete->setVisible(false);
ui->cbSelected->setVisible(false);
picPath = "";
@@ -77,7 +80,12 @@ void SnapmaticWidget::on_cmdView_clicked()
void SnapmaticWidget::on_cmdCopy_clicked()
{
+ PictureCopy::CopyPicture(this, picPath);
+}
+void SnapmaticWidget::on_cmdExport_clicked()
+{
+ PictureExport::ExportPicture(this, smpic);
}
void SnapmaticWidget::on_cmdDelete_clicked()
@@ -110,9 +118,14 @@ void SnapmaticWidget::mouseDoubleClickEvent(QMouseEvent *ev)
}
}
+void SnapmaticWidget::setChecked(bool isChecked)
+{
+ ui->cbSelected->setChecked(isChecked);
+}
+
void SnapmaticWidget::on_pictureSelected()
{
- ui->cbSelected->setChecked(true);
+ setChecked(true);
}
void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev)
@@ -124,7 +137,8 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev)
contextMenu.addSeparator();
}
contextMenu.addAction(tr("View picture"), this, SLOT(on_cmdView_clicked()));
- contextMenu.addAction(tr("Copy picture"), this, SLOT(on_cmdView_clicked()));
+ contextMenu.addAction(tr("Copy picture"), this, SLOT(on_cmdCopy_clicked()));
+ contextMenu.addAction(tr("Export picture"), this, SLOT(on_cmdExport_clicked()));
contextMenu.addAction(tr("Delete picture"), this, SLOT(on_cmdDelete_clicked()));
contextMenu.exec(ev->globalPos());
}
diff --git a/SnapmaticWidget.h b/SnapmaticWidget.h
index 8dd5232..5cc3b62 100755
--- a/SnapmaticWidget.h
+++ b/SnapmaticWidget.h
@@ -39,11 +39,13 @@ public:
SnapmaticWidget(ProfileDatabase *profileDB, DatabaseThread *threadDB, QWidget *parent = 0);
void setSnapmaticPicture(SnapmaticPicture *picture, QString picturePath);
void setSelectionMode(bool selectionMode);
+ void setChecked(bool isChecked);
~SnapmaticWidget();
private slots:
void on_cmdView_clicked();
void on_cmdCopy_clicked();
+ void on_cmdExport_clicked();
void on_cmdDelete_clicked();
void on_pictureSelected();
void on_cbSelected_stateChanged(int arg1);
diff --git a/SnapmaticWidget.ui b/SnapmaticWidget.ui
index b389de7..5d2d22e 100755
--- a/SnapmaticWidget.ui
+++ b/SnapmaticWidget.ui
@@ -79,6 +79,13 @@
+ -
+
+
+ Export
+
+
+
-
diff --git a/gta5sync.pro b/gta5sync.pro
index cc6adcd..5786dbc 100755
--- a/gta5sync.pro
+++ b/gta5sync.pro
@@ -28,7 +28,9 @@ SOURCES += main.cpp \
CrewDatabase.cpp \
DatabaseThread.cpp \
IconLoader.cpp \
+ PictureCopy.cpp \
PictureDialog.cpp \
+ PictureExport.cpp \
ProfileDatabase.cpp \
ProfileInterface.cpp \
ProfileLoader.cpp \
@@ -50,7 +52,9 @@ HEADERS += \
CrewDatabase.h \
DatabaseThread.h \
IconLoader.h \
+ PictureCopy.h \
PictureDialog.h \
+ PictureExport.h \
ProfileDatabase.h \
ProfileInterface.h \
ProfileLoader.h \
diff --git a/lang/gta5sync_ru.ts b/lang/gta5sync_ru.ts
index ef11abd..f63cc13 100755
--- a/lang/gta5sync_ru.ts
+++ b/lang/gta5sync_ru.ts
@@ -43,11 +43,11 @@
-
-
-
-
-
+
+
+
+
+
Экспорт картинки
@@ -68,83 +68,83 @@
Закрыть
-
-
+
+
Просмотрщик фотографий Snapmatic
-
-
+
+
Ошибка при %1
-
-
+
+
Игроков нет
-
-
+
+
Без группы
-
+
Картинка JPEG (*.jpg)
-
+
Картинка Portable Network Graphics (*.png)
-
-
+
+
Перезаписать %1 текущей картинкой Snapmatic?
-
-
+
+
Не удалось перезаписать %1 картинкой Snapmatic
-
+
Не удалось экспортировать текущую картинку Snapmatic
-
-
+
+
Выбранный файл неверен
-
-
-
-
-
+
+
+
+
+
Скопировать картинку
-
+
Картинки Snapmatic (PGTA*)
-
+
Все файлы (**)
-
+
Не удалось скопировать текущую картинку Snapmatic
@@ -163,16 +163,16 @@
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
Импортировать копию
@@ -182,68 +182,68 @@
Закрыть профиль
-
+
Загрузка...
-
+
Все файлы профиля (SGTA* PGTA*)
-
+
Файлы сохранения (SGTA*)
-
+
Картинка Snapmatic (PGTA*)
-
+
Все файлы (**)
-
+
Не удалось загрузить картинку Snapmatic
-
+
Не удалось загрузить файл сохранения
-
+
Не получилось импортировать %1 из-за неправильного формата файла
-
-
+
+
Выбранный файл неверен
-
+
Не удалось имортировать копию картинки Snapmatic, т.к. файл не начинается с PGTA
-
+
Не получилось имортировать копию картинки Snapmatic, потому что не удалось его скопировать
-
+
Не получилось имортировать копию сохранения, потому что не удалось его скопировать
-
+
Не получилось имортировать копию сохранения, потому что не осталось свободных под них слотов
@@ -285,41 +285,58 @@
Виджет сохранений
-
+
Третий путь (100%) - 00/00/00 00:00:00
-
+
+
+ Просмотр
+
+
+
Копировать
-
+
Удалить
-
-
+
+
+
Удалить сохранение
-
+
Вы уверены, что хотите удалить сохранение %1?
-
+
Не удалось удалить сохранение %1
+
+
+
+
+
+
+
+
+
+
+
Копировать сохранение
@@ -362,36 +379,67 @@
Виджет Snapmatic
-
+
ФОТО - 00/00/00 00:00:00
-
+
Просмотр
-
+
+
+ Копировать
+
+
+
+
+ Экспорт
+
+
+
Удалить
-
-
+
+
+
Удалить картинку
-
+
Уверены, что хотите удалить %1 из коллекции картинок Snapmatic?
-
+
Не удалось удалить %1 из колелкции картинок Snapmatic
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Скопировать картинку
+
+
+
+
+ Экспорт картинки
+
UserInterface
diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm
index e333aa4..34a3681 100755
Binary files a/res/gta5sync_de.qm and b/res/gta5sync_de.qm differ
diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts
index fd0261c..12c8abe 100755
--- a/res/gta5sync_de.ts
+++ b/res/gta5sync_de.ts
@@ -76,77 +76,77 @@
Schließen
-
-
+
+
Snapmatic Bildansicht
-
-
+
+
Fehlgeschlagen bei %1
-
-
+
+
Keine Spieler
-
-
+
+
Keine Crew
-
+
JPEG Bild (*.jpg)
-
+
Portable Network Graphics (*.png)
-
-
+
+
Überschreibe %1 mit aktuellen Snapmatic Bild?
-
-
+
+
Fehlgeschlagen beim Überschreiben von %1 mit aktuellen Snapmatic Bild
-
+
Fehlgeschlagen beim Exportieren vom aktuellen Snapmatic Bild
-
-
-
-
-
+
+
+
+
+
Bild kopieren
-
+
Snapmatic Bilder (PGTA*)
-
+
Alle Dateien (**)
-
+
Fehlgeschlagen beim Kopieren vom Snapmatic Bild
@@ -160,11 +160,11 @@
-
-
-
-
-
+
+
+
+
+
Bild exportieren
@@ -177,8 +177,8 @@
Beim Speichern des Bildes ist ein Fehler aufgetreten
-
-
+
+
Keine gültige Datei wurde ausgewählt
@@ -198,16 +198,16 @@
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
Kopie importieren
@@ -225,68 +225,68 @@
Profil schließen
-
+
Lade...
-
+
Alle Profildateien (SGTA* PGTA*)
-
+
Spielstanddateien (SGTA*)
-
+
Snapmatic Bilder (PGTA*)
-
+
Alle Dateien (**)
-
+
Fehler beim Lesen vom Snapmatic Bild
-
+
Fehler beim Lesen von Spielstanddatei
-
+
Kann %1 nicht importieren weil das Dateiformat nicht gültig ist
-
-
+
+
Keine gültige Datei wurde ausgewählt
-
+
Fehlgeschlagenen beim Import vom Snapmatic Bild weil die Datei nicht mit PGTA begint
-
+
Fehlgeschlagenen beim Import vom Snapmatic Bild weil kopieren fehlgeschlagen ist
-
+
Fehlgeschlagenen beim Import vom Spielstand weil kopieren fehlgeschlagen ist
-
+
Fehlgeschlagenen beim Import vom Spielstand weil kein Spielstandslot mehr übrig ist
@@ -328,41 +328,58 @@
Spielstand Widget
-
+
The Third Way (100%) - 00/00/00 00:00:00
-
+
+
+ Ansehen
+
+
+
Kopieren
-
+
Löschen
-
-
+
+
+
Savegame löschen
-
+
Bist du sicher %1 von deinen Spielständen zu löschen?
-
+
Fehlgeschlagen beim Löschen %1 von deinen Spielständen
+
+
+
+ Auswählen
+
+
+
+
+ Spielstand ansehen
+
+
Spielstand kopieren
@@ -417,37 +434,68 @@
Snapmatic Widget
-
+
FOTO - 00/00/00 00:00:00
-
+
Ansehen
-
+
+
+ Kopieren
+
+
+
+
+ Exportieren
+
+
+
Löschen
-
-
+
+
+
Bild löschen
-
+
Bist du sicher %1 von deinen Snapmatic Bilder zu löschen?
+
+
+
+ Auswählen
+
+
+
+
+ Bild ansehen
+
+
+
+
+ Bild kopieren
+
+
+
+
+ Bild exportieren
+
Bist du sicher %1 von deinen Snapmatic Bilder zu löschen?
-
+
Fehlgeschlagen beim Löschen %1 von deinen Snapmatic Bildern