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

@@ -195,7 +195,7 @@ void IntelliPhotoGui::slotSetActiveLayer(){
if (ok1)
{
paintingArea->setLayerToActive(layer);
}
}
}
void IntelliPhotoGui::slotSetFirstColor(){
@@ -203,7 +203,7 @@ void IntelliPhotoGui::slotSetFirstColor(){
}
void IntelliPhotoGui::slotSetSecondColor(){
paintingArea->colorPickerSetSecondColor();
paintingArea->colorPickerSetSecondColor();
}
void IntelliPhotoGui::slotSwitchColor(){
@@ -222,6 +222,22 @@ void IntelliPhotoGui::slotCreateLineTool(){
paintingArea->createLineTool();
}
void IntelliPhotoGui::slotCreateRectangleTool(){
paintingArea->createRectangleTool();
}
void IntelliPhotoGui::slotCreateCircleTool(){
paintingArea->createCircleTool();
}
void IntelliPhotoGui::slotCreatePolygonTool(){
paintingArea->createPolygonTool();
}
void IntelliPhotoGui::slotCreateFloodFillTool(){
paintingArea->createFloodFillTool();
}
// Open an about dialog
void IntelliPhotoGui::slotAboutDialog(){
// Window title and text to display
@@ -326,6 +342,18 @@ void IntelliPhotoGui::createActions(){
actionCreateLineTool = new QAction(tr("&Line"), this);
connect(actionCreateLineTool, SIGNAL(triggered()), this, SLOT(slotCreateLineTool()));
actionCreateCircleTool = new QAction(tr("&Circle"), this);
connect(actionCreateCircleTool, SIGNAL(triggered()), this, SLOT(slotCreateCircleTool()));
actionCreateRectangleTool = new QAction(tr("&Rectangle"), this);
connect(actionCreateRectangleTool, SIGNAL(triggered()), this, SLOT(slotCreateRectangleTool()));
actionCreatePolygonTool = new QAction(tr("&Polygon"), this);
connect(actionCreatePolygonTool, SIGNAL(triggered()), this, SLOT(slotCreatePolygonTool()));
actionCreateFloodFillTool = new QAction(tr("&FloodFill"), this);
connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool()));
// Create about action and tie to IntelliPhotoGui::about()
actionAboutDialog = new QAction(tr("&About"), this);
connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog()));
@@ -377,6 +405,10 @@ void IntelliPhotoGui::createMenus(){
toolMenu->addAction(actionCreatePenTool);
toolMenu->addAction(actionCreatePlainTool);
toolMenu->addAction(actionCreateLineTool);
toolMenu->addAction(actionCreateRectangleTool);
toolMenu->addAction(actionCreateCircleTool);
toolMenu->addAction(actionCreatePolygonTool);
toolMenu->addAction(actionCreateFloodFillTool);
toolMenu->addSeparator();
toolMenu->addMenu(colorMenu);