File indexing completed on 2024-12-22 04:16:07

0001 /*
0002  *  SPDX-FileCopyrightText: 2008, 2009, 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #include "kis_deform_paintop_settings.h"
0007 #include "kis_deform_paintop_settings_widget.h"
0008 #include "KisDeformOptionWidget.h"
0009 
0010 #include <kis_paintop_settings_widget.h>
0011 #include "KisBrushSizeOptionWidget.h"
0012 
0013 #include <KisStandardOptionData.h>
0014 #include <KisSizeOptionWidget.h>
0015 #include <KisAirbrushOptionWidget.h>
0016 #include <KisPaintOpOptionWidgetUtils.h>
0017 #include <KisCompositeOpOptionWidget.h>
0018 
0019 KisDeformPaintOpSettingsWidget::KisDeformPaintOpSettingsWidget(QWidget* parent)
0020     : KisPaintOpSettingsWidget(parent)
0021 {
0022     namespace kpowu = KisPaintOpOptionWidgetUtils;
0023 
0024     addPaintOpOption(kpowu::createOptionWidget<KisBrushSizeOptionWidget>());
0025     addPaintOpOption(kpowu::createOptionWidgetWithLodLimitations<KisDeformOptionWidget>());
0026     addPaintOpOption(kpowu::createOptionWidget<KisCompositeOpOptionWidget>());
0027     addPaintOpOption(kpowu::createOpacityOptionWidget());
0028     addPaintOpOption(kpowu::createOptionWidget<KisSizeOptionWidget>());
0029     addPaintOpOption(kpowu::createRotationOptionWidget());
0030     addPaintOpOption(kpowu::createOptionWidget<KisAirbrushOptionWidget>());
0031     addPaintOpOption(kpowu::createRateOptionWidget());
0032 }
0033 
0034 KisDeformPaintOpSettingsWidget::~ KisDeformPaintOpSettingsWidget()
0035 {
0036 }
0037 
0038 
0039 KisPropertiesConfigurationSP KisDeformPaintOpSettingsWidget::configuration() const
0040 {
0041     KisDeformPaintOpSettings* config = new KisDeformPaintOpSettings(resourcesInterface());
0042     config->setProperty("paintop", "deformBrush");
0043     writeConfiguration(config);
0044     return config;
0045 }
0046