IntelliPhoto  1
IntelliToolPolygon.h
Go to the documentation of this file.
1 #ifndef INTELLITOOLPOLYGON_H
2 #define INTELLITOOLPOLYGON_H
3 
4 #include "IntelliTool.h"
6 #include <vector>
7 #include <QPoint>
8 
9 //for unit testing
10 class UnitTest;
11 
16 {
17 friend UnitTest;
25 bool isNearStart(int x, int y, QPoint Startpoint);
26 
30 bool drawingOfPolygon;
31 
35 bool isInside;
36 
40 bool isSettingPolygon;
41 
45 bool isPointNearStart;
46 
50 std::vector<QPoint> QPointList;
51 public:
62 ~IntelliToolPolygon() override;
63 
69 virtual void onMouseLeftPressed(int x, int y) override;
70 
76 virtual void onMouseLeftReleased(int x, int y) override;
77 
83 virtual void onMouseRightPressed(int x, int y) override;
84 
90 virtual void onMouseRightReleased(int x, int y) override;
91 
96 virtual void onWheelScrolled(int value) override;
97 
103 virtual void onMouseMoved(int x, int y) override;
104 
105 };
106 
107 #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
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:54
IntelliToolPolygon::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event.
Definition: IntelliToolPolygon.cpp:137
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliToolPolygon::IntelliToolPolygon
IntelliToolPolygon(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings, bool isSettingPolygon=false)
A constructor setting the general paintingArea and colorPicker.
Definition: IntelliToolPolygon.cpp:8
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
IntelliToolPolygon::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse. Resetting the current fill.
Definition: IntelliToolPolygon.cpp:83
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
IntelliToolPolygon::~IntelliToolPolygon
~IntelliToolPolygon() override
A Destructor.
Definition: IntelliToolPolygon.cpp:20
UnitTest
Definition: mainUnitTest.cpp:8
IntelliToolPolygon::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Setting polygon points.
Definition: IntelliToolPolygon.cpp:26
IntelliToolPolygon::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolPolygon.cpp:124
IntelliToolPolygon
The IntelliToolPolygon managed the Drawing of Polygonforms.
Definition: IntelliToolPolygon.h:15
IntelliToolPolygon::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse. Merging the fill to the active layer.
Definition: IntelliToolPolygon.cpp:91
IntelliTriangulation.h
IntelliToolsettings
The IntelliToolsettings class managing the settings of the tools, independent of an existing tool.
Definition: IntelliToolsettings.h:9
IntelliToolPolygon::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. CHanging the lineWidth relative to value.
Definition: IntelliToolPolygon.cpp:128