|
IntelliPhoto
1
|
An abstract class that manages the basic events, like mouse clicks or scrolls events. More...
#include <IntelliTool.h>
Public Types | |
| enum | Tooltype { Tooltype::CIRCLE, Tooltype::FLOODFILL, Tooltype::GRADIENT, Tooltype::LINE, Tooltype::PEN, Tooltype::PLAIN, Tooltype::POLYGON, Tooltype::RECTANGLE, Tooltype::NONE } |
| The Tooltype enum categorising the toosl. More... | |
Public Member Functions | |
| IntelliTool (PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings) | |
| A constructor setting the general Painting Area and colorPicker. More... | |
| virtual | ~IntelliTool ()=0 |
| An abstract Destructor. More... | |
| virtual void | onMouseRightPressed (int x, int y) |
| A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on. Call this in child classes! More... | |
| virtual void | onMouseRightReleased (int x, int y) |
| A function managing the right click Released of a Mouse. Merging the Canvas to Active. Call this in child classes! More... | |
| virtual void | onMouseLeftPressed (int x, int y) |
| A function managing the left click Pressed of a Mouse. Resetting the current draw. Call this in child classes! More... | |
| virtual void | onMouseLeftReleased (int x, int y) |
| A function managing the left click Released of a Mouse. Call this in child classes! More... | |
| virtual void | onWheelScrolled (int value) |
| A function managing the scroll event. A positive value means scrolling outwards. Call this in child classes! More... | |
| virtual void | onMouseMoved (int x, int y) |
| A function managing the mouse moved event. Call this in child classes! More... | |
| Tooltype | getTooltype () const |
| getTooltype returns the tools type More... | |
| bool | getIsDrawing () const |
| getIsDrawing returns if the tool is currently drawing More... | |
Protected Attributes | |
| PaintingArea * | Area |
| A pointer to the general PaintingArea to interact with. More... | |
| Tooltype | ActiveType |
| ActiveType the type of the active tool. More... | |
| IntelliColorPicker * | colorPicker |
| A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors. More... | |
| IntelliToolsettings * | Toolsettings |
| Toolsettings a refrence to the tool settings. More... | |
| LayerObject * | activeLayer |
| A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews. More... | |
| LayerObject * | Canvas |
| A pointer to the drawing canvas of the tool, work on this. More... | |
| bool | isDrawing = false |
| A flag checking if the user is currently drawing or not. More... | |
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition at line 17 of file IntelliTool.h.
|
strong |
The Tooltype enum categorising the toosl.
| Enumerator | |
|---|---|
| CIRCLE | |
| FLOODFILL | |
| GRADIENT | |
| LINE | |
| PEN | |
| PLAIN | |
| POLYGON | |
| RECTANGLE | |
| NONE | |
Definition at line 23 of file IntelliTool.h.
| IntelliTool::IntelliTool | ( | PaintingArea * | Area, |
| IntelliColorPicker * | colorPicker, | ||
| IntelliToolsettings * | Toolsettings | ||
| ) |
A constructor setting the general Painting Area and colorPicker.
| Area | - The general PaintingArea used by the project. |
| colorPicker | - The general colorPicker used by the project. |
Definition at line 5 of file IntelliTool.cpp.
|
pure virtual |
An abstract Destructor.
Definition at line 15 of file IntelliTool.cpp.
| bool IntelliTool::getIsDrawing | ( | ) | const |
getIsDrawing returns if the tool is currently drawing
Definition at line 105 of file IntelliTool.cpp.
| IntelliTool::Tooltype IntelliTool::getTooltype | ( | ) | const |
getTooltype returns the tools type
Definition at line 101 of file IntelliTool.cpp.
|
virtual |
A function managing the left click Pressed of a Mouse. Resetting the current draw. Call this in child classes!
| x | - The x coordinate relative to the active/canvas layer. |
| y | - The y coordinate relative to the active/canvas layer. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 30 of file IntelliTool.cpp.
|
virtual |
A function managing the left click Released of a Mouse. Call this in child classes!
| x | - The x coordinate relative to the active/canvas layer. |
| y | - The y coordinate relative to the active/canvas layer. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 37 of file IntelliTool.cpp.
|
virtual |
A function managing the mouse moved event. Call this in child classes!
| x | - The x coordinate of the new mouse position. |
| y | - The y coordinate of the new mouse position. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 48 of file IntelliTool.cpp.
|
virtual |
A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on. Call this in child classes!
| x | - The x coordinate relative to the active/canvas layer. |
| y | - The y coordinate relative to the active/canvas layer. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 19 of file IntelliTool.cpp.
|
virtual |
A function managing the right click Released of a Mouse. Merging the Canvas to Active. Call this in child classes!
| x | - The x coordinate relative to the active/canvas layer. |
| y | - The y coordinate relative to the active/canvas layer. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 26 of file IntelliTool.cpp.
|
virtual |
A function managing the scroll event. A positive value means scrolling outwards. Call this in child classes!
| value | - The absolute the scroll has changed. |
Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, IntelliToolPlainTool, and IntelliToolGradient.
Definition at line 53 of file IntelliTool.cpp.
|
protected |
A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews.
Definition at line 74 of file IntelliTool.h.
|
protected |
ActiveType the type of the active tool.
Definition at line 59 of file IntelliTool.h.
|
protected |
A pointer to the general PaintingArea to interact with.
Definition at line 54 of file IntelliTool.h.
|
protected |
A pointer to the drawing canvas of the tool, work on this.
Definition at line 79 of file IntelliTool.h.
|
protected |
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition at line 64 of file IntelliTool.h.
|
protected |
A flag checking if the user is currently drawing or not.
Definition at line 84 of file IntelliTool.h.
|
protected |
Toolsettings a refrence to the tool settings.
Definition at line 69 of file IntelliTool.h.