mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-13 20:00:32 +02:00
Added doc for PenTool
This commit is contained in:
@@ -4,21 +4,66 @@
|
|||||||
#include"IntelliTool.h"
|
#include"IntelliTool.h"
|
||||||
#include"QColor"
|
#include"QColor"
|
||||||
#include"QPoint"
|
#include"QPoint"
|
||||||
|
/*!
|
||||||
|
* \brief The IntelliToolPen class represents a tool to draw a line.
|
||||||
|
*/
|
||||||
class IntelliToolPen : public IntelliTool{
|
class IntelliToolPen : public IntelliTool{
|
||||||
|
/*!
|
||||||
|
* \brief penWidth - The width of the Pen while drawing.
|
||||||
|
*/
|
||||||
int penWidth;
|
int penWidth;
|
||||||
|
/*!
|
||||||
|
* \brief point - Represents the previous point to help drawing a line.
|
||||||
|
*/
|
||||||
QPoint point;
|
QPoint point;
|
||||||
public:
|
public:
|
||||||
|
/*!
|
||||||
|
* \brief A constructor setting the general paintingArea and colorPicker. Reading the penWidth.
|
||||||
|
* \param Area - The general PaintingArea used by the project.
|
||||||
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
|
*/
|
||||||
IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolPen(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
virtual ~IntelliToolPen() override;
|
virtual ~IntelliToolPen() override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \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.
|
||||||
|
*/
|
||||||
virtual void onMouseRightPressed(int x, int y) override;
|
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;
|
virtual void onMouseRightReleased(int x, int y) override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the left click pressed of a mouse. Starting the drawing procedure.
|
||||||
|
* \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;
|
virtual void onMouseLeftPressed(int x, int y) override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the left click released of a mouse. Merging the drawing 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;
|
virtual void onMouseLeftReleased(int x, int y) override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the scroll event. Changing penWidth relativ to value.
|
||||||
|
* \param value - The absolute the scroll has changed.
|
||||||
|
*/
|
||||||
virtual void onWheelScrolled(int value) override;
|
virtual void onWheelScrolled(int value) override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the mouse moved event. To draw the line.
|
||||||
|
* \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;
|
virtual void onMouseMoved(int x, int y) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user