gui changes for tool anwendung

This commit is contained in:
Sonaion
2019-12-19 14:33:28 +01:00
parent 71dd9aa7c2
commit 9bc45dedfd
4 changed files with 66 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
PaintingArea::PaintingArea(int maxWidth, int maxHeight, QWidget *parent)
:QWidget(parent){
this->Tool = new IntelliToolPolygon(this, &colorPicker);
this->Tool = nullptr;
this->setUp(maxWidth, maxHeight);
this->addLayer(200,200,0,0,ImageType::Shaped_Image);
layerBundle[0].image->drawPlain(QColor(0,0,255,255));
@@ -192,6 +192,25 @@ void PaintingArea::createLineTool(){
Tool = new IntelliToolLine(this, &colorPicker);
}
void PaintingArea::createRectangleTool(){
delete this->Tool;
Tool = new IntelliToolRectangle(this, &colorPicker);
}
void PaintingArea::createCircleTool(){
delete this->Tool;
Tool = new IntelliToolCircle(this, &colorPicker);
}
void PaintingArea::createPolygonTool(){
delete this->Tool;
Tool = new IntelliToolPolygon(this, &colorPicker);
}
void PaintingArea::createFloodFillTool(){
delete this->Tool;
Tool = new IntelliToolFloodFill(this, &colorPicker);
}
int PaintingArea::getWidthOfActive(){
return this->layerBundle[activeLayer].width;
}

View File

@@ -55,6 +55,10 @@ public:
void createPenTool();
void createPlainTool();
void createLineTool();
void createRectangleTool();
void createCircleTool();
void createPolygonTool();
void createFloodFillTool();
int getWidthOfActive();
int getHeightOfActive();