File indexing completed on 2024-12-22 04:16:59
0001 /* 0002 * tool_transform.cc -- Part of Krita 0003 * 0004 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt (boud@valdyas.org) 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #include "tool_transform.h" 0010 0011 #include <klocalizedstring.h> 0012 0013 #include <kis_debug.h> 0014 #include <kpluginfactory.h> 0015 0016 #include <kis_global.h> 0017 #include <kis_types.h> 0018 #include <KoToolRegistry.h> 0019 0020 0021 #include "kis_tool_transform.h" 0022 #include "kis_transform_mask_params_factory_registry.h" 0023 #include "kis_transform_mask_adapter.h" 0024 #include "KisAnimatedTransformMaskParamsHolder.h" 0025 0026 K_PLUGIN_FACTORY_WITH_JSON(ToolTransformFactory, "kritatooltransform.json", registerPlugin<ToolTransform>();) 0027 0028 namespace { 0029 0030 KisAnimatedTransformParamsHolderInterfaceSP createAnimatedParamsHolder(KisDefaultBoundsBaseSP defaultBounds) 0031 { 0032 return toQShared(new KisAnimatedTransformMaskParamsHolder(defaultBounds)); 0033 } 0034 0035 } // namespace 0036 0037 0038 0039 ToolTransform::ToolTransform(QObject *parent, const QVariantList &) 0040 : QObject(parent) 0041 { 0042 KoToolRegistry::instance()->add(new KisToolTransformFactory()); 0043 KisTransformMaskParamsFactoryRegistry::instance()->setAnimatedParamsHolderFactory(&createAnimatedParamsHolder); 0044 KisTransformMaskParamsFactoryRegistry::instance()->addFactory("tooltransformparams", &KisTransformMaskAdapter::fromXML); 0045 qRegisterMetaType<TransformTransactionProperties>("TransformTransactionProperties"); 0046 qRegisterMetaType<ToolTransformArgs>("ToolTransformArgs"); 0047 qRegisterMetaType<QPainterPath>("QPainterPath"); 0048 } 0049 0050 ToolTransform::~ToolTransform() 0051 { 0052 } 0053 0054 #include "tool_transform.moc"