mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-13 11:50:31 +02:00
ui changes
This commit is contained in:
@@ -19,7 +19,7 @@ IntelliPhotoGui::IntelliPhotoGui()
|
||||
setIntelliStyle();
|
||||
|
||||
// Size the app
|
||||
resize(500, 500);
|
||||
showMaximized();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include<QDebug>
|
||||
|
||||
IntelliShapedImage::IntelliShapedImage(int weight, int height)
|
||||
:IntelliImage(weight, height){
|
||||
:IntelliRasterImage(weight, height){
|
||||
}
|
||||
|
||||
IntelliShapedImage::~IntelliShapedImage(){
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "QPoint"
|
||||
|
||||
enum class LineStyle{
|
||||
SOLID_LINE
|
||||
SOLID_LINE,
|
||||
DOTTED_LINE
|
||||
};
|
||||
|
||||
class IntelliToolLine : public IntelliTool
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user