IntelliPhoto 0.6

Public Types | Public Member Functions | Protected Attributes | List of all members
IntelliTool Class Referenceabstract

An abstract class that manages the basic events, like mouse clicks or scrolls events. More...

`#include <IntelliTool.h>`

Inheritance diagram for IntelliTool:

## Public Types
enum | Tooltype { Tooltype::CIRCLE, Tooltype::FLOODFILL, Tooltype::LINE, Tooltype::PEN, Tooltype::PLAIN, Tooltype::POLYGON, Tooltype::RECTANGLE, Tooltype::NONE }

## 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
bool | getIsDrawing () const

## Protected Attributes
PaintingArea * | Area
| A pointer to the general PaintingArea to interact with. More...
Tooltype | ActiveType
IntelliColorPicker * | colorPicker
| A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors. More...
IntelliToolsettings * | Toolsettings
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...

## Detailed Description

An abstract class that manages the basic events, like mouse clicks or scrolls events.

Definition at line 17 of file IntelliTool.h.

## Member Enumeration Documentation

## ◆ Tooltype

enum IntelliTool::Tooltype
| strong

Enumerator
CIRCLE |
FLOODFILL |
LINE |
PEN |
PLAIN |
POLYGON |
RECTANGLE |
NONE |

Definition at line 20 of file IntelliTool.h.

## Constructor & Destructor Documentation

## ◆ IntelliTool()

IntelliTool::IntelliTool | ( | PaintingArea * | Area,
|  | IntelliColorPicker * | colorPicker,
|  | IntelliToolsettings * | Toolsettings
| ) |  |

A constructor setting the general Painting Area and colorPicker.

Parameters

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

Definition at line 5 of file IntelliTool.cpp.

## ◆ ~IntelliTool()

IntelliTool::~IntelliTool | ( |  | ) |
| pure virtual

An abstract Destructor.

Definition at line 15 of file IntelliTool.cpp.

## Member Function Documentation

## ◆ getIsDrawing()

bool IntelliTool::getIsDrawing | ( |  | ) | const

Definition at line 105 of file IntelliTool.cpp.

## ◆ getTooltype()

IntelliTool::Tooltype IntelliTool::getTooltype | ( |  | ) | const

Definition at line 101 of file IntelliTool.cpp.

## ◆ onMouseLeftPressed()

void IntelliTool::onMouseLeftPressed | ( | int | x,
|  | int | y
| ) |  |
| virtual

A function managing the left click Pressed of a Mouse. Resetting the current draw. Call this in child classes!

Parameters

  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, and IntelliToolPlainTool.

Definition at line 30 of file IntelliTool.cpp.

## ◆ onMouseLeftReleased()

void IntelliTool::onMouseLeftReleased | ( | int | x,
|  | int | y
| ) |  |
| virtual

A function managing the left click Released of a Mouse. Call this in child classes!

Parameters

  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, and IntelliToolPlainTool.

Definition at line 37 of file IntelliTool.cpp.

## ◆ onMouseMoved()

void IntelliTool::onMouseMoved | ( | int | x,
|  | int | y
| ) |  |
| virtual

A function managing the mouse moved event. Call this in child classes!

Parameters

  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, and IntelliToolPlainTool.

Definition at line 47 of file IntelliTool.cpp.

## ◆ onMouseRightPressed()

void IntelliTool::onMouseRightPressed | ( | int | x,
|  | int | y
| ) |  |
| virtual

A function managing the right click Pressed of a Mouse. Constructing the Canvas to draw on. Call this in child classes!

Parameters

  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, and IntelliToolPlainTool.

Definition at line 19 of file IntelliTool.cpp.

## ◆ onMouseRightReleased()

void IntelliTool::onMouseRightReleased | ( | int | x,
|  | int | y
| ) |  |
| virtual

A function managing the right click Released of a Mouse. Merging the Canvas to Active. Call this in child classes!

Parameters

  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, and IntelliToolPlainTool.

Definition at line 26 of file IntelliTool.cpp.

## ◆ onWheelScrolled()

void IntelliTool::onWheelScrolled | ( | int | value | ) |
| virtual

A function managing the scroll event. A positive value means scrolling outwards. Call this in child classes!

Parameters

  value | - The absolute the scroll has changed.

Reimplemented in IntelliToolPolygon, IntelliToolCircle, IntelliToolRectangle, IntelliToolLine, IntelliToolPen, IntelliToolFloodFill, and IntelliToolPlainTool.

Definition at line 52 of file IntelliTool.cpp.

## Member Data Documentation

## ◆ activeLayer

LayerObject* IntelliTool::activeLayer
| protected

A pointer to the underlying active Layer, do not work on this. This is used for data grabbing or previews.

Definition at line 64 of file IntelliTool.h.

## ◆ ActiveType

Tooltype IntelliTool::ActiveType
| protected

Definition at line 52 of file IntelliTool.h.

## ◆ Area

PaintingArea* IntelliTool::Area
| protected

A pointer to the general PaintingArea to interact with.

Definition at line 50 of file IntelliTool.h.

## ◆ Canvas

LayerObject* IntelliTool::Canvas
| protected

A pointer to the drawing canvas of the tool, work on this.

Definition at line 69 of file IntelliTool.h.

## ◆ colorPicker

IntelliColorPicker* IntelliTool::colorPicker
| protected

A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors.

Definition at line 57 of file IntelliTool.h.

## ◆ isDrawing

bool IntelliTool::isDrawing = false
| protected

A flag checking if the user is currently drawing or not.

Definition at line 74 of file IntelliTool.h.

## ◆ Toolsettings

IntelliToolsettings* IntelliTool::Toolsettings
| protected

Definition at line 59 of file IntelliTool.h.

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

- src/Tool/IntelliTool.h
- src/Tool/IntelliTool.cpp