Automated Release Preparation

This commit is contained in:
Jan Schuffenhauer
2020-01-16 12:52:25 +01:00
parent d60796ccae
commit b055c0b922
90 changed files with 722 additions and 741 deletions

View File

@@ -1,8 +1,8 @@
#include "IntelliColorPicker.h"
IntelliColorPicker::IntelliColorPicker(){
firstColor = {255,0,0,255};
secondColor = {0,255,255,255};
firstColor = QColor(255,0,0,255);
secondColor = QColor(0,255,255,255);
}
IntelliColorPicker::~IntelliColorPicker(){

View File

@@ -113,7 +113,7 @@ std::vector<Triangle> IntelliTriangulation::calculateTriangles(std::vector<QPoin
return Triangles;
}
bool IntelliTriangulation::isInPolygon(std::vector<Triangle> &triangles, QPoint &point){
bool IntelliTriangulation::isInPolygon(const std::vector<Triangle> &triangles, QPoint &point){
for(auto triangle : triangles) {
if(IntelliTriangulation::isInTriangle(triangle, point)) {
return true;

View File

@@ -60,7 +60,7 @@ std::vector<Triangle> calculateTriangles(std::vector<QPoint> polyPoints);
* \param point - The point to checl, if it lies in the polygon.
* \return Returns true if the point lies in the üpolygon, otherwise false.
*/
bool isInPolygon(std::vector<Triangle> &triangles, QPoint &point);
bool isInPolygon(const std::vector<Triangle> &triangles, QPoint &point);
}
#endif

View File

@@ -330,28 +330,17 @@ void PaintingArea::paintEvent(QPaintEvent*event){
update();
}
//TODOJ Resize the image to slightly larger then the main window
// to cut down on the need to resize the image
void PaintingArea::resizeEvent(QResizeEvent*event){
//TODO wait till tool works
update();
}
void PaintingArea::resizeLayer(QImage*image_res, const QSize &newSize){
//TODO implement
}
void PaintingArea::selectLayerUp(){
updateTools();
if(activeLayer!=-1 && static_cast<unsigned long long>(activeLayer)<layerBundle.size() - 1) {
std::swap(layerBundle[static_cast<unsigned long long>(activeLayer)], layerBundle[static_cast<unsigned long long>(activeLayer + 1)]);
if(activeLayer != -1 && static_cast<size_t>(activeLayer)<layerBundle.size() - 1) {
std::swap(layerBundle[static_cast<size_t>(activeLayer)], layerBundle[static_cast<size_t>(activeLayer + 1)]);
activeLayer++;
}
}
void PaintingArea::selectLayerDown(){
updateTools();
if(activeLayer!=-1 && activeLayer>0) {
if(activeLayer>0) {
std::swap(layerBundle[static_cast<unsigned long long>(activeLayer)], layerBundle[static_cast<unsigned long long>(activeLayer - 1)]);
activeLayer--;
}

View File

@@ -221,8 +221,6 @@ void wheelEvent(QWheelEvent*event) override;
void paintEvent(QPaintEvent*event) override;
void resizeEvent(QResizeEvent*event) override;
private:
void setLayerDimensions(int maxWidth, int maxHeight);
void selectLayerUp();
@@ -244,8 +242,6 @@ int activeLayer = -1;
void drawLayers(bool forSaving = false);
void resizeLayer(QImage*image_res, const QSize &newSize);
bool createTempTopLayer(int idx);
void updateTools();

View File

@@ -6,6 +6,9 @@ IntelliTool::IntelliTool(PaintingArea* Area, IntelliColorPicker* colorPicker, In
this->colorPicker = colorPicker;
this->Toolsettings = Toolsettings;
this->isDrawing = false;
this->ActiveType = Tooltype::NONE;
this->activeLayer = nullptr;
this->Canvas = nullptr;
}
IntelliTool::~IntelliTool(){
@@ -14,7 +17,7 @@ IntelliTool::~IntelliTool(){
void IntelliTool::onMouseRightPressed(int x, int y){
if(isDrawing) {
isDrawing = false;
isDrawing = false;
this->deleteToolLayer();
}
}

View File

@@ -24,7 +24,8 @@ enum class Tooltype {
PEN,
PLAIN,
POLYGON,
RECTANGLE
RECTANGLE,
NONE
};
private:
/*!