IntelliPhoto 0.6

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, IntelliToolsettings* Toolsettings)
6 : IntelliTool(Area, colorPicker, Toolsettings){
7 this->ActiveType = Tooltype::PLAIN;
8 }
9
10 IntelliToolPlainTool::~IntelliToolPlainTool(){
11 IntelliTool::onMouseRightPressed(0,0);
12 }
13
14 void IntelliToolPlainTool::onMouseLeftPressed(int x, int y){
15 IntelliTool::onMouseLeftPressed(x,y);
16 this->Canvas->image->drawPlain(colorPicker->getFirstColor());
17 Canvas->image->calculateVisiblity();
18 }
19
20 void IntelliToolPlainTool::onMouseLeftReleased(int x, int y){
21 IntelliTool::onMouseLeftReleased(x,y);
22 }
23
24 void IntelliToolPlainTool::onMouseRightPressed(int x, int y){
25 IntelliTool::onMouseRightPressed(x,y);
26 }
27
28 void IntelliToolPlainTool::onMouseRightReleased(int x, int y){
29 IntelliTool::onMouseRightReleased(x,y);
30 }
31
32 void IntelliToolPlainTool::onMouseMoved(int x, int y){
33 IntelliTool::onMouseMoved(x,y);
34 }
35
36 void IntelliToolPlainTool::onWheelScrolled(int value){
37 IntelliTool::onWheelScrolled(value);
38 }
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:19
IntelliColorPicker::getFirstColor
QColor getFirstColor() const
A function to read the primary selected color.
Definition: IntelliColorPicker.cpp:15
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:37
IntelliTool::colorPicker
IntelliColorPicker * colorPicker
A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.
Definition: IntelliTool.h:57
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:30
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:20
IntelliToolPlainTool::onWheelScrolled
virtual void onWheelScrolled(int value) override
A function managing the scroll event.
Definition: IntelliToolPlain.cpp:36
IntelliToolPlainTool::onMouseRightReleased
virtual void onMouseRightReleased(int x, int y) override
A function managing the right click released of a mouse.
Definition: IntelliToolPlain.cpp:28
PaintingArea
The PaintingArea class manages the methods and stores information about the current painting area,...
Definition: PaintingArea.h:57
IntelliToolPlain.h
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:26
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:14
IntelliTool::Tooltype::PLAIN
@ PLAIN
IntelliTool::Canvas
LayerObject * Canvas
A pointer to the drawing canvas of the tool, work on this.
Definition: IntelliTool.h:69
IntelliTool
An abstract class that manages the basic events, like mouse clicks or scrolls events.
Definition: IntelliTool.h:17
PaintingArea.h
IntelliTool::ActiveType
Tooltype ActiveType
Definition: IntelliTool.h:52
IntelliColorPicker
The IntelliColorPicker manages the selected colors for one whole project.
Definition: IntelliColorPicker.h:14
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:24
LayerObject::image
IntelliImage * image
image - Stores the imageData of the current LayerObject.
Definition: PaintingArea.h:27
IntelliToolPlainTool::IntelliToolPlainTool
IntelliToolPlainTool(PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
A constructor setting the general paintingArea and colorPicker.
Definition: IntelliToolPlain.cpp:5
IntelliToolPlainTool::onMouseMoved
virtual void onMouseMoved(int x, int y) override
A function managing the mouse moved event.
Definition: IntelliToolPlain.cpp:32
IntelliTool::onMouseMoved
virtual void onMouseMoved(int x, int y)
A function managing the mouse moved event. Call this in child classes!
Definition: IntelliTool.cpp:47
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:10
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:52
IntelliToolsettings
Definition: IntelliToolsettings.h:7
IntelliImage::drawPlain
virtual void drawPlain(const QColor &color)
A function that clears the whole image in a given Color.
Definition: IntelliImage.cpp:117