diff --git a/plugins/tools/selectiontools/CMakeLists.txt b/plugins/tools/selectiontools/CMakeLists.txt index adad1e2025..e3628f3aa0 100644 --- a/plugins/tools/selectiontools/CMakeLists.txt +++ b/plugins/tools/selectiontools/CMakeLists.txt @@ -1,38 +1,40 @@ set(kritaselectiontools_SOURCES selection_tools.cc kis_tool_select_rectangular.cc kis_tool_select_polygonal.cc kis_tool_select_elliptical.cc kis_tool_select_contiguous.cc kis_tool_select_outline.cc kis_tool_select_path.cc kis_tool_select_similar.cc kis_selection_modifier_mapper.cc KisMagneticWorker.cc KisToolSelectMagnetic.cc - KisToolSelectGuided.cc kis_tool_select_guided_options_widget.cpp + KisToolSelectGuided.cc ) +ki18n_wrap_ui(kritaselectiontools_SOURCES kis_tool_select_guided_options_widget.ui) + qt5_add_resources(kritaselectiontools_SOURCES selectiontools.qrc) add_library(kritaselectiontools MODULE ${kritaselectiontools_SOURCES}) generate_export_header(kritaselectiontools BASE_NAME kritaselectiontools) target_link_libraries(kritaselectiontools kritaui kritabasicflakes kritaimage) install(TARGETS kritaselectiontools DESTINATION ${KRITA_PLUGIN_INSTALL_DIR}) install( FILES KisToolSelectPolygonal.action KisToolSelectElliptical.action KisToolSelectSimilar.action KisToolSelectContiguous.action KisToolSelectRectangular.action KisToolSelectOutline.action KisToolSelectPath.action KisToolSelectMagnetic.action KisToolSelectGuided.action DESTINATION ${DATA_INSTALL_DIR}/krita/actions ) diff --git a/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.cpp b/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.cpp index eaf65b7bad..135a3cc2b9 100644 --- a/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.cpp +++ b/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.cpp @@ -1,59 +1,58 @@ #include "kis_tool_select_guided_options_widget.h" - #include "ui_kis_tool_select_guided_options_widget.h" #include #include "KisPaletteModel.h" #include "kis_config.h" #include #include "kis_canvas_resource_provider.h" struct KisToolSelectGuidedOptionsWidget::Private { Private() { } Ui_KisToolSelectGuidedOptionsWidget *ui; int getKernelRadius(void) { return ui->kernel_radius->value(); } qreal getEpsilon(void) { return ui->epsilon->value(); } bool getSelectActive(void) { return ui->activate_selection_painting->value(); } }; KisToolSelectGuidedOptionsWidget::KisToolSelectGuidedOptionsWidget(KisCanvasResourceProvider */*provider*/, QWidget *parent) : QWidget(parent), m_d(new Private) { m_d->ui = new Ui_KisToolSelectGuidedOptionsWidget(); m_d->ui->setupUi(this); } KisToolSelectGuidedOptionsWidget::~KisToolSelectGuidedOptionsWidget() { } int KisToolSelectGuidedOptionsWidget::getKernelRadius() { return m_d->getKernelRadius(); } qreal KisToolSelectGuidedOptionsWidget::getEpsilon() { return m_d->getEpsilon(); } bool KisToolSelectGuidedOptionsWidget::getSelectActive() { return m_d->getSelectActive(); } diff --git a/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.h b/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.h index 07750aafcf..1ab1bb5f7d 100644 --- a/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.h +++ b/plugins/tools/selectiontools/kis_tool_select_guided_options_widget.h @@ -1,48 +1,30 @@ -/* - * Copyright (c) 2017 Eugene Ingerman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - #ifndef __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H #define __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H #include #include #include #include "kis_types.h" class KisCanvasResourceProvider; class KoColor; class KisToolSelectGuidedOptionsWidget : public QWidget { Q_OBJECT public: KisToolSelectGuidedOptionsWidget(KisCanvasResourceProvider *provider, QWidget *parent); ~KisToolSelectGuidedOptionsWidget() override; int getKernelRadius(void); qreal getEpsilon(void); bool getSelectActive(void); private: struct Private; const QScopedPointer m_d; }; #endif /* __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H */ diff --git a/plugins/tools/selectiontools/ui_kis_tool_select_guided_options_widget.h b/plugins/tools/selectiontools/ui_kis_tool_select_guided_options_widget.h deleted file mode 100644 index 1ab1bb5f7d..0000000000 --- a/plugins/tools/selectiontools/ui_kis_tool_select_guided_options_widget.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H -#define __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H - -#include -#include -#include - -#include "kis_types.h" - -class KisCanvasResourceProvider; -class KoColor; - - -class KisToolSelectGuidedOptionsWidget : public QWidget -{ - Q_OBJECT -public: - KisToolSelectGuidedOptionsWidget(KisCanvasResourceProvider *provider, QWidget *parent); - ~KisToolSelectGuidedOptionsWidget() override; - - int getKernelRadius(void); - qreal getEpsilon(void); - bool getSelectActive(void); - -private: - struct Private; - const QScopedPointer m_d; -}; - -#endif /* __KIS_TOOL_SELECT_GUIDED_OPTIONS_WIDGET_H */