From 486f1a08159fd038f5fa82062f4a15da89ee104a Mon Sep 17 00:00:00 2001 From: Sonaion Date: Thu, 19 Dec 2019 09:15:40 +0100 Subject: [PATCH] FloodfillTool and more docs --- src/IntelliPhoto.pro | 2 ++ src/Layer/PaintingArea.h | 2 +- src/Tool/IntelliToolFloodFill.h | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/Tool/IntelliToolFloodFill.h diff --git a/src/IntelliPhoto.pro b/src/IntelliPhoto.pro index 9b0956d..f10c416 100644 --- a/src/IntelliPhoto.pro +++ b/src/IntelliPhoto.pro @@ -25,6 +25,7 @@ SOURCES += \ Layer/PaintingArea.cpp \ Tool/IntelliTool.cpp \ Tool/IntelliToolCircle.cpp \ + Tool/IntelliToolFloodFill.cpp \ Tool/IntelliToolLine.cpp \ Tool/IntelliToolPen.cpp \ Tool/IntelliToolPlain.cpp \ @@ -41,6 +42,7 @@ HEADERS += \ Layer/PaintingArea.h \ Tool/IntelliTool.h \ Tool/IntelliToolCircle.h \ + Tool/IntelliToolFloodFill.h \ Tool/IntelliToolLine.h \ Tool/IntelliToolPen.h \ Tool/IntelliToolPlain.h \ diff --git a/src/Layer/PaintingArea.h b/src/Layer/PaintingArea.h index b6cebc1..afe218e 100644 --- a/src/Layer/PaintingArea.h +++ b/src/Layer/PaintingArea.h @@ -32,7 +32,7 @@ class PaintingArea : public QWidget friend IntelliTool; public: PaintingArea(int maxWidth=600, int maxHeight=600, QWidget *parent = nullptr); - ~PaintingArea(); + ~PaintingArea() override; // Handles all events bool open(const QString &fileName); diff --git a/src/Tool/IntelliToolFloodFill.h b/src/Tool/IntelliToolFloodFill.h new file mode 100644 index 0000000..0aa298f --- /dev/null +++ b/src/Tool/IntelliToolFloodFill.h @@ -0,0 +1,23 @@ +#ifndef INTELLITOOLFLOODFILL_H +#define INTELLITOOLFLOODFILL_H +#include "IntelliTool.h" + +#include "QColor" + +class IntelliToolFloodFill : public IntelliTool{ +public: + IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker); + virtual ~IntelliToolFloodFill() override; + + + virtual void onMouseRightPressed(int x, int y) override; + virtual void onMouseRightReleased(int x, int y) override; + virtual void onMouseLeftPressed(int x, int y) override; + virtual void onMouseLeftReleased(int x, int y) override; + + virtual void onWheelScrolled(int value) override; + + virtual void onMouseMoved(int x, int y) override; +}; + +#endif // INTELLITOOLFLOODFILL_H