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

0001 /*
0002  *  SPDX-FileCopyrightText: 2008, 2010 Lukáš Tvrdý <lukast.dev@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #include <kis_curve_paintop_settings_widget.h>
0007 #include <kis_properties_configuration.h>
0008 #include <kis_curve_paintop_settings.h>
0009 
0010 #include <KisPaintingModeOptionWidget.h>
0011 #include <KisCurveOpOptionWidget.h>
0012 #include <KisPaintOpOptionWidgetUtils.h>
0013 #include <KisCompositeOpOptionWidget.h>
0014 #include <KisStandardOptionData.h>
0015 #include <KisCurveStandardOptionData.h>
0016 
0017 KisCurvePaintOpSettingsWidget:: KisCurvePaintOpSettingsWidget(QWidget* parent)
0018     : KisPaintOpSettingsWidget(parent)
0019 {
0020     namespace kpowu = KisPaintOpOptionWidgetUtils;
0021 
0022     addPaintOpOption(kpowu::createOptionWidget<KisCurveOpOptionWidget>());
0023     addPaintOpOption(kpowu::createOpacityOptionWidget());
0024     addPaintOpOption(kpowu::createCurveOptionWidget(KisLineWidthOptionData(), KisPaintOpOption::GENERAL, i18n("0%"), i18n("100%")));
0025     addPaintOpOption(kpowu::createCurveOptionWidget(KisCurvesOpacityOptionData(), KisPaintOpOption::GENERAL, i18n("0%"), i18n("100%")));
0026     addPaintOpOption(kpowu::createOptionWidget<KisCompositeOpOptionWidget>());
0027     addPaintOpOption(kpowu::createOptionWidget<KisPaintingModeOptionWidget>());
0028 }
0029 
0030 KisCurvePaintOpSettingsWidget::~ KisCurvePaintOpSettingsWidget()
0031 {
0032 }
0033 
0034 
0035 KisPropertiesConfigurationSP  KisCurvePaintOpSettingsWidget::configuration() const
0036 {
0037     KisCurvePaintOpSettings* config = new KisCurvePaintOpSettings(resourcesInterface());
0038     config->setProperty("paintop", "curvebrush"); // XXX: make this a const id string
0039     writeConfiguration(config);
0040     return config;
0041 }
0042