mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-16 13:20:33 +02:00
Tool COmments update
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#include "QColor"
|
#include "QColor"
|
||||||
#include "QPoint"
|
#include "QPoint"
|
||||||
/*!
|
/*!
|
||||||
* \brief The IntelliToolCircle class representing a tool to draw a circle.
|
* \brief The IntelliToolCircle class represents a tool to draw a circle.
|
||||||
*/
|
*/
|
||||||
class IntelliToolCircle : public IntelliTool{
|
class IntelliToolCircle : public IntelliTool{
|
||||||
/*!
|
/*!
|
||||||
@@ -30,8 +30,8 @@ class IntelliToolCircle : public IntelliTool{
|
|||||||
int edgeWidth;
|
int edgeWidth;
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* \brief A constructor setting the general Painting Area and colorPicker. And reading in the The inner alpha and edgeWIdth.
|
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the inner alpha and edgeWidth.
|
||||||
* \param Area - The general PaintingArea used by the project.
|
* \param Area - The general paintingArea used by the project.
|
||||||
* \param colorPicker - The general colorPicker used by the project.
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
*/
|
*/
|
||||||
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
@@ -42,30 +42,30 @@ public:
|
|||||||
virtual ~IntelliToolCircle() override;
|
virtual ~IntelliToolCircle() override;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A function managing the right click Pressed of a Mouse. Sets the middle point of the cricle.
|
* \brief A function managing the right click pressed of a mouse. Clearing the canvas layer.
|
||||||
* \param x - The x coordinate relative to the Active/Canvas Layer.
|
* \param x - The x coordinate relative to the active/canvas layer.
|
||||||
* \param y - The y 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.
|
* \brief A function managing the right click released of a mouse.
|
||||||
* \param x - The x coordinate relative to the Active/Canvas Layer.
|
* \param x - The x coordinate relative to the active/canvas layer.
|
||||||
* \param y - The y 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. Clearing the canvas layer.
|
* \brief A function managing the left click pressed of a mouse. Sets the middle point of the cricle.
|
||||||
* \param x - The x coordinate relative to the Active/Canvas Layer.
|
* \param x - The x coordinate relative to the active/canvas layer.
|
||||||
* \param y - The y 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.
|
* \brief A function managing the left click released of a mouse.
|
||||||
* \param x - The x coordinate relative to the Active/Canvas Layer.
|
* \param x - The x coordinate relative to the active/canvas layer.
|
||||||
* \param y - The y 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;
|
||||||
|
|
||||||
@@ -77,8 +77,8 @@ public:
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief A function managing the mouse moved event. Draws a circle with radius of eulerian norm of mouse position and the middle point.
|
* \brief A function managing the mouse moved event. Draws a circle with radius of eulerian norm of mouse position and the middle point.
|
||||||
* \param x - The x coordinate of the new Mouse Position.
|
* \param x - The x coordinate of the new mouse position.
|
||||||
* \param y - The y 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;
|
||||||
};
|
};
|
||||||
|
|||||||
86
src/Tool/IntelliToolCircle.h.autosave
Normal file
86
src/Tool/IntelliToolCircle.h.autosave
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
#ifndef INTELLITOOLCIRCLE_H
|
||||||
|
#define INTELLITOOLCIRCLE_H
|
||||||
|
#include "IntelliTool.h"
|
||||||
|
|
||||||
|
#include "QColor"
|
||||||
|
#include "QPoint"
|
||||||
|
/*!
|
||||||
|
* \brief The IntelliToolCircle class represents a tool to draw a circle.
|
||||||
|
*/
|
||||||
|
class IntelliToolCircle : public IntelliTool{
|
||||||
|
/*!
|
||||||
|
* \brief A function that implements a circle drawing algorithm.
|
||||||
|
* \param radius - The radius of the circle.
|
||||||
|
*/
|
||||||
|
void drawCyrcle(int radius);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The center of the circle.
|
||||||
|
*/
|
||||||
|
QPoint Middle;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The alpha value of the inner circle.
|
||||||
|
*/
|
||||||
|
int alphaInner;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The width of the outer circle edge.
|
||||||
|
*/
|
||||||
|
int edgeWidth;
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the inner alpha and edgeWidth.
|
||||||
|
* \param Area - The general paintingArea used by the project.
|
||||||
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
|
*/
|
||||||
|
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A Destructor.
|
||||||
|
*/
|
||||||
|
virtual ~IntelliToolCircle() override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the right click pressed of a mouse. Clearing the canvas 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 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 left click pressed of a mouse. Sets the middle point of the cricle.
|
||||||
|
* \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.
|
||||||
|
* \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 scroll event. Changing the edge Width 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. Draws a circle with radius of eulerian norm of mouse position and the middle point.
|
||||||
|
* \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;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // INTELLITOOLCIRCLE_H
|
||||||
@@ -4,19 +4,63 @@
|
|||||||
|
|
||||||
#include "QColor"
|
#include "QColor"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The IntelliToolFloodFill class represents a tool to flood FIll a certian area.
|
||||||
|
*/
|
||||||
class IntelliToolFloodFill : public IntelliTool{
|
class IntelliToolFloodFill : public IntelliTool{
|
||||||
public:
|
public:
|
||||||
|
/*!
|
||||||
|
* \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.
|
||||||
|
*/
|
||||||
IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief An Destructor.
|
||||||
|
*/
|
||||||
virtual ~IntelliToolFloodFill() override;
|
virtual ~IntelliToolFloodFill() override;
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the right click pressed of a mouse. Clearing the canvas.
|
||||||
|
* \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. Sets the point to flood fill around and does this.
|
||||||
|
* \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.
|
||||||
|
* \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.
|
||||||
|
* \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.
|
||||||
|
* \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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
67
src/Tool/IntelliToolFloodFill.h.autosave
Normal file
67
src/Tool/IntelliToolFloodFill.h.autosave
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#ifndef INTELLITOOLFLOODFILL_H
|
||||||
|
#define INTELLITOOLFLOODFILL_H
|
||||||
|
#include "IntelliTool.h"
|
||||||
|
|
||||||
|
#include "QColor"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The IntelliToolFloodFill class represents a tool to flood FIll a certian area.
|
||||||
|
*/
|
||||||
|
class IntelliToolFloodFill : public IntelliTool{
|
||||||
|
public:
|
||||||
|
/*!
|
||||||
|
* \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.
|
||||||
|
*/
|
||||||
|
IntelliToolFloodFill(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A Destructor.
|
||||||
|
*/
|
||||||
|
virtual ~IntelliToolFloodFill() override;
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the right click pressed of a mouse. Clearing the canvas.
|
||||||
|
* \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 left click pressed of a mouse. Sets the point to flood fill around and does this.
|
||||||
|
* \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.
|
||||||
|
* \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 scroll event.
|
||||||
|
* \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;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // INTELLITOOLFLOODFILL_H
|
||||||
@@ -4,27 +4,85 @@
|
|||||||
|
|
||||||
#include "QPoint"
|
#include "QPoint"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The LineStyle enum classifing all ways of drawing a line.
|
||||||
|
*/
|
||||||
enum class LineStyle{
|
enum class LineStyle{
|
||||||
SOLID_LINE,
|
SOLID_LINE,
|
||||||
DOTTED_LINE
|
DOTTED_LINE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The IntelliToolFloodFill class represents a tool to draw a line.
|
||||||
|
*/
|
||||||
class IntelliToolLine : public IntelliTool{
|
class IntelliToolLine : public IntelliTool{
|
||||||
|
/*!
|
||||||
|
* \brief The starting point of the line.
|
||||||
|
*/
|
||||||
QPoint start;
|
QPoint start;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The width of the line to draw.
|
||||||
|
*/
|
||||||
int lineWidth;
|
int lineWidth;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief The style of the line. Apropriate to LineStyle.
|
||||||
|
*/
|
||||||
LineStyle lineStyle;
|
LineStyle lineStyle;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A constructor setting the general paintingArea and colorPicker. And reading in the lineWidth and lineStyle.
|
||||||
|
* \param Area - The general paintingArea used by the project.
|
||||||
|
* \param colorPicker - The general colorPicker used by the project.
|
||||||
|
*/
|
||||||
IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
IntelliToolLine(PaintingArea* Area, IntelliColorPicker* colorPicker);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief An abstract Destructor.
|
||||||
|
*/
|
||||||
virtual ~IntelliToolLine() override;
|
virtual ~IntelliToolLine() override;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief A function managing the right click pressed of a mouse. Clearing the canvas.
|
||||||
|
* \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. Sets the starting point of the line.
|
||||||
|
* \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.
|
||||||
|
* \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 the lineWidth relative 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. Drawing a Line from the startpoint to the current mouse position.
|
||||||
|
* \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