IntelliPhoto  1
IntelliToolPen Class Reference

The IntelliToolPen class represents a tool to draw a line. More...

#include <IntelliToolPen.h>

Inheritance diagram for IntelliToolPen:
IntelliTool

Public Member Functions

 IntelliToolPen (PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
 A constructor setting the general paintingArea and colorPicker. Reading the penWidth. More...
 
virtual ~IntelliToolPen () override
 A Destructor. More...
 
virtual void onMouseRightPressed (int x, int y) override
 A function managing the right click pressed of a mouse. Resetting the current draw. More...
 
virtual void onMouseRightReleased (int x, int y) override
 A function managing the right click released of a mouse. More...
 
virtual void onMouseLeftPressed (int x, int y) override
 A function managing the left click pressed of a mouse. Starting the drawing procedure. More...
 
virtual void onMouseLeftReleased (int x, int y) override
 A function managing the left click released of a mouse. Merging the drawing to the active layer. More...
 
virtual void onWheelScrolled (int value) override
 A function managing the scroll event. Changing penWidth relativ to value. More...
 
virtual void onMouseMoved (int x, int y) override
 A function managing the mouse moved event. To draw the line. More...
 
- Public Member Functions inherited from IntelliTool
 IntelliTool (PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings)
 A constructor setting the general Painting Area and colorPicker. More...
 
virtual ~IntelliTool ()=0
 An abstract Destructor. More...
 
Tooltype getTooltype () const
 getTooltype returns the tools type More...
 
bool getIsDrawing () const
 getIsDrawing returns if the tool is currently drawing More...
 

Additional Inherited Members

- Public Types inherited from IntelliTool
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...
 
- Protected Attributes inherited from IntelliTool
PaintingAreaArea
 A pointer to the general PaintingArea to interact with. More...
 
Tooltype ActiveType
 ActiveType the type of the active tool. More...
 
IntelliColorPickercolorPicker
 A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors. More...
 
IntelliToolsettingsToolsettings
 Toolsettings a refrence to the tool settings. More...
 
LayerObjectactiveLayer
 A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews. More...
 
LayerObjectCanvas
 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...
 

Detailed Description

The IntelliToolPen class represents a tool to draw a line.

Definition at line 14 of file IntelliToolPen.h.

Constructor & Destructor Documentation

◆ IntelliToolPen()

IntelliToolPen::IntelliToolPen ( PaintingArea Area,
IntelliColorPicker colorPicker,
IntelliToolsettings Toolsettings 
)

A constructor setting the general paintingArea and colorPicker. Reading the penWidth.

Parameters
Area- The general PaintingArea used by the project.
colorPicker- The general colorPicker used by the project.

Definition at line 7 of file IntelliToolPen.cpp.

◆ ~IntelliToolPen()

IntelliToolPen::~IntelliToolPen ( )
overridevirtual

A Destructor.

Definition at line 12 of file IntelliToolPen.cpp.

Member Function Documentation

◆ onMouseLeftPressed()

void IntelliToolPen::onMouseLeftPressed ( int  x,
int  y 
)
overridevirtual

A function managing the left click pressed of a mouse. Starting the drawing procedure.

Parameters
x- The x coordinate relative to the active/canvas layer.
y- The y coordinate relative to the active/canvas layer.

Reimplemented from IntelliTool.

Definition at line 24 of file IntelliToolPen.cpp.

◆ onMouseLeftReleased()

void IntelliToolPen::onMouseLeftReleased ( int  x,
int  y 
)
overridevirtual

A function managing the left click released of a mouse. Merging the drawing to the active layer.

Parameters
x- The x coordinate relative to the active/canvas layer.
y- The y coordinate relative to the active/canvas layer.

Reimplemented from IntelliTool.

Definition at line 31 of file IntelliToolPen.cpp.

◆ onMouseMoved()

void IntelliToolPen::onMouseMoved ( int  x,
int  y 
)
overridevirtual

A function managing the mouse moved event. To draw the line.

Parameters
x- The x coordinate of the new mouse position.
y- The y coordinate of the new mouse position.

Reimplemented from IntelliTool.

Definition at line 35 of file IntelliToolPen.cpp.

◆ onMouseRightPressed()

void IntelliToolPen::onMouseRightPressed ( int  x,
int  y 
)
overridevirtual

A function managing the right click pressed of a mouse. Resetting the current draw.

Parameters
x- The x coordinate relative to the active/canvas layer.
y- The y coordinate relative to the active/canvas layer.

Reimplemented from IntelliTool.

Definition at line 16 of file IntelliToolPen.cpp.

◆ onMouseRightReleased()

void IntelliToolPen::onMouseRightReleased ( int  x,
int  y 
)
overridevirtual

A function managing the right click released of a mouse.

Parameters
x- The x coordinate relative to the active/canvas layer.
y- The y coordinate relative to the active/canvas layer.

Reimplemented from IntelliTool.

Definition at line 20 of file IntelliToolPen.cpp.

◆ onWheelScrolled()

void IntelliToolPen::onWheelScrolled ( int  value)
overridevirtual

A function managing the scroll event. Changing penWidth relativ to value.

Parameters
value- The absolute the scroll has changed.

Reimplemented from IntelliTool.

Definition at line 44 of file IntelliToolPen.cpp.


The documentation for this class was generated from the following files: