From 8efe6836bfe2a9accca9f7258086f3d18a6baf46 Mon Sep 17 00:00:00 2001 From: Conrad Date: Fri, 20 Dec 2019 10:42:49 +0100 Subject: [PATCH] Reworked some method names --- src/GUI/IntelliPhotoGui.cpp | 4 ++-- src/Layer/PaintingArea.cpp | 6 +++--- src/Layer/PaintingArea.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/GUI/IntelliPhotoGui.cpp b/src/GUI/IntelliPhotoGui.cpp index a2b0206..b265400 100644 --- a/src/GUI/IntelliPhotoGui.cpp +++ b/src/GUI/IntelliPhotoGui.cpp @@ -120,7 +120,7 @@ void IntelliPhotoGui::slotSetActiveAlpha(){ 255,0, 255, 1, &ok2); if (ok1&&ok2) { - paintingArea->setAlphaOfLayer(layer,alpha); + paintingArea->setLayerAlpha(layer,alpha); } } @@ -194,7 +194,7 @@ void IntelliPhotoGui::slotSetActiveLayer(){ -1,0,255,1, &ok1); if (ok1) { - paintingArea->setLayerToActive(layer); + paintingArea->setLayerActive(layer); } } diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp index 29f1908..f4f92f9 100644 --- a/src/Layer/PaintingArea.cpp +++ b/src/Layer/PaintingArea.cpp @@ -86,13 +86,13 @@ void PaintingArea::slotDeleteActiveLayer(){ } } -void PaintingArea::setLayerToActive(int index){ +void PaintingArea::setLayerActive(int index){ if(index>=0&&index(layerBundle.size())) { this->activeLayer=index; } } -void PaintingArea::setAlphaOfLayer(int index, int alpha){ +void PaintingArea::setLayerAlpha(int index, int alpha){ if(index>=0&&index(layerBundle.size())) { layerBundle[static_cast(index)].alpha=alpha; } @@ -159,7 +159,7 @@ void PaintingArea::moveActiveLayer(int idx){ void PaintingArea::slotActivateLayer(int a){ if(a>=0 && a < static_cast(layerBundle.size())) { - this->setLayerToActive(a); + this->setLayerActive(a); } } diff --git a/src/Layer/PaintingArea.h b/src/Layer/PaintingArea.h index e271a8c..05267c8 100644 --- a/src/Layer/PaintingArea.h +++ b/src/Layer/PaintingArea.h @@ -100,13 +100,13 @@ public: * \brief The setLayerToActive method marks a specific layer as active * \param index - Index of the layer to be active */ - void setLayerToActive(int index); + void setLayerActive(int index); /*! * \brief The setAlphaOfLayer method sets the alpha value of a specific layer * \param index - Index of the layer where the change should be applied * \param alpha - New alpha value of the layer */ - void setAlphaOfLayer(int index, int alpha); + void setLayerAlpha(int index, int alpha); /*! * \brief The floodFill method fills a the active layer with a given color * \param r - Red value of the color the layer should be filled with