mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 20:30:32 +02:00
Abstract
This commit is contained in:
@@ -30,7 +30,8 @@ HEADERS += \
|
|||||||
Image/IntelliRasterImage.h \
|
Image/IntelliRasterImage.h \
|
||||||
Image/IntelliShapedImage.h \
|
Image/IntelliShapedImage.h \
|
||||||
IntelliHelper/IntelliHelper.h \
|
IntelliHelper/IntelliHelper.h \
|
||||||
Layer/PaintingArea.h
|
Layer/PaintingArea.h \
|
||||||
|
Tool/IntelliTool.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
widget.ui
|
widget.ui
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 4.10.2, 2019-12-06T07:45:13. -->
|
<!-- Written by QtCreator 4.10.2, 2019-12-06T09:19:45. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
@@ -311,8 +311,8 @@
|
|||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">IntelliPhoto</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">IntelliPhoto</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">IntelliPhoto2</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/Mienek/Documents/intelliphoto/src/Painting/IntelliPhoto.pro</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/jonas/OneDrive/Documents/GitHub/intelliphoto/src/Painting/IntelliPhoto.pro</value>
|
||||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/Mienek/Documents/intelliphoto/src/build-IntelliPhoto-Desktop_Qt_5_12_5_MinGW_64_bit-Debug</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/Mienek/Documents/intelliphoto/src/build-IntelliPhoto-Desktop_Qt_5_12_5_MinGW_64_bit-Release</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
|||||||
@@ -9,6 +9,15 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
|
||||||
|
struct LayerObject{
|
||||||
|
IntelliImage* image;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
int widthOffset;
|
||||||
|
int heightOffset;
|
||||||
|
int alpha=255;
|
||||||
|
};
|
||||||
|
|
||||||
class PaintingArea : public QWidget
|
class PaintingArea : public QWidget
|
||||||
{
|
{
|
||||||
// Declares our class as a QObject which is the base class
|
// Declares our class as a QObject which is the base class
|
||||||
@@ -68,14 +77,7 @@ protected:
|
|||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct LayerObject{
|
|
||||||
IntelliImage* image;
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int widthOffset;
|
|
||||||
int heightOffset;
|
|
||||||
int alpha=255;
|
|
||||||
};
|
|
||||||
|
|
||||||
QImage* Canvas;
|
QImage* Canvas;
|
||||||
int maxWidth;
|
int maxWidth;
|
||||||
|
|||||||
18
src/Painting/Tool/IntelliTool.h
Normal file
18
src/Painting/Tool/IntelliTool.h
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user