diff --git a/src/Painting/IntelliPhoto.pro b/src/Painting/IntelliPhoto.pro index 3d35323..9d0ac01 100644 --- a/src/Painting/IntelliPhoto.pro +++ b/src/Painting/IntelliPhoto.pro @@ -30,7 +30,8 @@ HEADERS += \ Image/IntelliRasterImage.h \ Image/IntelliShapedImage.h \ IntelliHelper/IntelliHelper.h \ - Layer/PaintingArea.h + Layer/PaintingArea.h \ + Tool/IntelliTool.h FORMS += \ widget.ui diff --git a/src/Painting/IntelliPhoto.pro.user b/src/Painting/IntelliPhoto.pro.user index 1648662..d50df72 100644 --- a/src/Painting/IntelliPhoto.pro.user +++ b/src/Painting/IntelliPhoto.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -311,8 +311,8 @@ 2 IntelliPhoto - - Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Mienek/Documents/intelliphoto/src/Painting/IntelliPhoto.pro + IntelliPhoto2 + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/jonas/OneDrive/Documents/GitHub/intelliphoto/src/Painting/IntelliPhoto.pro 3768 false @@ -322,7 +322,7 @@ false true - C:/Users/Mienek/Documents/intelliphoto/src/build-IntelliPhoto-Desktop_Qt_5_12_5_MinGW_64_bit-Debug + C:/Users/Mienek/Documents/intelliphoto/src/build-IntelliPhoto-Desktop_Qt_5_12_5_MinGW_64_bit-Release 1 diff --git a/src/Painting/Layer/PaintingArea.h b/src/Painting/Layer/PaintingArea.h index 22eea17..febf33b 100644 --- a/src/Painting/Layer/PaintingArea.h +++ b/src/Painting/Layer/PaintingArea.h @@ -9,6 +9,15 @@ #include #include +struct LayerObject{ + IntelliImage* image; + int width; + int height; + int widthOffset; + int heightOffset; + int alpha=255; +}; + class PaintingArea : public QWidget { // Declares our class as a QObject which is the base class @@ -68,14 +77,7 @@ protected: void resizeEvent(QResizeEvent *event) override; private: - struct LayerObject{ - IntelliImage* image; - int width; - int height; - int widthOffset; - int heightOffset; - int alpha=255; - }; + QImage* Canvas; int maxWidth; diff --git a/src/Painting/Tool/IntelliTool.h b/src/Painting/Tool/IntelliTool.h new file mode 100644 index 0000000..b30b007 --- /dev/null +++ b/src/Painting/Tool/IntelliTool.h @@ -0,0 +1,18 @@ +#ifndef Intelli_Tool_H +#define Intelli_Tool_H + +#include"Layer/PaintingArea.h" + +class IntelliTool{ +private: + LayerObject* DataValue; + LayerObject* Preview; +public: + IntelliTool(LayerObject* DataValue, LayerObject* Preview); + virtual ~IntelliTool() = 0; + + virtual void onMousePressed(QMouseEvent *event) = 0; + virtual void onMouseMoved(QMouseEvent* event)=0; + virtual void onMouseReleased(QMouseEvent* event)=0; +}; +#endif