IntelliPhoto  0.5
IntelliToolPen.h
Go to the documentation of this file.
1 #ifndef INTELLITOOLPEN_H
2 #define INTELLITOOLPEN_H
3 
4 #include "IntelliTool.h"
5 #include "QColor"
6 #include "QPoint"
7 
8 //for unit testing
9 class UnitTest;
10 
14 class IntelliToolPen : public IntelliTool {
15 friend UnitTest;
19 QPoint previousPoint;
20 public:
30 virtual ~IntelliToolPen() override;
31 
37 virtual void onMouseRightPressed(int x, int y) override;
38 
44 virtual void onMouseRightReleased(int x, int y) override;
45 
51 virtual void onMouseLeftPressed(int x, int y) override;
52 
58 virtual void onMouseLeftReleased(int x, int y) override;
59 
64 virtual void onWheelScrolled(int value) override;
65 
71 virtual void onMouseMoved(int x, int y) override;
72 };
73 
74 #endif
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:57
IntelliTool.h
IntelliTool::Toolsettings
IntelliToolsettings * Toolsettings
Definition: IntelliTool.h:59
IntelliToolPen::~IntelliToolPen
virtual ~IntelliToolPen() override
A Destructor.
Definition: IntelliToolPen.cpp:12
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:50
IntelliToolPen::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event. To draw the line.
Definition: IntelliToolPen.cpp:35
IntelliToolPen::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse. Resetting the current draw.
Definition: IntelliToolPen.cpp:16
IntelliToolPen::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolPen.cpp:20
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:53
IntelliToolPen
The IntelliToolPen class represents a tool to draw a line.
Definition: IntelliToolPen.h:14
IntelliToolPen::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. Changing penWidth relativ to value.
Definition: IntelliToolPen.cpp:44
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliToolPen::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse. Merging the drawing to the active layer.
Definition: IntelliToolPen.cpp:31
IntelliToolPen::IntelliToolPen
IntelliToolPen(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
A constructor setting the general paintingArea and colorPicker. Reading the penWidth.
Definition: IntelliToolPen.cpp:7
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
UnitTest
Definition: mainUnitTest.cpp:8
IntelliToolPen::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Starting the drawing procedure.
Definition: IntelliToolPen.cpp:24
IntelliToolsettings
Definition: IntelliToolsettings.h:7