mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 04:40:37 +02:00
ui changes
This commit is contained in:
@@ -19,7 +19,7 @@ IntelliPhotoGui::IntelliPhotoGui()
|
|||||||
setIntelliStyle();
|
setIntelliStyle();
|
||||||
|
|
||||||
// Size the app
|
// Size the app
|
||||||
resize(500, 500);
|
showMaximized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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(){
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user