IntelliPhoto  0.5
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 
10 enum class LineStyle {
11  SOLID_LINE,
13 };
14 
18 class IntelliToolLine : public IntelliTool {
22 QPoint start;
23 
27 int lineWidth;
28 
32 LineStyle lineStyle;
33 public:
34 
41 
45 virtual ~IntelliToolLine() override;
46 
52 virtual void onMouseRightPressed(int x, int y) override;
53 
59 virtual void onMouseRightReleased(int x, int y) override;
60 
66 virtual void onMouseLeftPressed(int x, int y) override;
67 
73 virtual void onMouseLeftReleased(int x, int y) override;
74 
79 virtual void onWheelScrolled(int value) override;
80 
86 virtual void onMouseMoved(int x, int y) override;
87 };
88 
89 #endif // INTELLITOOLLINE_H
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:38
LineStyle::SOLID_LINE
IntelliTool.h
LineStyle
LineStyle
The LineStyle enum classifing all ways of drawing a line.
Definition: IntelliToolLine.h:10
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:44
IntelliToolLine::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. Changing the lineWidth relative to value.
Definition: IntelliToolLine.cpp:36
IntelliToolLine::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolLine.cpp:21
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:33
IntelliToolLine::IntelliToolLine
IntelliToolLine(PaintingArea *Area, IntelliColorPicker *colorPicker)
A constructor setting the general paintingArea and colorPicker. And reading in the lineWidth and line...
Definition: IntelliToolLine.cpp:6
LineStyle::DOTTED_LINE
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:36
IntelliToolLine::~IntelliToolLine
virtual ~IntelliToolLine() override
An abstract Destructor.
Definition: IntelliToolLine.cpp:13
IntelliToolLine::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse.
Definition: IntelliToolLine.cpp:32
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:17
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:13
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:11
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:25
IntelliToolLine
The IntelliToolFloodFill class represents a tool to draw a line.
Definition: IntelliToolLine.h:18