IntelliPhoto  0.4
IntelliToolRectangle.h
Go to the documentation of this file.
1 #ifndef INTELLIRECTANGLETOOL_H
2 #define INTELLIRECTANGLETOOL_H
3 
4 #include "IntelliTool.h"
5 
6 #include "QColor"
7 #include "QPoint"
16  void drawRectangle(QPoint otherCornor);
17 
21  QPoint originCornor;
25  int alphaInner;
29  int edgeWidth;
30 public:
40  virtual ~IntelliToolRectangle() override;
41 
47  virtual void onMouseRightPressed(int x, int y) override;
48 
54  virtual void onMouseRightReleased(int x, int y) override;
55 
61  virtual void onMouseLeftPressed(int x, int y) override;
62 
68  virtual void onMouseLeftReleased(int x, int y) override;
69 
74  virtual void onWheelScrolled(int value) override;
75 
81  virtual void onMouseMoved(int x, int y) override;
82 };
83 
84 #endif // INTELLIRECTANGLETOOL_H
IntelliToolRectangle::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event.Changing edgeWidth relativ to value.
Definition: IntelliToolRectangle.cpp:61
IntelliToolRectangle::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolRectangle.cpp:37
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:38
IntelliTool.h
IntelliToolRectangle::~IntelliToolRectangle
virtual ~IntelliToolRectangle() override
A Destructor.
Definition: IntelliToolRectangle.cpp:11
IntelliToolRectangle::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Setting the originCorner and draws a rectangle...
Definition: IntelliToolRectangle.cpp:41
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:33
IntelliToolRectangle::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse.Resetting the current draw.
Definition: IntelliToolRectangle.cpp:33
PaintingArea
Definition: PaintingArea.h:25
IntelliToolRectangle
The IntelliToolRectangle class represents a tool to draw a rectangle.
Definition: IntelliToolRectangle.h:11
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:13
IntelliToolRectangle::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event.Drawing a rectangle to currrent mouse position.
Definition: IntelliToolRectangle.cpp:52
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:11
IntelliToolRectangle::IntelliToolRectangle
IntelliToolRectangle(PaintingArea *Area, IntelliColorPicker *colorPicker)
A constructor setting the general paintingArea and colorPicker. And reading in the alphaInner and edg...
Definition: IntelliToolRectangle.cpp:5
IntelliToolRectangle::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y) override
A function managing the left click released of a mouse. Merging the draw to the active layer.
Definition: IntelliToolRectangle.cpp:48