From 9c8378194d752a728079f13b4c807dc5ca77f9ce Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 28 Jan 2020 11:44:09 +0100 Subject: [PATCH 1/4] New GUI Menu Bar Layout --- src/GUI/IntelliPhotoGui.cpp | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index d3ab832..acf8457 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -20,7 +20,7 @@ IntelliPhotoGui::IntelliPhotoGui(){ setIntelliStyle(); // Size the app resize(600,600); - showMaximized(); + showMaximized(); setDefaultValues(); } @@ -242,13 +242,13 @@ void IntelliPhotoGui::slotSetActiveLayer(){ void IntelliPhotoGui::slotUpdateRenderSettingsOn(){ paintingArea->setRenderSettings(true); - FastRendererLabel->setText("Fast Render: On"); + FastRendererLabel->setText("Fast Render: On"); UpdateGui(); } void IntelliPhotoGui::slotUpdateRenderSettingsOff(){ paintingArea->setRenderSettings(false); - FastRendererLabel->setText("Fast Render: Off"); + FastRendererLabel->setText("Fast Render: Off"); UpdateGui(); } @@ -303,8 +303,8 @@ void IntelliPhotoGui::slotCreateFloodFillTool(){ } void IntelliPhotoGui::slotCreateGradientTool(){ - GradientButton->setChecked(true); - paintingArea->createGradientTool(); + GradientButton->setChecked(true); + paintingArea->createGradientTool(); } // Open an about dialog @@ -528,9 +528,9 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotResetTools())); connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool())); - actionCreateGradientTool = new QAction(tr("&Gradient"),this); - connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools())); - connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); + actionCreateGradientTool = new QAction(tr("&Gradient"),this); + connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools())); + connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); // Create about action and tie to IntelliPhotoGui::about() actionAboutDialog = new QAction(tr("&About"), this); @@ -551,8 +551,8 @@ void IntelliPhotoGui::createActions(){ connect(FloodFillButton,SIGNAL(pressed()), this, SLOT(slotResetTools())); connect(FloodFillButton, SIGNAL(clicked()), this, SLOT(slotCreateFloodFillTool())); - connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools())); - connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool())); + connect(GradientButton, SIGNAL(pressed()), this, SLOT(slotResetTools())); + connect(GradientButton, SIGNAL(clicked()), this, SLOT(slotCreateGradientTool())); connect(LineButton,SIGNAL(pressed()), this, SLOT(slotResetTools())); connect(LineButton, SIGNAL(clicked()), this, SLOT(slotCreateLineTool())); @@ -636,8 +636,8 @@ void IntelliPhotoGui::createMenus(){ //Attach all Tool Creation Actions toolCreationMenu = new QMenu(tr("&Drawingtools"), this); toolCreationMenu->addAction(actionCreateCircleTool); - toolCreationMenu->addAction(actionCreateFloodFillTool); - toolCreationMenu->addAction(actionCreateGradientTool); + toolCreationMenu->addAction(actionCreateFloodFillTool); + toolCreationMenu->addAction(actionCreateGradientTool); toolCreationMenu->addAction(actionCreateLineTool); toolCreationMenu->addAction(actionCreatePenTool); toolCreationMenu->addAction(actionCreatePlainTool); @@ -659,8 +659,7 @@ void IntelliPhotoGui::createMenus(){ // Attach all actions to Options optionMenu = new QMenu(tr("&Options"), this); optionMenu->addAction(actionGoBack); - optionMenu->addAction(actionGoForward); - optionMenu->addMenu(layerMenu); + optionMenu->addAction(actionGoForward); optionMenu->addMenu(toolMenu); optionMenu->addSeparator(); optionMenu->addMenu(renderMenu); @@ -674,6 +673,7 @@ void IntelliPhotoGui::createMenus(){ // Add menu items to the menubar menuBar()->addMenu(fileMenu); menuBar()->addMenu(optionMenu); + menuBar()->addMenu(layerMenu); menuBar()->addMenu(helpMenu); } @@ -705,12 +705,12 @@ void IntelliPhotoGui::createGui(){ FloodFillButton->setIconSize(Buttonsize); FloodFillButton->setCheckable(true); - preview = QPixmap(":/Icons/Buttons/icons/icon.png"); - GradientButton = new QPushButton(); - GradientButton->setFixedSize(Buttonsize); - GradientButton->setIcon(preview); - GradientButton->setIconSize(Buttonsize); - GradientButton->setCheckable(true); + preview = QPixmap(":/Icons/Buttons/icons/icon.png"); + GradientButton = new QPushButton(); + GradientButton->setFixedSize(Buttonsize); + GradientButton->setIcon(preview); + GradientButton->setIconSize(Buttonsize); + GradientButton->setCheckable(true); preview = QPixmap(":/Icons/Buttons/icons/line-tool.svg"); LineButton = new QPushButton(); @@ -810,9 +810,9 @@ void IntelliPhotoGui::createGui(){ QString String = QString("%1x%2").arg(paintingArea->Canvas->width()).arg(paintingArea->Canvas->height()); dimCanvas->setText(String); - FastRendererLabel = new QLabel(); - FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3); - FastRendererLabel->setText("Fast Render: On"); + FastRendererLabel = new QLabel(); + FastRendererLabel->setFixedSize(Buttonsize.width() * 2 + 15,(Buttonsize.height() * 2) / 3); + FastRendererLabel->setText("Fast Render: On"); ScrollArea = new QScrollArea(this); ScrollArea->setBackgroundRole(QPalette::Dark); @@ -829,7 +829,7 @@ void IntelliPhotoGui::createGui(){ mainLayout->addWidget(PlainButton,3,2,1,1); mainLayout->addWidget(PolygonButton,3,3,1,1); mainLayout->addWidget(RectangleButton,4,2,1,1); - mainLayout->addWidget(GradientButton,4,3,1,1); + mainLayout->addWidget(GradientButton,4,3,1,1); mainLayout->addWidget(WidthLine,5,2,1,2); mainLayout->addWidget(EditLineWidth,6,2,1,2); mainLayout->addWidget(innerAlphaLine,7,2,1,2); @@ -841,7 +841,7 @@ void IntelliPhotoGui::createGui(){ mainLayout->addWidget(ActiveLayerImageLabel,12,2,1,2); mainLayout->addWidget(dimActive,13,2,1,2); mainLayout->addWidget(dimCanvas,14,2,1,2); - mainLayout->addWidget(FastRendererLabel,15,2,1,2); + mainLayout->addWidget(FastRendererLabel,15,2,1,2); mainLayout->setHorizontalSpacing(0); } From 8980571c1aed627000e844e3f55d453939d2b2c3 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 28 Jan 2020 11:48:22 +0100 Subject: [PATCH 2/4] Moved Tools to Menubar --- src/GUI/IntelliPhotoGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index acf8457..c80b15b 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -660,7 +660,6 @@ void IntelliPhotoGui::createMenus(){ optionMenu = new QMenu(tr("&Options"), this); optionMenu->addAction(actionGoBack); optionMenu->addAction(actionGoForward); - optionMenu->addMenu(toolMenu); optionMenu->addSeparator(); optionMenu->addMenu(renderMenu); optionMenu->addAction(actionChangeDim); @@ -674,6 +673,7 @@ void IntelliPhotoGui::createMenus(){ menuBar()->addMenu(fileMenu); menuBar()->addMenu(optionMenu); menuBar()->addMenu(layerMenu); + menuBar()->addMenu(toolMenu); menuBar()->addMenu(helpMenu); } From ed462e4feca291b188e0c38e04820af4689cf71b Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 28 Jan 2020 11:50:14 +0100 Subject: [PATCH 3/4] Unified Menu Bar Text --- src/GUI/IntelliPhotoGui.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index c80b15b..6d75ff4 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -430,39 +430,39 @@ void IntelliPhotoGui::createActions(){ connect(actionChangeDim, SIGNAL(triggered()), this, SLOT(slotChangeDim())); connect(dimCanvas, SIGNAL(clicked()), this, SLOT(slotChangeDim())); - actionSetActiveLayer = new QAction(tr("&set Active"), this); + actionSetActiveLayer = new QAction(tr("&Set Active"), this); actionSetActiveLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_A)); connect(actionSetActiveLayer, SIGNAL(triggered()), this, SLOT(slotSetActiveLayer())); - actionSetActiveAlpha = new QAction(tr("&set Alpha"), this); + actionSetActiveAlpha = new QAction(tr("&Set Alpha"), this); actionSetActiveAlpha->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_A)); connect(actionSetActiveAlpha, SIGNAL(triggered()), this, SLOT(slotSetActiveAlpha())); - actionSetPolygon = new QAction(tr("&set new Polygondata"), this); + actionSetPolygon = new QAction(tr("&Set new Polygondata"), this); actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P)); connect(actionSetPolygon, SIGNAL(triggered()), this, SLOT(slotSetPolygon())); - actionMovePositionUp = new QAction(tr("&move Up"), this); + actionMovePositionUp = new QAction(tr("&Move Up"), this); actionMovePositionUp->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Up)); connect(actionMovePositionUp, SIGNAL(triggered()), this, SLOT(slotPositionMoveUp())); - actionMovePositionDown = new QAction(tr("&move Down"), this); + actionMovePositionDown = new QAction(tr("&Move Down"), this); actionMovePositionDown->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Down)); connect(actionMovePositionDown, SIGNAL(triggered()), this, SLOT(slotPositionMoveDown())); - actionMovePositionLeft = new QAction(tr("&move Left"), this); + actionMovePositionLeft = new QAction(tr("&Move Left"), this); actionMovePositionLeft->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left)); connect(actionMovePositionLeft, SIGNAL(triggered()), this, SLOT(slotPositionMoveLeft())); - actionMovePositionRight = new QAction(tr("&move Right"), this); + actionMovePositionRight = new QAction(tr("&Move Right"), this); actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right)); connect(actionMovePositionRight, SIGNAL(triggered()), this, SLOT(slotPositionMoveRight())); - actionMoveLayerUp = new QAction(tr("&move Layer Up"), this); + actionMoveLayerUp = new QAction(tr("&Move Layer Up"), this); actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up)); connect(actionMoveLayerUp, SIGNAL(triggered()), this, SLOT(slotMoveLayerUp())); - actionMoveLayerDown = new QAction(tr("&move Layer Down"), this); + actionMoveLayerDown = new QAction(tr("&Move Layer Down"), this); actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down)); connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown())); From a7deccac6b45a6dc9ad32e36610ed6a875d19a95 Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 28 Jan 2020 12:33:05 +0100 Subject: [PATCH 4/4] Added Improved Z Labels --- src/GUI/IntelliPhotoGui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index 6d75ff4..5b85dd9 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -458,11 +458,11 @@ void IntelliPhotoGui::createActions(){ actionMovePositionRight->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right)); connect(actionMovePositionRight, SIGNAL(triggered()), this, SLOT(slotPositionMoveRight())); - actionMoveLayerUp = new QAction(tr("&Move Layer Up"), this); + actionMoveLayerUp = new QAction(tr("&Move Forth"), this); actionMoveLayerUp->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Up)); connect(actionMoveLayerUp, SIGNAL(triggered()), this, SLOT(slotMoveLayerUp())); - actionMoveLayerDown = new QAction(tr("&Move Layer Down"), this); + actionMoveLayerDown = new QAction(tr("&Move Back"), this); actionMoveLayerDown->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Down)); connect(actionMoveLayerDown, SIGNAL(triggered()), this, SLOT(slotMoveLayerDown()));