IntelliPhoto  0.7
IntelliToolGradient.h
Go to the documentation of this file.
1 #ifndef INTELLITOOLGRADIENT_H
2 #define INTELLITOOLGRADIENT_H
3 #include "IntelliTool.h"
8 
9 public:
17 
21 virtual ~IntelliToolGradient() override;
22 
28 virtual void onMouseRightPressed(int x, int y) override;
29 
35 virtual void onMouseRightReleased(int x, int y) override;
36 
42 virtual void onMouseLeftPressed(int x, int y) override;
43 
49 virtual void onMouseLeftReleased(int x, int y) override;
50 
55 virtual void onWheelScrolled(int value) override;
56 
62 virtual void onMouseMoved(int x, int y) override;
63 
64 private:
65 
69 QPoint startPoint;
70 
74 QPoint endPoint;
78 double doubleStartPoint[2];
79 
83 double VectorStartEnd[2];
84 
88 double NormalVector[2];
89 
93 double NormalDotNormal;
94 
98 QColor LineColor;
99 
103 bool hasMoved;
104 
109 void computeAndDrawPixelColor(QPoint Point);
110 
117 double dotProduct(double Vector1[2], double Vector2[2]);
118 
124 double lenghtVector(double Vector[2]);
125 
129 void computeGradientLayer();
130 };
131 
132 #endif // INTELLITOOLGRADIENT_H
IntelliToolGradient::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click Released of a Mouse. Call this in child classes!
Definition: IntelliToolGradient.cpp:32
IntelliToolGradient::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click Released of a Mouse. Merging the Canvas to Active....
Definition: IntelliToolGradient.cpp:39
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
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:54
IntelliToolGradient::~IntelliToolGradient
virtual ~IntelliToolGradient() override
~IntelliToolGradient basic destructor.
Definition: IntelliToolGradient.cpp:13
IntelliToolGradient::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on....
Definition: IntelliToolGradient.cpp:28
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliToolGradient::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. A positive value means scrolling outwards. Call this in child c...
Definition: IntelliToolGradient.cpp:59
IntelliToolGradient::IntelliToolGradient
IntelliToolGradient(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
IntelliToolGradient basic constructor of the gradient tool.
Definition: IntelliToolGradient.cpp:6
IntelliToolGradient::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click Pressed of a Mouse. Resetting the current draw....
Definition: IntelliToolGradient.cpp:17
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliToolGradient::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event. Call this in child classes!
Definition: IntelliToolGradient.cpp:43
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
IntelliToolsettings
The IntelliToolsettings class managing the settings of the tools, independent of an existing tool.
Definition: IntelliToolsettings.h:9
IntelliToolGradient
The IntelliToolGradient class that represents a gradient call.
Definition: IntelliToolGradient.h:7