From 71dd9aa7c247bce749beed98fe6108f26c23edf4 Mon Sep 17 00:00:00 2001 From: Sonaion Date: Thu, 19 Dec 2019 13:58:46 +0100 Subject: [PATCH] full doc tools --- src/Tool/IntelliToolPen.h | 2 +- src/Tool/IntelliToolPlain.h | 2 +- src/Tool/IntelliToolPolygon.cpp | 4 ++++ src/Tool/IntelliToolPolygon.h | 42 ++++++++++++++++++++++++++++++--- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/Tool/IntelliToolPen.h b/src/Tool/IntelliToolPen.h index 25bc4d4..d611f24 100644 --- a/src/Tool/IntelliToolPen.h +++ b/src/Tool/IntelliToolPen.h @@ -29,7 +29,7 @@ public: virtual ~IntelliToolPen() override; /*! - * \brief A function managing the right click pressed of a mouse.Resetting the current draw. + * \brief A function managing the right click pressed of a mouse. Resetting the current draw. * \param x - The x coordinate relative to the active/canvas layer. * \param y - The y coordinate relative to the active/canvas layer. */ diff --git a/src/Tool/IntelliToolPlain.h b/src/Tool/IntelliToolPlain.h index b6380ed..4477610 100644 --- a/src/Tool/IntelliToolPlain.h +++ b/src/Tool/IntelliToolPlain.h @@ -20,7 +20,7 @@ public: virtual ~IntelliToolPlainTool() override; /*! - * \brief A function managing the right click pressed of a mouse.Resetting the current fill. + * \brief A function managing the right click pressed of a mouse. Resetting the current fill. * \param x - The x coordinate relative to the active/canvas layer. * \param y - The y coordinate relative to the active/canvas layer. */ diff --git a/src/Tool/IntelliToolPolygon.cpp b/src/Tool/IntelliToolPolygon.cpp index 080168d..89ad9fb 100644 --- a/src/Tool/IntelliToolPolygon.cpp +++ b/src/Tool/IntelliToolPolygon.cpp @@ -12,6 +12,10 @@ IntelliToolPolygon::IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* c isDrawing = false; } +IntelliToolPolygon::~IntelliToolPolygon(){ + +} + void IntelliToolPolygon::onMouseLeftPressed(int x, int y){ if(!isDrawing && x > 0 && y > 0 && xgetWidthOfActive() && ygetHeightOfActive()){ IntelliTool::onMouseLeftPressed(x,y); diff --git a/src/Tool/IntelliToolPolygon.h b/src/Tool/IntelliToolPolygon.h index 3f53d76..b057506 100644 --- a/src/Tool/IntelliToolPolygon.h +++ b/src/Tool/IntelliToolPolygon.h @@ -45,19 +45,55 @@ class IntelliToolPolygon : public IntelliTool std::vector QPointList; public: /*! - * \brief IntelliToolPolygon Constructor Define the Tool-intern Parameters - * \param Area - * \param colorPicker + * \brief A constructor setting the general paintingArea and colorPicker. + * \param Area - The general paintingArea used by the project. + * \param colorPicker - The general colorPicker used by the project. */ IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker); + /*! + * \brief A Destructor. + */ + ~IntelliToolPolygon() override; + /*! + * \brief A function managing the left click pressed of a mouse. Setting polygon points. + * \param x - The x coordinate relative to the active/canvas layer. + * \param y - The y coordinate relative to the active/canvas layer. + */ virtual void onMouseLeftPressed(int x, int y) override; + + /*! + * \brief A function managing the left click released of a mouse. Merging the fill to the active layer. + * \param x - The x coordinate relative to the active/canvas layer. + * \param y - The y coordinate relative to the active/canvas layer. + */ virtual void onMouseLeftReleased(int x, int y) override; + + /*! + * \brief A function managing the right click pressed of a mouse. Resetting the current fill. + * \param x - The x coordinate relative to the active/canvas layer. + * \param y - The y coordinate relative to the active/canvas layer. + */ virtual void onMouseRightPressed(int x, int y) override; + + /*! + * \brief A function managing the right click released of a mouse. + * \param x - The x coordinate relative to the active/canvas layer. + * \param y - The y coordinate relative to the active/canvas layer. + */ virtual void onMouseRightReleased(int x, int y) override; + /*! + * \brief A function managing the scroll event. CHanging the lineWidth relative to value. + * \param value - The absolute the scroll has changed. + */ virtual void onWheelScrolled(int value) override; + /*! + * \brief A function managing the mouse moved event. + * \param x - The x coordinate of the new mouse position. + * \param y - The y coordinate of the new mouse position. + */ virtual void onMouseMoved(int x, int y) override;