IntelliPhoto  0.5
IntelliTool.h
Go to the documentation of this file.
1 #ifndef Intelli_Tool_H
2 #define Intelli_Tool_H
3 
5 #include <vector>
6 
7 class LayerObject;
8 class PaintingArea;
9 
13 class IntelliTool {
14 private:
18 void createToolLayer();
19 
23 void mergeToolLayer();
24 
28 void deleteToolLayer();
29 protected:
34 
39 
44 
49 
53 bool drawing = false;
54 
55 public:
62 
66 virtual ~IntelliTool() = 0;
67 
73 virtual void onMouseRightPressed(int x, int y);
74 
80 virtual void onMouseRightReleased(int x, int y);
81 
87 virtual void onMouseLeftPressed(int x, int y);
88 
94 virtual void onMouseLeftReleased(int x, int y);
95 
100 virtual void onWheelScrolled(int value);
101 
107 virtual void onMouseMoved(int x, int y);
108 
109 
110 };
111 #endif
IntelliTool::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y)
A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on....
Definition: IntelliTool.cpp:14
IntelliTool::onMouseLeftReleased
virtual void onMouseLeftReleased(int x, int y)
A function managing the left click Released of a Mouse. Call this in child classes!
Definition: IntelliTool.cpp:32
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:38
IntelliTool::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y)
A function managing the left click Pressed of a Mouse. Resetting the current draw....
Definition: IntelliTool.cpp:25
IntelliTool::IntelliTool
IntelliTool(PaintingArea *Area, IntelliColorPicker *colorPicker)
A constructor setting the general Painting Area and colorPicker.
Definition: IntelliTool.cpp:4
IntelliTool::Area
PaintingArea * Area
A pointer to the general PaintingArea to interact with.
Definition: IntelliTool.h:33
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:36
LayerObject
The LayerObject struct holds all the information needed to construct a layer.
Definition: PaintingArea.h:24
IntelliTool::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y)
A function managing the right click Released of a Mouse. Merging the Canvas to Active....
Definition: IntelliTool.cpp:21
IntelliColorPicker.h
IntelliTool::Canvas
LayerObject * Canvas
A pointer to the drawing canvas of the tool, work on this.
Definition: IntelliTool.h:48
IntelliTool::drawing
bool drawing
A flag checking if the user is currently drawing or not.
Definition: IntelliTool.h:53
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:13
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:11
IntelliTool::Active
LayerObject * Active
A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or prev...
Definition: IntelliTool.h:43
IntelliTool::onMouseMoved
virtual void onMouseMoved(int x, int y)
A function managing the mouse moved event. Call this in child classes!
Definition: IntelliTool.cpp:41
IntelliTool::onWheelScrolled
virtual void onWheelScrolled(int value)
A function managing the scroll event. A positive value means scrolling outwards. Call this in child c...
Definition: IntelliTool.cpp:46
IntelliTool::~IntelliTool
virtual ~IntelliTool()=0
An abstract Destructor.
Definition: IntelliTool.cpp:10