ui changes

This commit is contained in:
Sonaion
2019-12-12 14:08:11 +01:00
parent de30640a1a
commit c58e8fcb6f
6 changed files with 16 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ IntelliPhotoGui::IntelliPhotoGui()
setIntelliStyle(); setIntelliStyle();
// Size the app // Size the app
resize(500, 500); showMaximized();
} }

View File

@@ -5,7 +5,7 @@
#include<QDebug> #include<QDebug>
IntelliShapedImage::IntelliShapedImage(int weight, int height) IntelliShapedImage::IntelliShapedImage(int weight, int height)
:IntelliImage(weight, height){ :IntelliRasterImage(weight, height){
} }
IntelliShapedImage::~IntelliShapedImage(){ IntelliShapedImage::~IntelliShapedImage(){

View File

@@ -1,9 +1,9 @@
#ifndef INTELLISHAPE_H #ifndef INTELLISHAPE_H
#define INTELLISHAPE_H #define INTELLISHAPE_H
#include"Image/IntelliImage.h" #include"Image/IntelliRasterImage.h"
class IntelliShapedImage : public IntelliImage{ class IntelliShapedImage : public IntelliRasterImage{
friend IntelliTool; friend IntelliTool;
protected: protected:

View File

@@ -40,8 +40,15 @@ void IntelliToolLine::onMouseMoved(int x, int y){
this->Canvas->image->drawPlain(Qt::transparent); this->Canvas->image->drawPlain(Qt::transparent);
QPoint next(x,y); QPoint next(x,y);
switch(lineStyle){ switch(lineStyle){
case LineStyle::SOLID_LINE : case LineStyle::SOLID_LINE:
this->Canvas->image->drawLine(start,next,colorPicker->getFirstColor(),lineWidth); this->Canvas->image->drawLine(start,next,colorPicker->getFirstColor(),lineWidth);
break;
case LineStyle::DOTTED_LINE:
QPoint p1 =start.x() <= next.x() ? start : next;
QPoint p2 =start.x() < next.x() ? next : start;
int m = (float)(p2.y()-p1.y())/(float)(p2.x()-p1.x())+0.5f;
int c = start.y()-start.x()*m;
break; break;
} }
} }

View File

@@ -6,7 +6,8 @@
#include "QPoint" #include "QPoint"
enum class LineStyle{ enum class LineStyle{
SOLID_LINE SOLID_LINE,
DOTTED_LINE
}; };
class IntelliToolLine : public IntelliTool class IntelliToolLine : public IntelliTool

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>360</width>
<height>600</height> <height>206</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">