From f866de11370cd86daed8cd7f36d304aec38e2af6 Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 3 Apr 2016 02:27:24 +0200 Subject: [PATCH] context menu finished, german translation updated --- PictureCopy.cpp | 98 ++++++++++++++++++++++ PictureCopy.h | 32 ++++++++ PictureDialog.cpp | 194 +------------------------------------------- PictureExport.cpp | 158 ++++++++++++++++++++++++++++++++++++ PictureExport.h | 33 ++++++++ SavegameCopy.h | 1 + SavegameWidget.cpp | 7 +- SavegameWidget.h | 1 + SnapmaticWidget.cpp | 18 +++- SnapmaticWidget.h | 2 + SnapmaticWidget.ui | 7 ++ gta5sync.pro | 4 + lang/gta5sync_ru.ts | 182 ++++++++++++++++++++++++++--------------- res/gta5sync_de.qm | Bin 11183 -> 11753 bytes res/gta5sync_de.ts | 182 ++++++++++++++++++++++++++--------------- 15 files changed, 592 insertions(+), 327 deletions(-) create mode 100755 PictureCopy.cpp create mode 100755 PictureCopy.h create mode 100755 PictureExport.cpp create mode 100755 PictureExport.h 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 @@ - - - - - + + + + + Export picture Экспорт картинки @@ -68,83 +68,83 @@ Закрыть - - + + Snapmatic Picture Viewer Просмотрщик фотографий Snapmatic - - + + Failed at %1 Ошибка при %1 - - + + No player Игроков нет - - + + No crew Без группы - + JPEG picture (*.jpg) Картинка JPEG (*.jpg) - + Portable Network Graphics (*.png) Картинка Portable Network Graphics (*.png) - - + + Overwrite %1 with current Snapmatic picture? Перезаписать %1 текущей картинкой Snapmatic? - - + + Failed to overwrite %1 with current Snapmatic picture Не удалось перезаписать %1 картинкой Snapmatic - + Failed to export current Snapmatic picture Не удалось экспортировать текущую картинку Snapmatic - - + + No valid file is selected Выбранный файл неверен - - - - - + + + + + Copy picture Скопировать картинку - + Snapmatic pictures (PGTA*) Картинки Snapmatic (PGTA*) - + All files (**) Все файлы (**) - + Failed to copy current Snapmatic picture Не удалось скопировать текущую картинку Snapmatic @@ -163,16 +163,16 @@ - - - - + + + - - - - - + + + + + + Import copy Импортировать копию @@ -182,68 +182,68 @@ Закрыть профиль - + Loading... Загрузка... - + All profile files (SGTA* PGTA*) Все файлы профиля (SGTA* PGTA*) - + Savegames files (SGTA*) Файлы сохранения (SGTA*) - + Snapmatic pictures (PGTA*) Картинка Snapmatic (PGTA*) - + All files (**) Все файлы (**) - + 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 Выбранный файл неверен - + Failed to import copy of Snapmatic picture because the file not begin with PGTA Не удалось имортировать копию картинки Snapmatic, т.к. файл не начинается с PGTA - + Failed to import copy of Snapmatic picture because the copy failed Не получилось имортировать копию картинки Snapmatic, потому что не удалось его скопировать - + Failed to import copy of Savegame file because the copy failed Не получилось имортировать копию сохранения, потому что не удалось его скопировать - + Failed to import copy of Savegame file because no free Savegame slot left Не получилось имортировать копию сохранения, потому что не осталось свободных под них слотов @@ -285,41 +285,58 @@ Виджет сохранений - + The Third Way (100%) - 00/00/00 00:00:00 Третий путь (100%) - 00/00/00 00:00:00 - + + View + Просмотр + + + Copy Копировать - + Delete Удалить - - + + + Delete savegame Удалить сохранение - + Are you sure to delete %1 from your savegames? Вы уверены, что хотите удалить сохранение %1? - + Failed at deleting %1 from your savegames Не удалось удалить сохранение %1 + + + Select + + + + + View savegame + + + Copy savegame Копировать сохранение @@ -362,36 +379,67 @@ Виджет Snapmatic - + PHOTO - 00/00/00 00:00:00 ФОТО - 00/00/00 00:00:00 - + View Просмотр - + + Copy + Копировать + + + + Export + Экспорт + + + Delete Удалить - - + + + Delete picture Удалить картинку - + Are you sure to delete %1 from your Snapmatic pictures? Уверены, что хотите удалить %1 из коллекции картинок Snapmatic? - + Failed at deleting %1 from your Snapmatic pictures Не удалось удалить %1 из колелкции картинок Snapmatic + + + Select + + + + + View picture + + + + + Copy picture + Скопировать картинку + + + + Export picture + Экспорт картинки + UserInterface diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm index e333aa4f33c726204d569ed2a8d63f031a427622..34a3681f2cc9d1c11a213b7b048395d410deec48 100755 GIT binary patch delta 944 zcma))T}V@57{~uRp1GalnKRqewOLzp^Q59_S%wMIlBg_#QjsE8wrF8i%carBf`};k zH)U3Y7d`8}>7t7cy!?1xo{#_Yf6ukjkIRo5 z0`8peO20ZrUFcP1caFq*e>S5^%Hi5t1LTiL** z2JYs4J1}uE*Lgw@L}zk?%?2QOPlVy#UC|3(2p<{s zh?v38%%^*MDZeD45dm07`If^ZKz_-$9HBN-B%+Gw;;*D#Bms{YlYa4`t;cDD^Nfxi z{MWa)0jWnFcc~uGrKwL^dVtt8^_kQrU~&;-^1R5k+i0M=Poo)%C9c(oqt%puHOv5z z5MUS9&6Zk2W;qYKty~NO6l0Q+Eo8*(1cib^*?Q!TFOMaYhR> z-k5;+T48nlbij5<@cqaF%ss;1IjtmQpKvgp925o^9e0FI7tOWo6jj3kvLtn47z-#VH6eI_Tdxk5Xy04xvB-xXTTp{{Scgh@ zP^At36OrMw)KlrHs8(XE3Ce88X(cGz6ob{EJe(MpXvHd2QJsgX{;tuLcs(_W%WhM8 z9ZwY5YFB#Xcx9n9jc8QbDDH5UE61eNKXFLP3p40Uo~8OPDP6KjDVGl@ubh(o-vXqt R0P7}iMYZ4O33kZ?+;8Ip^3ebQ delta 772 zcmXAnZAep57{~v+yW8Epn{Lgi(@mW(o0d`*W{L%wSeP!N5-B5`ZJJ;ja|!E1i@*`OC{cnR#6R3OO!Szr>dn6WP-7YMiFaC!?M+aZ!K5NW6sY3X53 zPp*^h6QxeNxkld4T;S(o!tV_BjAmAuCrt1C-6|QT=TowutR-poErpY=0x2 zO4Jf1#DnZWN)PELZqkEZU? zUXXky=h0^b^OZbGm?aeS-KDGQ5Ugvoj>{27jG;h8xiE8poJY0`uVV@+&k^BQMl9`H zP)de9mjQjZa`Zg4E-7D?ob-d%DXQa~9oSN#x>j-#h&iX~R%epX)1VVN64oS$j7$!i zI7tO*_XaKGQcH!k;D;p@fa0%6O_NAty?SDV3Jn`q&nX@Nq207;YqXTEGQ%HW95QPv z4#9yc8ctMf&MtZgwWy|;3HHs13Hhjm4K?&T6dMmgPD5MnsB$=ME{EMz>NcINwAIvj tySPw)n&P9;TWId^x-B!_sl==Pw@H~2?=gLtw|tw+JH+krpGt0I{sXws#qt0E 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 Picture Viewer Snapmatic Bildansicht - - + + Failed at %1 Fehlgeschlagen bei %1 - - + + No player Keine Spieler - - + + No crew Keine Crew - + JPEG picture (*.jpg) JPEG Bild (*.jpg) - + Portable Network Graphics (*.png) Portable Network Graphics (*.png) - - + + Overwrite %1 with current Snapmatic picture? Überschreibe %1 mit aktuellen Snapmatic Bild? - - + + Failed to overwrite %1 with current Snapmatic picture Fehlgeschlagen beim Überschreiben von %1 mit aktuellen Snapmatic Bild - + Failed to export current Snapmatic picture Fehlgeschlagen beim Exportieren vom aktuellen Snapmatic Bild - - - - - + + + + + Copy picture Bild kopieren - + Snapmatic pictures (PGTA*) Snapmatic Bilder (PGTA*) - + All files (**) Alle Dateien (**) - + Failed to copy current Snapmatic picture Fehlgeschlagen beim Kopieren vom Snapmatic Bild @@ -160,11 +160,11 @@ - - - - - + + + + + Export picture Bild exportieren @@ -177,8 +177,8 @@ Beim Speichern des Bildes ist ein Fehler aufgetreten - - + + No valid file is selected Keine gültige Datei wurde ausgewählt @@ -198,16 +198,16 @@ - - - - + + + - - - - - + + + + + + Import copy Kopie importieren @@ -225,68 +225,68 @@ Profil schließen - + Loading... Lade... - + All profile files (SGTA* PGTA*) Alle Profildateien (SGTA* PGTA*) - + Savegames files (SGTA*) Spielstanddateien (SGTA*) - + Snapmatic pictures (PGTA*) Snapmatic Bilder (PGTA*) - + All files (**) Alle Dateien (**) - + Failed to read Snapmatic picture Fehler beim Lesen vom Snapmatic Bild - + Failed to read Savegame file Fehler beim Lesen von Spielstanddatei - + Can't import %1 because of not valid file format Kann %1 nicht importieren weil das Dateiformat nicht gültig ist - - + + No valid file is selected Keine gültige Datei wurde ausgewählt - + Failed to import copy of Snapmatic picture because the file not begin with PGTA Fehlgeschlagenen beim Import vom Snapmatic Bild weil die Datei nicht mit PGTA begint - + Failed to import copy of Snapmatic picture because the copy failed Fehlgeschlagenen beim Import vom Snapmatic Bild weil kopieren fehlgeschlagen ist - + Failed to import copy of Savegame file because the copy failed Fehlgeschlagenen beim Import vom Spielstand weil kopieren fehlgeschlagen ist - + Failed to import copy of Savegame file because no free Savegame slot left 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 The Third Way (100%) - 00/00/00 00:00:00 - + + View + Ansehen + + + Copy Kopieren - + Delete Löschen - - + + + Delete savegame Savegame löschen - + Are you sure to delete %1 from your savegames? Bist du sicher %1 von deinen Spielständen zu löschen? - + Failed at deleting %1 from your savegames Fehlgeschlagen beim Löschen %1 von deinen Spielständen + + + Select + Auswählen + + + + View savegame + Spielstand ansehen + + Copy savegame Spielstand kopieren @@ -417,37 +434,68 @@ Snapmatic Widget - + PHOTO - 00/00/00 00:00:00 FOTO - 00/00/00 00:00:00 - + View Ansehen - + + Copy + Kopieren + + + + Export + Exportieren + + + Delete Löschen - - + + + Delete picture Bild löschen - + Are you sure to delete %1 from your Snapmatic pictures? Bist du sicher %1 von deinen Snapmatic Bilder zu löschen? + + + Select + Auswählen + + + + View picture + Bild ansehen + + + + Copy picture + Bild kopieren + + + + Export picture + Bild exportieren + You're sure to delete %1 from your Snapmatic pictures? Bist du sicher %1 von deinen Snapmatic Bilder zu löschen? - + Failed at deleting %1 from your Snapmatic pictures Fehlgeschlagen beim Löschen %1 von deinen Snapmatic Bildern