mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-12 19:40:28 +02:00
Abstract
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -311,8 +311,8 @@
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">IntelliPhoto</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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.DisplayName">IntelliPhoto2</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="uint" key="RunConfiguration.QmlDebugServerPort">3768</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.UseQmlDebuggerAuto">true</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>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
#include <QWidget>
|
||||
#include <QList>
|
||||
|
||||
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;
|
||||
|
||||
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