IntelliPhoto  0.5
IntelliToolPolygon Class Reference

The IntelliToolPolygon managed the Drawing of Polygonforms. More...

#include <IntelliToolPolygon.h>

Inheritance diagram for IntelliToolPolygon:
IntelliTool

Public Member Functions

 IntelliToolPolygon (PaintingArea *Area, IntelliColorPicker *colorPicker, IntelliToolsettings *Toolsettings, bool isSettingPolygon=false)
 A constructor setting the general paintingArea and colorPicker. More...
 
 ~IntelliToolPolygon () override
 A Destructor. More...
 
virtual void onMouseLeftPressed (int x, int y) override
 A function managing the left click pressed of a mouse. Setting polygon points. More...
 
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. More...
 
virtual void onMouseRightPressed (int x, int y) override
 A function managing the right click pressed of a mouse. Resetting the current fill. More...
 
virtual void onMouseRightReleased (int x, int y) override
 A function managing the right click released of a mouse. More...
 
virtual void onWheelScrolled (int value) override
 A function managing the scroll event. CHanging the lineWidth relative to value. More...
 
virtual void onMouseMoved (int x, int y) override
 A function managing the mouse moved event. 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
 
bool getIsDrawing () const
 

Additional Inherited Members

- Public Types inherited from IntelliTool
enum  Tooltype {
  Tooltype::CIRCLE, Tooltype::FLOODFILL, Tooltype::LINE, Tooltype::PEN,
  Tooltype::PLAIN, Tooltype::POLYGON, Tooltype::RECTANGLE, Tooltype::NONE
}
 
- Protected Attributes inherited from IntelliTool
PaintingAreaArea
 A pointer to the general PaintingArea to interact with. More...
 
Tooltype ActiveType
 
IntelliColorPickercolorPicker
 A pointer to the IntelliColorPicker of the PaintingArea to interact with, and get the colors. More...
 
IntelliToolsettingsToolsettings
 
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 IntelliToolPolygon managed the Drawing of Polygonforms.

Definition at line 15 of file IntelliToolPolygon.h.

Constructor & Destructor Documentation

◆ IntelliToolPolygon()

IntelliToolPolygon::IntelliToolPolygon ( PaintingArea Area,
IntelliColorPicker colorPicker,
IntelliToolsettings Toolsettings,
bool  isSettingPolygon = false 
)

A constructor setting the general paintingArea and colorPicker.

Parameters
Area- The general paintingArea used by the project.
colorPicker- The general colorPicker used by the project.
isSettingPolygon- The flag for the set polygon method, standart is false

Definition at line 8 of file IntelliToolPolygon.cpp.

◆ ~IntelliToolPolygon()

IntelliToolPolygon::~IntelliToolPolygon ( )
override

A Destructor.

Definition at line 20 of file IntelliToolPolygon.cpp.

Member Function Documentation

◆ onMouseLeftPressed()

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

A function managing the left click pressed of a mouse. Setting polygon points.

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 26 of file IntelliToolPolygon.cpp.

◆ onMouseLeftReleased()

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

A function managing the left click released of a mouse. Merging the fill 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 91 of file IntelliToolPolygon.cpp.

◆ onMouseMoved()

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

A function managing the mouse moved event.

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 137 of file IntelliToolPolygon.cpp.

◆ onMouseRightPressed()

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

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

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 83 of file IntelliToolPolygon.cpp.

◆ onMouseRightReleased()

void IntelliToolPolygon::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 124 of file IntelliToolPolygon.cpp.

◆ onWheelScrolled()

void IntelliToolPolygon::onWheelScrolled ( int  value)
overridevirtual

A function managing the scroll event. CHanging the lineWidth relative to value.

Parameters
value- The absolute the scroll has changed.

Reimplemented from IntelliTool.

Definition at line 128 of file IntelliToolPolygon.cpp.


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