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();
// Size the app
resize(500, 500);
showMaximized();
}

View File

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

View File

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

View File

@@ -40,8 +40,15 @@ void IntelliToolLine::onMouseMoved(int x, int y){
this->Canvas->image->drawPlain(Qt::transparent);
QPoint next(x,y);
switch(lineStyle){
case LineStyle::SOLID_LINE :
case LineStyle::SOLID_LINE:
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;
}
}

View File

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

View File

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