full doc tools

This commit is contained in:
Sonaion
2019-12-19 13:58:46 +01:00
parent 709c976cf0
commit 71dd9aa7c2
4 changed files with 45 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ public:
virtual ~IntelliToolPen() override;
/*!
* \brief A function managing the right click pressed of a mouse.Resetting the current draw.
* \brief A function managing the right click pressed of a mouse. Resetting the current draw.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/

View File

@@ -20,7 +20,7 @@ public:
virtual ~IntelliToolPlainTool() override;
/*!
* \brief A function managing the right click pressed of a mouse.Resetting the current fill.
* \brief A function managing the right click pressed of a mouse. Resetting the current fill.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/

View File

@@ -12,6 +12,10 @@ IntelliToolPolygon::IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* c
isDrawing = false;
}
IntelliToolPolygon::~IntelliToolPolygon(){
}
void IntelliToolPolygon::onMouseLeftPressed(int x, int y){
if(!isDrawing && x > 0 && y > 0 && x<Area->getWidthOfActive() && y<Area->getHeightOfActive()){
IntelliTool::onMouseLeftPressed(x,y);

View File

@@ -45,19 +45,55 @@ class IntelliToolPolygon : public IntelliTool
std::vector<QPoint> QPointList;
public:
/*!
* \brief IntelliToolPolygon Constructor Define the Tool-intern Parameters
* \param Area
* \param colorPicker
* \brief A constructor setting the general paintingArea and colorPicker.
* \param Area - The general paintingArea used by the project.
* \param colorPicker - The general colorPicker used by the project.
*/
IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker);
/*!
* \brief A Destructor.
*/
~IntelliToolPolygon() override;
/*!
* \brief A function managing the left click pressed of a mouse. Setting polygon points.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/
virtual void onMouseLeftPressed(int x, int y) override;
/*!
* \brief A function managing the left click released of a mouse. Merging the fill to the active layer.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/
virtual void onMouseLeftReleased(int x, int y) override;
/*!
* \brief A function managing the right click pressed of a mouse. Resetting the current fill.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/
virtual void onMouseRightPressed(int x, int y) override;
/*!
* \brief A function managing the right click released of a mouse.
* \param x - The x coordinate relative to the active/canvas layer.
* \param y - The y coordinate relative to the active/canvas layer.
*/
virtual void onMouseRightReleased(int x, int y) override;
/*!
* \brief A function managing the scroll event. CHanging the lineWidth relative to value.
* \param value - The absolute the scroll has changed.
*/
virtual void onWheelScrolled(int value) override;
/*!
* \brief A function managing the mouse moved event.
* \param x - The x coordinate of the new mouse position.
* \param y - The y coordinate of the new mouse position.
*/
virtual void onMouseMoved(int x, int y) override;