File indexing completed on 2025-01-26 04:10:27

0001 /*
0002  * modify_selection.cc -- Part of Krita
0003  *
0004  * SPDX-FileCopyrightText: 2006 Michael Thaler (michael.thaler@physik.tu-muenchen.de)
0005  *
0006  *  SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include "modify_selection.h"
0010 
0011 #include <klocalizedstring.h>
0012 #include <kis_debug.h>
0013 
0014 #include "kis_action.h"
0015 #include <kpluginfactory.h>
0016 #include <operations/kis_operation_ui_widget_factory.h>
0017 
0018 #include "dlg_grow_selection.h"
0019 #include "dlg_shrink_selection.h"
0020 #include "dlg_border_selection.h"
0021 #include "dlg_feather_selection.h"
0022 #include "modify_selection_operations.h"
0023 
0024 K_PLUGIN_FACTORY_WITH_JSON(ModifySelectionFactory, "kritamodifyselection.json", registerPlugin<ModifySelection>();)
0025 
0026 ModifySelection::ModifySelection(QObject *parent, const QVariantList &)
0027         : KisActionPlugin(parent)
0028 {
0029     KisAction* action = createAction("growselection");
0030     action->setOperationID("growselection");
0031 
0032     addUIFactory(new KisOperationUIWidgetFactory<WdgGrowSelection>("growselection"));
0033     addOperation(new GrowSelectionOperation);
0034 
0035     action = createAction("shrinkselection");
0036     action->setOperationID("shrinkselection");
0037 
0038     addUIFactory(new KisOperationUIWidgetFactory<WdgShrinkSelection>("shrinkselection"));
0039     addOperation(new ShrinkSelectionOperation);
0040 
0041     action = createAction("borderselection");
0042     action->setOperationID("borderselection");
0043 
0044     addUIFactory(new KisOperationUIWidgetFactory<WdgBorderSelection>("borderselection"));
0045     addOperation(new BorderSelectionOperation);
0046 
0047     action = createAction("featherselection");
0048     action->setOperationID("featherselection");
0049 
0050     addUIFactory(new KisOperationUIWidgetFactory<WdgFeatherSelection>("featherselection"));
0051     addOperation(new FeatherSelectionOperation);
0052 
0053     action = createAction("smoothselection");
0054     action->setOperationID("smoothselection");
0055 
0056     addOperation(new SmoothSelectionOperation);
0057 }
0058 
0059 ModifySelection::~ModifySelection()
0060 {
0061 }
0062 
0063 #include "modify_selection.moc"