IntelliPhoto 0.5

IntelliToolPlain.cpp
Go to the documentation of this file.
1 #include "IntelliToolPlain.h"
2 #include "Layer/PaintingArea.h"
3 #include "QColorDialog"
4
5 IntelliToolPlainTool::IntelliToolPlainTool(PaintingArea* Area, IntelliColorPicker* colorPicker)
6 : IntelliTool(Area, colorPicker){
7 }
8
9 IntelliToolPlainTool::~IntelliToolPlainTool(){
10
11 }
12
13 void IntelliToolPlainTool::onMouseLeftPressed(int x, int y){
14 IntelliTool::onMouseLeftPressed(x,y);
15 this->Canvas->image->drawPlain(colorPicker->getFirstColor());
16 Canvas->image->calculateVisiblity();
17 }
18
19 void IntelliToolPlainTool::onMouseLeftReleased(int x, int y){
20 IntelliTool::onMouseLeftReleased(x,y);
21 }
22
23 void IntelliToolPlainTool::onMouseRightPressed(int x, int y){
24 IntelliTool::onMouseRightPressed(x,y);
25 }
26
27 void IntelliToolPlainTool::onMouseRightReleased(int x, int y){
28 IntelliTool::onMouseRightReleased(x,y);
29 }
30
31 void IntelliToolPlainTool::onMouseMoved(int x, int y){
32 IntelliTool::onMouseMoved(x,y);
33 }
34
35 void IntelliToolPlainTool::onWheelScrolled(int value){
36 IntelliTool::onWheelScrolled(value);
37 }
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
IntelliToolPlainTool::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: IntelliToolPlain.cpp:19
IntelliToolPlainTool::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event.
Definition: IntelliToolPlain.cpp:35
IntelliToolPlainTool::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolPlain.cpp:27
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:36
IntelliToolPlain.h
IntelliToolPlainTool::IntelliToolPlainTool
IntelliToolPlainTool(PaintingArea *Area, IntelliColorPicker *colorPicker)
A constructor setting the general paintingArea and colorPicker.
Definition: IntelliToolPlain.cpp:5
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
IntelliToolPlainTool::onMouseLeftPressed
virtual void onMouseLeftPressed(int x, int y) override
A function managing the left click pressed of a mouse. Filling the whole canvas.
Definition: IntelliToolPlain.cpp:13
IntelliTool::Canvas
LayerObject * Canvas
A pointer to the drawing canvas of the tool, work on this.
Definition: IntelliTool.h:48
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:13
PaintingArea.h
IntelliColorPicker::getFirstColor
QColor getFirstColor()
A function to read the primary selected color.
Definition: IntelliColorPicker.cpp:16
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:11
IntelliToolPlainTool::onMouseRightPressed
virtual void onMouseRightPressed(int x, int y) override
A function managing the right click pressed of a mouse. Resetting the current fill.
Definition: IntelliToolPlain.cpp:23
LayerObject::image
IntelliImage * image
Definition: PaintingArea.h:25
IntelliToolPlainTool::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event.
Definition: IntelliToolPlain.cpp:31
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
IntelliImage::calculateVisiblity
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
IntelliToolPlainTool::~IntelliToolPlainTool
virtual ~IntelliToolPlainTool() override
A Destructor.
Definition: IntelliToolPlain.cpp:9
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
IntelliImage::drawPlain
virtual void drawPlain(const QColor &color)
A function that clears the whole image in a given Color.
Definition: IntelliImage.cpp:76