diff --git a/ImportDialog.cpp b/ImportDialog.cpp index 59ea61d..afc2373 100644 --- a/ImportDialog.cpp +++ b/ImportDialog.cpp @@ -52,6 +52,8 @@ ImportDialog::ImportDialog(QWidget *parent) : ui->setupUi(this); importAgreed = false; + watermarkAvatar = true; + watermarkPicture = false; insideAvatarZone = false; avatarAreaImage = QImage(":/img/avatarareaimport.png"); selectedColour = QColor::fromRgb(0, 0, 0, 255); @@ -169,6 +171,7 @@ void ImportDialog::processImage() snapmaticImage = snapmaticImage.scaled(snapmaticAvatarResolution, snapmaticAvatarResolution, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); } snapmaticPainter.drawImage(snapmaticAvatarPlacementW + diffWidth, snapmaticAvatarPlacementH + diffHeight, snapmaticImage); + if (ui->cbWatermark->isChecked()) { processWatermark(&snapmaticPainter); } imageTitle = tr("Custom Avatar", "Custom Avatar Description in SC, don't use Special Character!"); } else @@ -195,6 +198,7 @@ void ImportDialog::processImage() snapmaticImage = snapmaticImage.scaled(snapmaticResolutionW, snapmaticResolutionH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); } snapmaticPainter.drawImage(0 + diffWidth, 0 + diffHeight, snapmaticImage); + if (ui->cbWatermark->isChecked()) { processWatermark(&snapmaticPainter); } imageTitle = tr("Custom Picture", "Custom Picture Description in SC, don't use Special Character!"); } snapmaticPainter.end(); @@ -202,6 +206,47 @@ void ImportDialog::processImage() ui->labPicture->setPixmap(snapmaticPixmap.scaled(snapmaticResolutionLW, snapmaticResolutionLH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } +void ImportDialog::processWatermark(QPainter *snapmaticPainter) +{ + bool blackWatermark = false; + bool redWatermark = false; + if (selectedColour.red() > 127) + { + if (selectedColour.green() > 127 || selectedColour.blue() > 127) + { + redWatermark = true; + } + } + else + { + redWatermark = true; + } + if (selectedColour.lightness() > 127) + { + blackWatermark = true; + } + // draw watermark + if (redWatermark) + { + snapmaticPainter->drawImage(0, 0, QImage(":/img/watermark_2r.png")); + } + else + { + QImage viewWatermark = QImage(":/img/watermark_2b.png"); + if (!blackWatermark) + { + viewWatermark.invertPixels(QImage::InvertRgb); + } + snapmaticPainter->drawImage(0, 0, viewWatermark); + } + QImage textWatermark = QImage(":/img/watermark_1b.png"); + if (!blackWatermark) + { + textWatermark.invertPixels(QImage::InvertRgb); + } + snapmaticPainter->drawImage(0, 0, textWatermark); +} + QImage ImportDialog::image() { return newImage; @@ -271,6 +316,16 @@ void ImportDialog::on_cbAvatar_toggled(bool checked) } } insideAvatarZone = ui->cbAvatar->isChecked(); + watermarkBlock = true; + if (insideAvatarZone) + { + ui->cbWatermark->setChecked(watermarkAvatar); + } + else + { + ui->cbWatermark->setChecked(watermarkPicture); + } + watermarkBlock = false; processImage(); } @@ -402,3 +457,19 @@ void ImportDialog::on_cbForceAvatarColour_toggled(bool checked) Q_UNUSED(checked) processImage(); } + +void ImportDialog::on_cbWatermark_toggled(bool checked) +{ + if (!watermarkBlock) + { + if (insideAvatarZone) + { + watermarkAvatar = checked; + } + else + { + watermarkPicture = checked; + } + processImage(); + } +} diff --git a/ImportDialog.h b/ImportDialog.h index 70e0648..c58b9f5 100644 --- a/ImportDialog.h +++ b/ImportDialog.h @@ -49,6 +49,7 @@ private slots: void on_cmdBackgroundWipe_clicked(); void on_cbStretch_toggled(bool checked); void on_cbForceAvatarColour_toggled(bool checked); + void on_cbWatermark_toggled(bool checked); private: Ui::ImportDialog *ui; @@ -60,9 +61,13 @@ private: QImage newImage; QColor selectedColour; bool insideAvatarZone; + bool watermarkPicture; + bool watermarkAvatar; + bool watermarkBlock; bool importAgreed; int snapmaticResolutionLW; int snapmaticResolutionLH; + void processWatermark(QPainter *snapmaticPainter); }; #endif // IMPORTDIALOG_H diff --git a/ImportDialog.ui b/ImportDialog.ui index 61c15fe..a4e76a8 100644 --- a/ImportDialog.ui +++ b/ImportDialog.ui @@ -7,13 +7,13 @@ 0 0 516 - 425 + 512 516 - 425 + 512 @@ -85,7 +85,7 @@ - + @@ -114,6 +114,23 @@ + + + + + + + 0 + 0 + + + + Watermark + + + + + diff --git a/res/5sync-128.png b/res/5sync-128.png index 4b4bf5a..fc3d97a 100644 Binary files a/res/5sync-128.png and b/res/5sync-128.png differ diff --git a/res/5sync-16.png b/res/5sync-16.png index 9db49fd..662b09d 100644 Binary files a/res/5sync-16.png and b/res/5sync-16.png differ diff --git a/res/5sync-24.png b/res/5sync-24.png index 01c2fcf..3b2797b 100644 Binary files a/res/5sync-24.png and b/res/5sync-24.png differ diff --git a/res/5sync-256.png b/res/5sync-256.png index bf41d47..e728fb4 100644 Binary files a/res/5sync-256.png and b/res/5sync-256.png differ diff --git a/res/5sync-32.png b/res/5sync-32.png index 6a768fd..b0f64cd 100644 Binary files a/res/5sync-32.png and b/res/5sync-32.png differ diff --git a/res/5sync-40.png b/res/5sync-40.png index 0852394..27a6988 100644 Binary files a/res/5sync-40.png and b/res/5sync-40.png differ diff --git a/res/5sync-48.png b/res/5sync-48.png index ff8390c..3f32f7e 100644 Binary files a/res/5sync-48.png and b/res/5sync-48.png differ diff --git a/res/5sync-64.png b/res/5sync-64.png index 123db7e..e48fb58 100644 Binary files a/res/5sync-64.png and b/res/5sync-64.png differ diff --git a/res/5sync-96.png b/res/5sync-96.png index 49f1db7..975157d 100644 Binary files a/res/5sync-96.png and b/res/5sync-96.png differ diff --git a/res/app.qrc b/res/app.qrc index 6267979..9874535 100644 --- a/res/app.qrc +++ b/res/app.qrc @@ -20,8 +20,9 @@ pointmaker-24.png pointmaker-32.png savegame.png - watermark.png - watermarkdark.png + watermark_1b.png + watermark_2b.png + watermark_2r.png global.rcc diff --git a/res/avatararea.png b/res/avatararea.png index 6305664..463d846 100644 Binary files a/res/avatararea.png and b/res/avatararea.png differ diff --git a/res/avatarareaimport.png b/res/avatarareaimport.png index 97c53cf..cddc1d8 100644 Binary files a/res/avatarareaimport.png and b/res/avatarareaimport.png differ diff --git a/res/back.png b/res/back.png index 49beb0a..3c01d8c 100644 Binary files a/res/back.png and b/res/back.png differ diff --git a/res/empty1x16.png b/res/empty1x16.png index 6ab4481..b5abfe6 100644 Binary files a/res/empty1x16.png and b/res/empty1x16.png differ diff --git a/res/gta5sync.ts b/res/gta5sync.ts index 6efb796..768e44b 100644 --- a/res/gta5sync.ts +++ b/res/gta5sync.ts @@ -238,102 +238,107 @@ Pictures and Savegames - + Ignore Aspect Ratio - + + Watermark + + + + Background - - - + + + Background Colour: <span style="color: %1">%1</span> - - + + ... - - - + + + Background Image: - + X - + Force Colour in Avatar Zone - + Import picture - + &OK - + Discard picture - + &Cancel - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! - + Custom Picture Custom Picture Description in SC, don't use Special Character! - + Snapmatic Avatar Zone - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! - + Select Colour... - + Background Image: %1 - + File Background Image: File @@ -1040,7 +1045,7 @@ Press 1 for Default View - + @@ -1051,9 +1056,9 @@ Press 1 for Default View - - - + + + @@ -1073,14 +1078,14 @@ Press 1 for Default View - + All image files (%1) - + All files (**) @@ -1088,14 +1093,14 @@ Press 1 for Default View - + Can't import %1 because file can't be open - + Can't import %1 because file can't be parsed properly diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm index 796c47a..704e02b 100644 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 62c8814..a1ee2c3 100644 --- a/res/gta5sync_de.ts +++ b/res/gta5sync_de.ts @@ -238,7 +238,7 @@ Snapmatic Bilder und Spielständen - + Ignore Aspect Ratio Seitenverhältnis ignorieren @@ -253,98 +253,103 @@ Snapmatic Bilder und Spielständen Bild - + + Watermark + Wasserzeichen + + + Background Hintergrund - - - + + + Background Colour: <span style="color: %1">%1</span> Hintergrundfarbe: <span style="color: %1">%1</span> - - + + ... ... - + Background Image: %1 Hintergrundbild: %1 - + X X - + Force Colour in Avatar Zone Erzwinge Farbe in Avatar Zone - + Import picture Bild importieren - + &OK &OK - + Discard picture Bild verwerfen - + &Cancel Abbre&chen - - - + + + Background Image: Hintergrundbild: - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! Eigener Avatar - + Custom Picture Custom Picture Description in SC, don't use Special Character! Eigenes Bild - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Bist du sicher ein Quadrat Bild außerhalb der Avatar Zone zu verwenden? Wenn du es als Avatar verwenden möchtest wird es abgetrennt! - + Snapmatic Avatar Zone Snapmatic Avatar Zone - + Select Colour... Farbe auswählen... - + File Background Image: File Datei @@ -1067,7 +1072,7 @@ Drücke 1 für Standardmodus - + @@ -1078,9 +1083,9 @@ Drücke 1 für Standardmodus - - - + + + @@ -1117,14 +1122,14 @@ Drücke 1 für Standardmodus - + All image files (%1) Alle Bilddateien (%1) - + All files (**) @@ -1159,14 +1164,14 @@ Drücke 1 für Standardmodus - + Can't import %1 because file can't be open Kann %1 nicht importieren weil die Datei nicht geöffnet werden kann - + Can't import %1 because file can't be parsed properly Kann %1 nicht importieren weil die Datei nicht richtig gelesen werden kann diff --git a/res/gta5sync_en_US.ts b/res/gta5sync_en_US.ts index 44c126f..3e5d5a4 100644 --- a/res/gta5sync_en_US.ts +++ b/res/gta5sync_en_US.ts @@ -227,15 +227,15 @@ Pictures and Savegames - - - + + + Background Colour: <span style="color: %1">%1</span> Background Color: <span style="color: %1">%1</span> - - + + ... @@ -251,89 +251,94 @@ Pictures and Savegames - + Ignore Aspect Ratio - + + Watermark + + + + Background - + Background Image: %1 - + X - + Force Colour in Avatar Zone Force Color in Avatar Zone - + Import picture - + &OK - + Discard picture - + &Cancel - - - + + + Background Image: - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! - + Custom Picture Custom Picture Description in SC, don't use Special Character! - + Snapmatic Avatar Zone - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! - + Select Colour... Select Color... - + File Background Image: File @@ -1060,7 +1065,7 @@ Press 1 for Default View - + @@ -1071,9 +1076,9 @@ Press 1 for Default View - - - + + + @@ -1116,14 +1121,14 @@ Press 1 for Default View - + All image files (%1) - + All files (**) @@ -1163,14 +1168,14 @@ Press 1 for Default View - + Can't import %1 because file can't be open - + Can't import %1 because file can't be parsed properly diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts index 61db6be..03c8751 100644 --- a/res/gta5sync_fr.ts +++ b/res/gta5sync_fr.ts @@ -238,7 +238,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V - + Ignore Aspect Ratio Déverrouiller le ratio d'aspect @@ -253,98 +253,103 @@ et les fichiers de sauvegarde de Grand Theft Auto V Image - + + Watermark + + + + Background Fond - - - + + + Background Colour: <span style="color: %1">%1</span> Couleur de fond : <span style="color: %1">%1</span> - - + + ... ... - + Background Image: %1 Image de fond : %1 - + X X - + Force Colour in Avatar Zone Forcer la couleur dans la Zone d'Avatar - + Import picture Importer l'image - + &OK &OK - + Discard picture Supprimer l'image - + &Cancel A&nnuler - - - + + + Background Image: Image de fond : - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! Avatar personnalisé - + Custom Picture Custom Picture Description in SC, don't use Special Character! Image personnalisé - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Êtes-vous sûr d'utiliser une image carrée en dehors de la Zone d'Avatar ? Si vous l'utilisez comme Avatar, l'image sera détachée ! - + Snapmatic Avatar Zone Zone d'Avatar Snapmatic - + Select Colour... Choisir une couleur... - + File Background Image: File Fichier @@ -1078,7 +1083,7 @@ Appuyer sur 1 pour le mode par défaut - + @@ -1089,9 +1094,9 @@ Appuyer sur 1 pour le mode par défaut - - - + + + @@ -1123,14 +1128,14 @@ Appuyer sur 1 pour le mode par défaut - + All image files (%1) Toutes les images (%1) - + All files (**) @@ -1177,14 +1182,14 @@ Appuyer sur 1 pour le mode par défaut - + Can't import %1 because file can't be open Impossible d'importer %1, le fichier ne peut pas être ouvert - + Can't import %1 because file can't be parsed properly Impossible d'importer %1, le fichier ne peut pas être parsé correctement diff --git a/res/gta5sync_ru.ts b/res/gta5sync_ru.ts index 0e4d386..f1b3b96 100644 --- a/res/gta5sync_ru.ts +++ b/res/gta5sync_ru.ts @@ -240,7 +240,7 @@ Pictures and Savegames - + Ignore Aspect Ratio Игнорировать соотн. сторон @@ -255,99 +255,104 @@ Pictures and Savegames Картинка - + + Watermark + + + + Background Фон - - - + + + Background Colour: <span style="color: %1">%1</span> Цвет фона: <span style="color: %1">%1</span> - - + + ... ... - + Background Image: %1 Фоновая картинка: %1 - + X latin X X - + Force Colour in Avatar Zone Задать цвет в зоне аватарки - + Import picture Импортировать картинку - + &OK &ОК - + Discard picture Отклонить картинку - + &Cancel Я не уверен насчет горячих клавиш... От&мена - - - + + + Background Image: Фоновая картинка: - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! Свой Аватар - + Custom Picture Custom Picture Description in SC, don't use Special Character! Своя Картинка - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Ты точно хочешь использовать квадратное изображение вне зоны аватарки? Если это аватар, то изображение будет обрезано! - + Snapmatic Avatar Zone Зона Snapmatic Аватарки - + Select Colour... Выбрать цвет... - + File Background Image: File Файл @@ -1072,7 +1077,7 @@ Press 1 for Default View - + @@ -1083,9 +1088,9 @@ Press 1 for Default View - - - + + + @@ -1117,7 +1122,7 @@ Press 1 for Default View - + All files (**) @@ -1169,21 +1174,21 @@ Press 1 for Default View - + All image files (%1) Все файлы изображений (%1) - + Can't import %1 because file can't be open Не удалось открыть %1, файл не может быть открыт - + Can't import %1 because file can't be parsed properly Не получилось импортировать %1, файл не может быть правильно обработан diff --git a/res/gta5sync_uk.ts b/res/gta5sync_uk.ts index 706673b..8309401 100644 --- a/res/gta5sync_uk.ts +++ b/res/gta5sync_uk.ts @@ -248,103 +248,108 @@ Pictures and Savegames - + Ignore Aspect Ratio Ігнорувати співвідношення сторін - + + Watermark + + + + Background Фон - - - + + + Background Colour: <span style="color: %1">%1</span> Фоновий колір: <span style="color: %1">%1</span> - - + + ... ... - - - + + + Background Image: Фонове зображення: - + X Х - + Force Colour in Avatar Zone Примусовий колір в зоні Аватару - + Import picture Імпортувати зображення - + &OK &OK - + Discard picture Відхилити зображення - + &Cancel &Скасувати - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! Користувацький Аватар - + Custom Picture Custom Picture Description in SC, don't use Special Character! Користувацьке Зображення - + Snapmatic Avatar Zone Зона Snapmatic Аватару - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! Ви впевнені, що будете використовувати квадратне зображення поза зоною аватара? Якщо ви хочете використовувати його як Аватар, зображення буде відокремлено! - + Select Colour... Вибір кольору... - + Background Image: %1 Фонове зображення: %1 - + File Background Image: File Файл @@ -1058,7 +1063,7 @@ Press 1 for Default View - + @@ -1069,9 +1074,9 @@ Press 1 for Default View - - - + + + @@ -1091,14 +1096,14 @@ Press 1 for Default View - + All image files (%1) Файли зображень (%1) - + All files (**) @@ -1106,14 +1111,14 @@ Press 1 for Default View - + Can't import %1 because file can't be open Неможливо імпортувати %1, оскільки файл не може бути відкритий - + Can't import %1 because file can't be parsed properly Неможливо імпортувати %1, оскільки файл неможливо розібрати правильно diff --git a/res/gta5sync_zh_TW.ts b/res/gta5sync_zh_TW.ts index bbd099c..e7af4e8 100644 --- a/res/gta5sync_zh_TW.ts +++ b/res/gta5sync_zh_TW.ts @@ -247,102 +247,107 @@ Pictures and Savegames - + Ignore Aspect Ratio 忽略長寬比 - + + Watermark + + + + Background 背景 - - - + + + Background Colour: <span style="color: %1">%1</span> 背景顏色: <span style="color: %1">%1</span> - - + + ... ... - - - + + + Background Image: 背景圖片: - + X X - + Force Colour in Avatar Zone 強制在大頭貼區域使用顏色 - + Import picture 匯入圖片 - + &OK 確定(&O) - + Discard picture 捨棄圖片 - + &Cancel 取消(&C) - + Custom Avatar Custom Avatar Description in SC, don't use Special Character! 自訂大頭貼 - + Custom Picture Custom Picture Description in SC, don't use Special Character! 自訂圖片 - + Snapmatic Avatar Zone Snapmatic 大頭貼區域 - + Are you sure to use a square image outside of the Avatar Zone? When you want to use it as Avatar the image will be detached! 你確定要在大頭貼區域以外的地方使用方形圖片嗎? 作為大頭貼的圖片將被分離! - + Select Colour... 選擇顏色... - + Background Image: %1 背景圖片: %1 - + File Background Image: File 文件 @@ -1056,7 +1061,7 @@ Press 1 for Default View - + @@ -1067,9 +1072,9 @@ Press 1 for Default View - - - + + + @@ -1089,14 +1094,14 @@ Press 1 for Default View - + All image files (%1) 所有圖片 (%1) - + All files (**) @@ -1104,14 +1109,14 @@ Press 1 for Default View - + Can't import %1 because file can't be open 無法匯入 %1,因為檔案無法開啟 - + Can't import %1 because file can't be parsed properly 無法匯入 %1,因為檔案無法正確解析 diff --git a/res/gta5view.png b/res/gta5view.png index bf41d47..3e955a6 100644 Binary files a/res/gta5view.png and b/res/gta5view.png differ diff --git a/res/next.png b/res/next.png index 4a36bc2..d87fd54 100644 Binary files a/res/next.png and b/res/next.png differ diff --git a/res/pointmaker-16.png b/res/pointmaker-16.png index 3244d6e..f038879 100644 Binary files a/res/pointmaker-16.png and b/res/pointmaker-16.png differ diff --git a/res/pointmaker-24.png b/res/pointmaker-24.png index d337357..87e9669 100644 Binary files a/res/pointmaker-24.png and b/res/pointmaker-24.png differ diff --git a/res/pointmaker-32.png b/res/pointmaker-32.png index 610efd4..de591b1 100644 Binary files a/res/pointmaker-32.png and b/res/pointmaker-32.png differ diff --git a/res/pointmaker-8.png b/res/pointmaker-8.png index a116c72..5c0e653 100644 Binary files a/res/pointmaker-8.png and b/res/pointmaker-8.png differ diff --git a/res/savegame.png b/res/savegame.png index a2c61b0..90988fa 100644 Binary files a/res/savegame.png and b/res/savegame.png differ diff --git a/res/watermark.png b/res/watermark.png deleted file mode 100644 index 82de998..0000000 Binary files a/res/watermark.png and /dev/null differ diff --git a/res/watermark_1b.png b/res/watermark_1b.png new file mode 100644 index 0000000..eddab17 Binary files /dev/null and b/res/watermark_1b.png differ diff --git a/res/watermark_2b.png b/res/watermark_2b.png new file mode 100644 index 0000000..4a4cb57 Binary files /dev/null and b/res/watermark_2b.png differ diff --git a/res/watermark_2r.png b/res/watermark_2r.png new file mode 100644 index 0000000..2747605 Binary files /dev/null and b/res/watermark_2r.png differ diff --git a/res/watermarkbright.png b/res/watermarkbright.png deleted file mode 100644 index 2ce0168..0000000 Binary files a/res/watermarkbright.png and /dev/null differ diff --git a/res/watermarkdark.png b/res/watermarkdark.png deleted file mode 100644 index 07b3ef6..0000000 Binary files a/res/watermarkdark.png and /dev/null differ