From 61fdc099ecf8a5e1e0ffc63d68a4d32d762781d5 Mon Sep 17 00:00:00 2001 From: Conrad Date: Mon, 27 Jan 2020 19:08:44 +0100 Subject: [PATCH 01/16] Updated CPPCheck Errors --- cppcheck_config.txt | 14 +++++++++++++- cppcheck_errors.txt | 34 +++++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/cppcheck_config.txt b/cppcheck_config.txt index 008b5ba..450c488 100644 --- a/cppcheck_config.txt +++ b/cppcheck_config.txt @@ -226,7 +226,10 @@ src/Layer/PaintingArea.cpp:18:0: information: Include file: "Tool/IntelliToolFlo src/Layer/PaintingArea.cpp:19:0: information: Include file: "Tool/IntelliToolPolygon.h" not found. [missingInclude] ^ -src/Layer/PaintingArea.cpp:20:0: information: Include file: "GUI/IntelliPhotoGui.h" not found. [missingInclude] +src/Layer/PaintingArea.cpp:20:0: information: Include file: "Tool/IntelliToolGradient.h" not found. [missingInclude] + +^ +src/Layer/PaintingArea.cpp:21:0: information: Include file: "GUI/IntelliPhotoGui.h" not found. [missingInclude] ^ src/Tool/IntelliTool.h:4:0: information: Include file: "IntelliHelper/IntelliColorPicker.h" not found. [missingInclude] @@ -276,6 +279,15 @@ src/Tool/IntelliToolFloodFill.cpp:5:0: information: Include file: n ^ src/Tool/IntelliToolFloodFill.cpp:6:0: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem] +^ +src/Tool/IntelliToolGradient.cpp:2:0: information: Include file: "Layer/PaintingArea.h" not found. [missingInclude] + +^ +src/Tool/IntelliToolGradient.cpp:3:0: information: Include file: "math.h" not found. [missingInclude] + +^ +src/Tool/IntelliToolGradient.cpp:4:0: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem] + ^ src/Tool/IntelliToolLine.h:5:0: information: Include file: "QPoint" not found. [missingInclude] diff --git a/cppcheck_errors.txt b/cppcheck_errors.txt index 3e6f39d..dc71700 100644 --- a/cppcheck_errors.txt +++ b/cppcheck_errors.txt @@ -7,21 +7,33 @@ src/IntelliHelper/IntelliDatamanager.cpp:66:53: note: Shadowed declaration src/IntelliHelper/IntelliDatamanager.cpp:89:33: note: Shadow variable int red, green, blue, alpha; ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::image' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::image' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::width' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::width' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::height' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::height' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::widthOffset' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::widthOffset' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ -src/Layer/PaintingArea.cpp:22:14: warning: Member variable 'LayerObject::heightOffset' is not initialized in the constructor. [uninitMemberVar] +src/Layer/PaintingArea.cpp:23:14: warning: Member variable 'LayerObject::heightOffset' is not initialized in the constructor. [uninitMemberVar] LayerObject::LayerObject(){ ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::doubleA' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::VectorAB' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::NormalVector' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ +src/Tool/IntelliToolGradient.cpp:6:22: warning: Member variable 'IntelliToolGradient::NormalDotNormal' is not initialized in the constructor. [uninitMemberVar] +IntelliToolGradient::IntelliToolGradient(PaintingArea* Area, IntelliColorPicker* colorPicker, IntelliToolsettings* Toolsettings) + ^ src/tst_unittest.cpp:1370:0: style: The function 'bench_Circle_fullDraw' is never used. [unusedFunction] ^ @@ -142,22 +154,22 @@ src/tst_unittest.cpp:1138:0: style: The function 'bench_setPolygon' is never use src/mainUnitTest.cpp:118:0: style: The function 'cleanupTestCase' is never used. [unusedFunction] ^ -src/GUI/IntelliPhotoGui.cpp:27:0: style: The function 'closeEvent' is never used. [unusedFunction] +src/GUI/IntelliPhotoGui.cpp:28:0: style: The function 'closeEvent' is never used. [unusedFunction] ^ src/mainUnitTest.cpp:113:0: style: The function 'initTestCase' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:324:0: style: The function 'mouseMoveEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:329:0: style: The function 'mouseMoveEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:305:0: style: The function 'mousePressEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:310:0: style: The function 'mousePressEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:337:0: style: The function 'mouseReleaseEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:342:0: style: The function 'mouseReleaseEvent' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:367:0: style: The function 'paintEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:372:0: style: The function 'paintEvent' is never used. [unusedFunction] ^ src/Layer/PaintingArea.cpp:223:0: style: The function 'slotActivateLayer' is never used. [unusedFunction] @@ -316,7 +328,7 @@ src/mainUnitTest.cpp:146:0: style: The function 'test_setLayerUp' is never used. src/mainUnitTest.cpp:144:0: style: The function 'test_setPolygon' is never used. [unusedFunction] ^ -src/Layer/PaintingArea.cpp:352:0: style: The function 'wheelEvent' is never used. [unusedFunction] +src/Layer/PaintingArea.cpp:357:0: style: The function 'wheelEvent' is never used. [unusedFunction] ^ nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude] From 9c8378194d752a728079f13b4c807dc5ca77f9ce Mon Sep 17 00:00:00 2001 From: Conrad Date: Tue, 28 Jan 2020 11:44:09 +0100 Subject: [PATCH 02/16] 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 03/16] 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 04/16] 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 05/16] 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())); From faec9a7f5eb771ce7a010a3540e5562b66312905 Mon Sep 17 00:00:00 2001 From: Paul Norberger Date: Tue, 28 Jan 2020 21:51:38 +0100 Subject: [PATCH 06/16] Add gradient tool icon --- src/icons/gradient-tool.svg | 135 ++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 src/icons/gradient-tool.svg diff --git a/src/icons/gradient-tool.svg b/src/icons/gradient-tool.svg new file mode 100644 index 0000000..8953735 --- /dev/null +++ b/src/icons/gradient-tool.svg @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + From 7bf881225078d35bbcdabfdf0a6f8fdea16f606a Mon Sep 17 00:00:00 2001 From: Paul Norberger Date: Tue, 28 Jan 2020 21:52:03 +0100 Subject: [PATCH 07/16] Remove icon folder in docs folder --- docs/Icons/circle-tool.svg | 94 ---------------- docs/Icons/eraser-tool.svg | 109 ------------------ docs/Icons/flood-fill-tool.svg | 194 --------------------------------- docs/Icons/line-tool.svg | 99 ----------------- docs/Icons/magic-wand-tool.svg | 169 ---------------------------- docs/Icons/pen-tool.svg | 105 ------------------ docs/Icons/plain-tool.svg | 125 --------------------- docs/Icons/polygon-tool.svg | 117 -------------------- docs/Icons/rectangle-tool.svg | 101 ----------------- 9 files changed, 1113 deletions(-) delete mode 100644 docs/Icons/circle-tool.svg delete mode 100644 docs/Icons/eraser-tool.svg delete mode 100644 docs/Icons/flood-fill-tool.svg delete mode 100644 docs/Icons/line-tool.svg delete mode 100644 docs/Icons/magic-wand-tool.svg delete mode 100644 docs/Icons/pen-tool.svg delete mode 100644 docs/Icons/plain-tool.svg delete mode 100644 docs/Icons/polygon-tool.svg delete mode 100644 docs/Icons/rectangle-tool.svg diff --git a/docs/Icons/circle-tool.svg b/docs/Icons/circle-tool.svg deleted file mode 100644 index a6cc0e4..0000000 --- a/docs/Icons/circle-tool.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/docs/Icons/eraser-tool.svg b/docs/Icons/eraser-tool.svg deleted file mode 100644 index cdc518d..0000000 --- a/docs/Icons/eraser-tool.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/docs/Icons/flood-fill-tool.svg b/docs/Icons/flood-fill-tool.svg deleted file mode 100644 index 980bb7a..0000000 --- a/docs/Icons/flood-fill-tool.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/line-tool.svg b/docs/Icons/line-tool.svg deleted file mode 100644 index 6ff03e8..0000000 --- a/docs/Icons/line-tool.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/Icons/magic-wand-tool.svg b/docs/Icons/magic-wand-tool.svg deleted file mode 100644 index 71f019d..0000000 --- a/docs/Icons/magic-wand-tool.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/pen-tool.svg b/docs/Icons/pen-tool.svg deleted file mode 100644 index 5dd9782..0000000 --- a/docs/Icons/pen-tool.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/docs/Icons/plain-tool.svg b/docs/Icons/plain-tool.svg deleted file mode 100644 index 6dee885..0000000 --- a/docs/Icons/plain-tool.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/docs/Icons/polygon-tool.svg b/docs/Icons/polygon-tool.svg deleted file mode 100644 index 7602729..0000000 --- a/docs/Icons/polygon-tool.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/docs/Icons/rectangle-tool.svg b/docs/Icons/rectangle-tool.svg deleted file mode 100644 index 3056a02..0000000 --- a/docs/Icons/rectangle-tool.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - From 7fb268dfa80cb6701d1dd079368532bcf0153f2a Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 09:47:10 +0100 Subject: [PATCH 08/16] Unified Naming in Menubar --- src/GUI/IntelliPhotoGui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index 5b85dd9..8ebcae0 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -421,7 +421,7 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateNewShapedLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewShapedLayer())); // Delete New Layer action and tie to IntelliPhotoGui::deleteLayer() - actionDeleteLayer = new QAction(tr("&Delete Layer..."), this); + actionDeleteLayer = new QAction(tr("&Delete Layer"), this); actionDeleteLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_D)); connect(actionDeleteLayer, SIGNAL(triggered()), this, SLOT(slotDeleteLayer())); @@ -438,7 +438,7 @@ void IntelliPhotoGui::createActions(){ 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())); @@ -606,7 +606,7 @@ void IntelliPhotoGui::createMenus(){ renderMenu->addAction(actionUpdateRenderSettingsOff); //Attach all Layer Creations to Menu - layerCreationMenu = new QMenu(tr("&Create new Layer"), this); + layerCreationMenu = new QMenu(tr("&Create New Layer"), this); layerCreationMenu->addAction(actionCreateNewRasterLayer); layerCreationMenu->addAction(actionCreateNewShapedLayer); From 48ea8f14f03c32f62935d5870649973768c369b9 Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 09:54:34 +0100 Subject: [PATCH 09/16] Added Shortcut for Gradient Tool - Added Shortcut for Gradient Tool - Moved Color Menu To Bar --- src/GUI/IntelliPhotoGui.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index 8ebcae0..26ef973 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -529,6 +529,7 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateFloodFillTool, SIGNAL(triggered()), this, SLOT(slotCreateFloodFillTool())); actionCreateGradientTool = new QAction(tr("&Gradient"),this); + actionCreateGradientTool->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::SHIFT + Qt::Key_G)); connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotResetTools())); connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); @@ -600,12 +601,12 @@ void IntelliPhotoGui::createMenus(){ fileMenu->addSeparator(); fileMenu->addAction(actionExit); - //Attach all actions to Render Settings + // Attach all actions to Render Settings renderMenu = new QMenu(tr("&Fast Renderer"), this); renderMenu->addAction(actionUpdateRenderSettingsOn); renderMenu->addAction(actionUpdateRenderSettingsOff); - //Attach all Layer Creations to Menu + // Attach all Layer Creations to Menu layerCreationMenu = new QMenu(tr("&Create New Layer"), this); layerCreationMenu->addAction(actionCreateNewRasterLayer); layerCreationMenu->addAction(actionCreateNewShapedLayer); @@ -627,14 +628,14 @@ void IntelliPhotoGui::createMenus(){ layerMenu->addSeparator(); layerMenu->addAction(actionDeleteLayer); - //Attach all Color Options + // Attach all Color Options colorMenu = new QMenu(tr("&Color"), this); colorMenu->addAction(actionColorPickerFirstColor); colorMenu->addAction(actionColorPickerSecondColor); colorMenu->addAction(actionColorSwap); - //Attach all Tool Creation Actions - toolCreationMenu = new QMenu(tr("&Drawingtools"), this); + // Attach all Tool Creation Actions + toolCreationMenu = new QMenu(tr("&Tool Selection"), this); toolCreationMenu->addAction(actionCreateCircleTool); toolCreationMenu->addAction(actionCreateFloodFillTool); toolCreationMenu->addAction(actionCreateGradientTool); @@ -644,17 +645,15 @@ void IntelliPhotoGui::createMenus(){ toolCreationMenu->addAction(actionCreatePolygonTool); toolCreationMenu->addAction(actionCreateRectangleTool); - //Attach all Tool Setting Actions - toolSettingsMenu = new QMenu(tr("&Toolsettings"), this); + // Attach all Tool Setting Actions + toolSettingsMenu = new QMenu(tr("&Tool Settings"), this); toolSettingsMenu->addAction(actionSetWidth); toolSettingsMenu->addAction(actionSetInnerAlpha); - //Attach all Tool Options + // Attach all Tool Options toolMenu = new QMenu(tr("&Tools"), this); toolMenu->addMenu(toolCreationMenu); - toolMenu->addMenu(toolSettingsMenu); - toolMenu->addSeparator(); - toolMenu->addMenu(colorMenu); + toolMenu->addMenu(toolSettingsMenu); // Attach all actions to Options optionMenu = new QMenu(tr("&Options"), this); @@ -674,6 +673,7 @@ void IntelliPhotoGui::createMenus(){ menuBar()->addMenu(optionMenu); menuBar()->addMenu(layerMenu); menuBar()->addMenu(toolMenu); + menuBar()->addMenu(colorMenu); menuBar()->addMenu(helpMenu); } From 6dbc23c0ae03ff5c767e719e4d45eb38b87d20d0 Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 09:59:39 +0100 Subject: [PATCH 10/16] Renamed History Tool Labels For Conventions --- 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 26ef973..5c7eaea 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -578,11 +578,11 @@ void IntelliPhotoGui::createActions(){ actionSetInnerAlpha->setShortcut(QKeySequence(Qt::ALT + Qt::Key_A)); connect(actionSetInnerAlpha, SIGNAL(triggered()), this, SLOT(slotSetInnerAlpha())); - actionGoBack = new QAction(tr("&Go back"),this); + actionGoBack = new QAction(tr("&Undo"),this); actionGoBack->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z)); connect(actionGoBack, SIGNAL(triggered()), this, SLOT(slotGoBack())); - actionGoForward = new QAction(tr("&Go forward"),this); + actionGoForward = new QAction(tr("&Redo"),this); actionGoForward->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Y)); connect(actionGoForward, SIGNAL(triggered()), this, SLOT(slotGoForward())); } From 6ac4e4783ae7d4436ba808389665426bb12f9146 Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 10:04:05 +0100 Subject: [PATCH 11/16] Removed Shortcuts From Trivial Options --- src/GUI/IntelliPhotoGui.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index 5c7eaea..09d4840 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -534,13 +534,11 @@ void IntelliPhotoGui::createActions(){ connect(actionCreateGradientTool, SIGNAL(triggered()), this, SLOT(slotCreateGradientTool())); // Create about action and tie to IntelliPhotoGui::about() - actionAboutDialog = new QAction(tr("&About"), this); - actionAboutDialog->setShortcut(Qt::Key_F2); + actionAboutDialog = new QAction(tr("&About"), this); connect(actionAboutDialog, SIGNAL(triggered()), this, SLOT(slotAboutDialog())); // Create about Qt action and tie to IntelliPhotoGui::aboutQt() - actionAboutQtDialog = new QAction(tr("About &Qt"), this); - actionAboutQtDialog->setShortcut(Qt::Key_F3); + actionAboutQtDialog = new QAction(tr("About &Qt"), this); connect(actionAboutQtDialog, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(EditLineWidth, SIGNAL(returnPressed()), this, SLOT(slotEnterPressed())); @@ -607,7 +605,7 @@ void IntelliPhotoGui::createMenus(){ renderMenu->addAction(actionUpdateRenderSettingsOff); // Attach all Layer Creations to Menu - layerCreationMenu = new QMenu(tr("&Create New Layer"), this); + layerCreationMenu = new QMenu(tr("&Create Layer"), this); layerCreationMenu->addAction(actionCreateNewRasterLayer); layerCreationMenu->addAction(actionCreateNewShapedLayer); From c8812a8c00bfe0a7645d17e9ffffdc500fc9c20c Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 10:04:40 +0100 Subject: [PATCH 12/16] Updated Polygon Label --- 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 09d4840..e1b3fd4 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -438,7 +438,7 @@ void IntelliPhotoGui::createActions(){ 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 Polygon Data"), this); actionSetPolygon->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_P)); connect(actionSetPolygon, SIGNAL(triggered()), this, SLOT(slotSetPolygon())); From fd1849475586c5fd83816897a0f0bcd75dcb0ecf Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 29 Jan 2020 10:28:25 +0100 Subject: [PATCH 13/16] Bumped Version --- conf/intelliphoto_dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/intelliphoto_dox b/conf/intelliphoto_dox index 8c10cda..c1d0642 100644 --- a/conf/intelliphoto_dox +++ b/conf/intelliphoto_dox @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = IntelliPhoto -PROJECT_NUMBER = 0.6 +PROJECT_NUMBER = 0.7 PROJECT_BRIEF = PROJECT_LOGO = OUTPUT_DIRECTORY = docs From 2b553f5f4159b35db500197d634864a932d2426a Mon Sep 17 00:00:00 2001 From: AshBastian Date: Wed, 29 Jan 2020 13:21:34 +0100 Subject: [PATCH 14/16] =?UTF-8?q?Icon=20Gradient=20eingef=C3=BCgt=20in=20G?= =?UTF-8?q?UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Bilder.qrc | 1 + src/GUI/IntelliPhotoGui.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bilder.qrc b/src/Bilder.qrc index 01e8468..f2c6dfa 100644 --- a/src/Bilder.qrc +++ b/src/Bilder.qrc @@ -10,5 +10,6 @@ icons/line-tool.svg icons/flood-fill-tool.svg icons/plain-tool.svg + icons/gradient-tool.svg diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index d3ab832..cd15dcf 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -705,7 +705,7 @@ void IntelliPhotoGui::createGui(){ FloodFillButton->setIconSize(Buttonsize); FloodFillButton->setCheckable(true); - preview = QPixmap(":/Icons/Buttons/icons/icon.png"); + preview = QPixmap(":/Icons/Buttons/icons/gradient-tool.svg"); GradientButton = new QPushButton(); GradientButton->setFixedSize(Buttonsize); GradientButton->setIcon(preview); From a9435e6d5664f78f81797fa325be1ccaeb8ce2b4 Mon Sep 17 00:00:00 2001 From: AshBastian Date: Wed, 29 Jan 2020 13:35:54 +0100 Subject: [PATCH 15/16] First Change Buttonsize --- src/GUI/IntelliPhotoGui.cpp | 7 +++++++ src/GUI/IntelliPhotoGui.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index e1b3fd4..787c9a8 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -7,6 +7,8 @@ #include #include #include +#include +#include // IntelliPhotoGui constructor IntelliPhotoGui::IntelliPhotoGui(){ @@ -689,6 +691,11 @@ void IntelliPhotoGui::createGui(){ paintingArea = new PaintingArea(1280, 720); paintingArea->guiReference = this; + QScreen *screen = QGuiApplication::primaryScreen(); + QRect screenGeometry = screen->geometry(); + Buttonsize.setWidth(screenGeometry.width()/10); + Buttonsize.setHeight(screenGeometry.height()/10); + preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg"); CircleButton = new QPushButton(); CircleButton->setFixedSize(Buttonsize); diff --git a/src/GUI/IntelliPhotoGui.h b/src/GUI/IntelliPhotoGui.h index 25f6145..aeb2ede 100644 --- a/src/GUI/IntelliPhotoGui.h +++ b/src/GUI/IntelliPhotoGui.h @@ -124,7 +124,7 @@ PaintingArea* paintingArea; QPixmap preview; //size of all buttons -const QSize Buttonsize = QSize(35,35); +QSize Buttonsize; //buttons used for gui QPushButton* CircleButton; From fe9f4263f98ac5cabc058ab13c511320a9fe48e9 Mon Sep 17 00:00:00 2001 From: AshBastian Date: Wed, 29 Jan 2020 13:47:52 +0100 Subject: [PATCH 16/16] =?UTF-8?q?Button=20Size=20an=20Destopaufl=C3=B6sung?= =?UTF-8?q?=20gekoppelt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GUI/IntelliPhotoGui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index b0e9137..b0c4de6 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -332,6 +332,7 @@ void IntelliPhotoGui::slotEnterPressed(){ void IntelliPhotoGui::slotResetTools(){ CircleButton->setChecked(false); FloodFillButton->setChecked(false); + GradientButton->setChecked(false); LineButton->setChecked(false); PenButton->setChecked(false); PlainButton->setChecked(false); @@ -693,8 +694,8 @@ void IntelliPhotoGui::createGui(){ QScreen *screen = QGuiApplication::primaryScreen(); QRect screenGeometry = screen->geometry(); - Buttonsize.setWidth(screenGeometry.width()/10); - Buttonsize.setHeight(screenGeometry.height()/10); + Buttonsize.setWidth(screenGeometry.width()/20); + Buttonsize.setHeight(screenGeometry.height()/20); preview = QPixmap(":/Icons/Buttons/icons/circle-tool.svg"); CircleButton = new QPushButton();