IntelliPhoto  1
IntelliToolLine.h
Go to the documentation of this file.
1 #ifndef INTELLITOOLLINE_H
2 #define INTELLITOOLLINE_H
3 #include "IntelliTool.h"
4 
5 #include "QPoint"
6 
7 //for unit testing
8 class UnitTest;
9 
13 class IntelliToolLine : public IntelliTool {
14 friend UnitTest;
18 QPoint lineStartingPoint;
19 
20 public:
21 
28 
32 virtual ~IntelliToolLine() override;
33 
39 virtual void onMouseRightPressed(int x, int y) override;
40 
46 virtual void onMouseRightReleased(int x, int y) override;
47 
53 virtual void onMouseLeftPressed(int x, int y) override;
54 
60 virtual void onMouseLeftReleased(int x, int y) override;
61 
66 virtual void onWheelScrolled(int value) override;
67 
73 virtual void onMouseMoved(int x, int y) override;
74 };
75 
76 #endif
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:64
IntelliTool.h
IntelliTool::Toolsettings
IntelliToolsettings * Toolsettings
Toolsettings a refrence to the tool settings.
Definition: IntelliTool.h:69
IntelliToolLine::IntelliToolLine
IntelliToolLine(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
A constructor setting the general paintingArea and colorPicker.
Definition: IntelliToolLine.cpp:6
IntelliToolLine::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event. Drawing a Line from the startpoint to the current mouse po...
Definition: IntelliToolLine.cpp:39
IntelliToolLine::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. Changing the lineWidth relative to value.
Definition: IntelliToolLine.cpp:34
IntelliToolLine::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolLine.cpp:19
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:54
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliToolLine::~IntelliToolLine
virtual ~IntelliToolLine() override
An abstract Destructor.
Definition: IntelliToolLine.cpp:11
IntelliToolLine::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse.
Definition: IntelliToolLine.cpp:30
IntelliToolLine::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse. Clearing the canvas.
Definition: IntelliToolLine.cpp:15
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
UnitTest
Definition: mainUnitTest.cpp:8
IntelliToolLine::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Sets the starting point of the line.
Definition: IntelliToolLine.cpp:23
IntelliToolsettings
The IntelliToolsettings class managing the settings of the tools, independent of an existing tool.
Definition: IntelliToolsettings.h:9
IntelliToolLine
The IntelliToolFloodFill class represents a tool to draw a line.
Definition: IntelliToolLine.h:13