IntelliToolCircle.h
Go to the documentation of this file.
#ifndef INTELLITOOLCIRCLE_H
#define INTELLITOOLCIRCLE_H
#include "IntelliTool.h"
#include "QColor"
#include "QPoint"
//for unit testing
class UnitTest;
class IntelliToolCircle : public IntelliTool {
friend UnitTest;
void drawCircle(int radius);
QPoint centerPoint;
public:
IntelliToolCircle(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings);
virtual ~IntelliToolCircle() override;
virtual void onMouseRightPressed(int x, int y) override;
virtual void onMouseRightReleased(int x, int y) override;
virtual void onMouseLeftPressed(int x, int y) override;
virtual void onMouseLeftReleased(int x, int y) override;
virtual void onWheelScrolled(int value) override;
virtual void onMouseMoved(int x, int y) override;
};
#endif
IntelliToolCircle::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse. Clearing the canvas layer.
Definition: IntelliToolCircle.cpp:49
IntelliToolCircle::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolCircle.cpp:53
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
IntelliToolCircle::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event. Changing the edge Width relative to value.
Definition: IntelliToolCircle.cpp:71
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
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliToolCircle::IntelliToolCircle
IntelliToolCircle(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
A constructor setting the general paintingArea and colorPicker. And reading in the inner alpha and ed...
Definition: IntelliToolCircle.cpp:6
IntelliToolCircle::~IntelliToolCircle
virtual ~IntelliToolCircle() override
A Destructor.
Definition: IntelliToolCircle.cpp:11
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
IntelliToolCircle::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event. Draws a circle with radius of eulerian norm of mouse posit...
Definition: IntelliToolCircle.cpp:76
UnitTest
Definition: mainUnitTest.cpp:8
IntelliToolCircle::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse.
Definition: IntelliToolCircle.cpp:67
IntelliToolCircle
The IntelliToolCircle class represents a tool to draw a circle.
Definition: IntelliToolCircle.h:14
IntelliToolsettings
The IntelliToolsettings class managing the settings of the tools, independent of an existing tool.
Definition: IntelliToolsettings.h:9
IntelliToolCircle::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Sets the middle point of the cricle.
Definition: IntelliToolCircle.cpp:57