diff --git a/data/graphics.qrc b/data/graphics.qrc index 14e7d803..eb4b2cb8 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -31,7 +31,7 @@ img/material/black/cloud-upload.svg img/material/black/close.svg img/material/black/circle-outline.svg - img/material/black/blur.svg + img/material/black/pixelate.svg img/material/black/arrow-bottom-left.svg img/material/white/undo-variant.svg img/material/white/text.svg @@ -62,7 +62,7 @@ img/material/white/cloud-upload.svg img/material/white/close.svg img/material/white/circle-outline.svg - img/material/white/blur.svg + img/material/white/pixelate.svg img/material/white/arrow-bottom-left.svg img/material/black/circlecount-outline.svg img/material/white/circlecount-outline.svg diff --git a/data/img/material/black/blur.png b/data/img/material/black/pixelate.png similarity index 100% rename from data/img/material/black/blur.png rename to data/img/material/black/pixelate.png diff --git a/data/img/material/black/blur.svg b/data/img/material/black/pixelate.svg similarity index 100% rename from data/img/material/black/blur.svg rename to data/img/material/black/pixelate.svg diff --git a/data/img/material/white/blur.png b/data/img/material/white/pixelate.png similarity index 100% rename from data/img/material/white/blur.png rename to data/img/material/white/pixelate.png diff --git a/data/img/material/white/blur.svg b/data/img/material/white/pixelate.svg similarity index 100% rename from data/img/material/white/blur.svg rename to data/img/material/white/pixelate.svg diff --git a/data/translations/Internationalization_ca.ts b/data/translations/Internationalization_ca.ts index 5df3a4d8..fab70abe 100644 --- a/data/translations/Internationalization_ca.ts +++ b/data/translations/Internationalization_ca.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Desenfocament + Desenfocament - Set Blur as the paint tool - Estableix el desenfocament com a eina de dibuix + Estableix el desenfocament com a eina de dibuix @@ -637,6 +635,19 @@ Press Space to open the side panel. + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_de_DE.ts b/data/translations/Internationalization_de_DE.ts index 07624417..47d82d11 100644 --- a/data/translations/Internationalization_de_DE.ts +++ b/data/translations/Internationalization_de_DE.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Verwischen + Verwischen - Set Blur as the paint tool - Wähle Verwischen als Werkzeug + Wähle Verwischen als Werkzeug @@ -640,6 +638,19 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. Pinne Bild auf den Dekstop + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_es.ts b/data/translations/Internationalization_es.ts index b0616360..2254bb33 100644 --- a/data/translations/Internationalization_es.ts +++ b/data/translations/Internationalization_es.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Desenfoque + Desenfoque - Set Blur as the paint tool - Establece el Desenfoque como herramienta de dibujo + Establece el Desenfoque como herramienta de dibujo @@ -640,6 +638,19 @@ Presiona Espacio para abrir el panel lateral. Fija la imagen sobre el escritorio + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_fr.ts b/data/translations/Internationalization_fr.ts index c260f1ce..8a204a40 100644 --- a/data/translations/Internationalization_fr.ts +++ b/data/translations/Internationalization_fr.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Flou + Flou - Set Blur as the paint tool - Sélectionner l'outil Flou + Sélectionner l'outil Flou @@ -640,6 +638,19 @@ Appuyer sur Espace pour ouvrir le panneau latéral. Épingler l'image sur le bureau + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_hu.ts b/data/translations/Internationalization_hu.ts index e19cec20..9c7111d3 100644 --- a/data/translations/Internationalization_hu.ts +++ b/data/translations/Internationalization_hu.ts @@ -54,11 +54,11 @@ BlurTool Blur - Homályosítás + Homályosítás Set Blur as the paint tool - Beállítja a Homályosítás eszközt festő eszközként + Beállítja a Homályosítás eszközt festő eszközként @@ -546,6 +546,17 @@ Press Space to open the side panel. + + PixelateTool + + Pixelate + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_ja.ts b/data/translations/Internationalization_ja.ts index 19fcfbb9..ca7dbe00 100644 --- a/data/translations/Internationalization_ja.ts +++ b/data/translations/Internationalization_ja.ts @@ -64,14 +64,12 @@ BlurTool - Blur - ぼかし + ぼかし - Set Blur as the paint tool - ペイントツールとして「ぼかし」をセットする + ペイントツールとして「ぼかし」をセットする @@ -640,6 +638,19 @@ Enter を押すと画面をキャプチャー。 選択範囲をデスクトップ上に配置する + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_ka.ts b/data/translations/Internationalization_ka.ts index df8d8a6d..9e2300b4 100644 --- a/data/translations/Internationalization_ka.ts +++ b/data/translations/Internationalization_ka.ts @@ -64,14 +64,12 @@ BlurTool - Blur - გაბუნდოვნება + გაბუნდოვნება - Set Blur as the paint tool - გაბუნდოვნების ხელსაწყოს არჩევა სახატავად + გაბუნდოვნების ხელსაწყოს არჩევა სახატავად @@ -636,6 +634,19 @@ Press Space to open the side panel. + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_nl.ts b/data/translations/Internationalization_nl.ts index a9dc2ddc..a7a48f0e 100644 --- a/data/translations/Internationalization_nl.ts +++ b/data/translations/Internationalization_nl.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Vervaging + Vervaging - Set Blur as the paint tool - Vervaging instellen als verfgereedschap + Vervaging instellen als verfgereedschap @@ -640,6 +638,19 @@ Druk op spatie om het zijpaneel te openen. Afbeelding vastmaken op bureaublad + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_pl.ts b/data/translations/Internationalization_pl.ts index e16c4d0e..a3d1597f 100644 --- a/data/translations/Internationalization_pl.ts +++ b/data/translations/Internationalization_pl.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Rozmycie + Rozmycie - Set Blur as the paint tool - Rozmywanie obszarów + Rozmywanie obszarów @@ -639,6 +637,19 @@ Spacja, aby pokazać panel boczny. Przypnij obrazek do pulpitu + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_pt_br.ts b/data/translations/Internationalization_pt_br.ts index 15499804..be871db0 100644 --- a/data/translations/Internationalization_pt_br.ts +++ b/data/translations/Internationalization_pt_br.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Desfoque + Desfoque - Set Blur as the paint tool - Usa o Desfoque como ferramenta de desenho + Usa o Desfoque como ferramenta de desenho @@ -640,6 +638,19 @@ Pressione espaço abrir o painel lateral. Pinnar imagem no desktop + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_ru.ts b/data/translations/Internationalization_ru.ts index 70940cfa..1ed80eb2 100644 --- a/data/translations/Internationalization_ru.ts +++ b/data/translations/Internationalization_ru.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Размытие + Размытие - Set Blur as the paint tool - Выбрать Размытие инструментом для рисования + Выбрать Размытие инструментом для рисования @@ -640,6 +638,19 @@ Press Space to open the side panel. Прикрепить изображение к рабочему столу + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_sk.ts b/data/translations/Internationalization_sk.ts index 3b0295a4..8467859a 100644 --- a/data/translations/Internationalization_sk.ts +++ b/data/translations/Internationalization_sk.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Rozmazanie + Rozmazanie - Set Blur as the paint tool - Nastaviť Rozmazanie ako nástroj pre úpravy + Nastaviť Rozmazanie ako nástroj pre úpravy @@ -640,6 +638,19 @@ Stlačte medzerník pre otvorenie postranného panelu. Pripnúť obrázok na plochu + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_sr.ts b/data/translations/Internationalization_sr.ts index a6e6d522..4f740f83 100644 --- a/data/translations/Internationalization_sr.ts +++ b/data/translations/Internationalization_sr.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Замућење + Замућење - Set Blur as the paint tool - Избор цртања замућене области + Избор цртања замућене области @@ -640,6 +638,19 @@ Press Space to open the side panel. Закачи слику за радну површину + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_tr.ts b/data/translations/Internationalization_tr.ts index 195fea82..82854da2 100644 --- a/data/translations/Internationalization_tr.ts +++ b/data/translations/Internationalization_tr.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Bulanıklık + Bulanıklık - Set Blur as the paint tool - Bulnıklığı boyama aracı olarak ayarlar + Bulnıklığı boyama aracı olarak ayarlar @@ -640,6 +638,19 @@ Yan paneli açmak için Boşluk tuşuna basın. Masaüstündeki PIN resmi + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_uk.ts b/data/translations/Internationalization_uk.ts index c8f1801d..070ec7cf 100644 --- a/data/translations/Internationalization_uk.ts +++ b/data/translations/Internationalization_uk.ts @@ -64,14 +64,12 @@ BlurTool - Blur - Розмиття + Розмиття - Set Blur as the paint tool - Вибрати розмиття інструментом малювання + Вибрати розмиття інструментом малювання @@ -640,6 +638,19 @@ Press Space to open the side panel. Прикріпити зображення до робочого столу + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_zh_CN.ts b/data/translations/Internationalization_zh_CN.ts index c7c44ba1..da99bf8a 100644 --- a/data/translations/Internationalization_zh_CN.ts +++ b/data/translations/Internationalization_zh_CN.ts @@ -64,14 +64,12 @@ BlurTool - Blur - 模糊 + 模糊 - Set Blur as the paint tool - 选择模糊作为绘画工具 + 选择模糊作为绘画工具 @@ -641,6 +639,19 @@ Press Space to open the side panel. 在桌面上固定图像 + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/data/translations/Internationalization_zh_TW.ts b/data/translations/Internationalization_zh_TW.ts index 4e82b12a..64864655 100644 --- a/data/translations/Internationalization_zh_TW.ts +++ b/data/translations/Internationalization_zh_TW.ts @@ -64,14 +64,12 @@ BlurTool - Blur - 模糊 + 模糊 - Set Blur as the paint tool - 選擇模糊作為繪製工具 + 選擇模糊作為繪製工具 @@ -636,6 +634,19 @@ Press Space to open the side panel. + + PixelateTool + + + Pixelate + + + + + Set Pixelate as the paint tool + + + QObject diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 488a54c0..532ec1cd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -68,7 +68,7 @@ target_include_directories( $ $ $ - $ + $ $ $ $ diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index b42d7c20..dd892be2 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1,5 +1,5 @@ target_sources(flameshot PRIVATE arrow/arrowtool.h arrow/arrowtool.cpp) -target_sources(flameshot PRIVATE blur/blurtool.h blur/blurtool.cpp) +target_sources(flameshot PRIVATE pixelate/pixelatetool.h pixelate/pixelatetool.cpp) target_sources(flameshot PRIVATE circle/circletool.h circle/circletool.cpp) target_sources(flameshot PRIVATE circlecount/circlecounttool.h circlecount/circlecounttool.cpp) target_sources(flameshot PRIVATE copy/copytool.h copy/copytool.cpp) diff --git a/src/tools/blur/blurtool.cpp b/src/tools/pixelate/pixelatetool.cpp similarity index 84% rename from src/tools/blur/blurtool.cpp rename to src/tools/pixelate/pixelatetool.cpp index 3c0a7598..a2284a96 100644 --- a/src/tools/blur/blurtool.cpp +++ b/src/tools/pixelate/pixelatetool.cpp @@ -15,47 +15,46 @@ // You should have received a copy of the GNU General Public License // along with Flameshot. If not, see . -#include "blurtool.h" +#include "pixelatetool.h" #include -#include #include #include #include #include #include -BlurTool::BlurTool(QObject* parent) +PixelateTool::PixelateTool(QObject* parent) : AbstractTwoPointTool(parent) {} QIcon -BlurTool::icon(const QColor& background, bool inEditor) const +PixelateTool::icon(const QColor& background, bool inEditor) const { Q_UNUSED(inEditor); return QIcon(iconPath(background) + "blur.svg"); } QString -BlurTool::name() const +PixelateTool::name() const { - return tr("Blur"); + return tr("Pixelate"); } QString -BlurTool::nameID() +PixelateTool::nameID() { return QLatin1String(""); } QString -BlurTool::description() const +PixelateTool::description() const { - return tr("Set Blur as the paint tool"); + return tr("Set Pixelate as the paint tool"); } CaptureTool* -BlurTool::copy(QObject* parent) +PixelateTool::copy(QObject* parent) { - return new BlurTool(parent); + return new PixelateTool(parent); } void @@ -100,7 +99,7 @@ calculate_block_averge(QImage& image, int x_start, int y_start, int pixel_size) blue_count / pixel_count)); } void -BlurTool::process(QPainter& painter, const QPixmap& pixmap, bool recordUndo) +PixelateTool::process(QPainter& painter, const QPixmap& pixmap, bool recordUndo) { if (recordUndo) { updateBackup(pixmap); @@ -143,14 +142,15 @@ BlurTool::process(QPainter& painter, const QPixmap& pixmap, bool recordUndo) } void -BlurTool::paintMousePreview(QPainter& painter, const CaptureContext& context) +PixelateTool::paintMousePreview(QPainter& painter, + const CaptureContext& context) { Q_UNUSED(context); Q_UNUSED(painter); } void -BlurTool::drawStart(const CaptureContext& context) +PixelateTool::drawStart(const CaptureContext& context) { m_thickness = context.thickness; m_points.first = context.mousePos; @@ -158,7 +158,7 @@ BlurTool::drawStart(const CaptureContext& context) } void -BlurTool::pressed(const CaptureContext& context) +PixelateTool::pressed(const CaptureContext& context) { Q_UNUSED(context); } diff --git a/src/tools/blur/blurtool.h b/src/tools/pixelate/pixelatetool.h similarity index 93% rename from src/tools/blur/blurtool.h rename to src/tools/pixelate/pixelatetool.h index e9fca4f7..d1227af4 100644 --- a/src/tools/blur/blurtool.h +++ b/src/tools/pixelate/pixelatetool.h @@ -19,11 +19,11 @@ #include "src/tools/abstracttwopointtool.h" -class BlurTool : public AbstractTwoPointTool +class PixelateTool : public AbstractTwoPointTool { Q_OBJECT public: - explicit BlurTool(QObject* parent = nullptr); + explicit PixelateTool(QObject* parent = nullptr); QIcon icon(const QColor& background, bool inEditor) const override; QString name() const override; diff --git a/src/tools/toolfactory.cpp b/src/tools/toolfactory.cpp index baac071e..7a1bdea0 100644 --- a/src/tools/toolfactory.cpp +++ b/src/tools/toolfactory.cpp @@ -17,7 +17,6 @@ #include "toolfactory.h" #include "arrow/arrowtool.h" -#include "blur/blurtool.h" #include "circle/circletool.h" #include "circlecount/circlecounttool.h" #include "copy/copytool.h" @@ -29,6 +28,7 @@ #include "move/movetool.h" #include "pencil/penciltool.h" #include "pin/pintool.h" +#include "pixelate/pixelatetool.h" #include "rectangle/rectangletool.h" #include "redo/redotool.h" #include "save/savetool.h" @@ -95,7 +95,7 @@ ToolFactory::CreateTool(CaptureButton::ButtonType t, QObject* parent) tool = new AppLauncher(parent); break; case CaptureButton::TYPE_BLUR: - tool = new BlurTool(parent); + tool = new PixelateTool(parent); break; case CaptureButton::TYPE_PIN: tool = new PinTool(parent);