Commit 76e15750 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Rename KisAirbrushOption to KisAirbrushOptionWidget

This makes clear that this class is a widget and cannot be created
during painting. Now we'll have to split the widget part and the
settings part up. We probably should rename all classes that inherit
KisPaintOpOption like this, to make the difference clear between
the KisPaintOpOption hierarchy. the KisBaseOption hierarchy and the
KisCurveOption hierarchy.

CCMAIL:allen.marshall.22@gmail.com
CCBUG:392190
parent 174ac1e8
......@@ -31,7 +31,7 @@
#include <kis_pressure_scatter_option_widget.h>
#include <kis_pressure_opacity_option.h>
#include <kis_pressure_gradient_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_compositeop_option.h>
#include <kis_pressure_spacing_option_widget.h>
#include "kis_texture_option.h"
......
......@@ -75,7 +75,7 @@ KisBrushOp::KisBrushOp(const KisPaintOpSettingsSP settings, KisPainter *painter,
*/
m_brush->setThreadingAllowed(false);
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
m_opacityOption.readOptionSetting(settings);
m_flowOption.readOptionSetting(settings);
......@@ -167,7 +167,7 @@ KisSpacingInformation KisBrushOp::paintAt(const KisPaintInformation& info)
KisSpacingInformation spacingInfo =
effectiveSpacing(scale, rotation, &m_airbrushOption, &m_spacingOption, info);
effectiveSpacing(scale, rotation, &m_airbrushOptionWidget, &m_spacingOption, info);
// gather statistics about dabs
m_avgSpacing(spacingInfo.scalarApprox());
......@@ -392,12 +392,12 @@ KisSpacingInformation KisBrushOp::updateSpacingImpl(const KisPaintInformation &i
{
const qreal scale = m_sizeOption.apply(info) * KisLodTransform::lodToScale(painter()->device());
qreal rotation = m_rotationOption.apply(info);
return effectiveSpacing(scale, rotation, &m_airbrushOption, &m_spacingOption, info);
return effectiveSpacing(scale, rotation, &m_airbrushOptionWidget, &m_spacingOption, info);
}
KisTimingInformation KisBrushOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
void KisBrushOp::paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, KisDistanceInformation *currentDistance)
......
......@@ -24,7 +24,7 @@
#define KIS_BRUSHOP_H_
#include "kis_brush_based_paintop.h"
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_flow_opacity_option.h>
#include <kis_pressure_size_option.h>
#include <kis_pressure_ratio_option.h>
......@@ -78,7 +78,7 @@ protected:
private:
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisPressureSizeOption m_sizeOption;
KisPressureRatioOption m_ratioOption;
KisPressureSpacingOption m_spacingOption;
......
......@@ -32,7 +32,7 @@
#include <kis_pressure_mix_option.h>
#include <kis_curve_option_widget.h>
#include <kis_pressure_hsv_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_scatter_option_widget.h>
#include <kis_pressure_softness_option.h>
#include <kis_pressure_sharpness_option_widget.h>
......@@ -78,7 +78,7 @@ KisBrushOpSettingsWidget::KisBrushOpSettingsWidget(QWidget* parent)
addPaintOpOption(new KisCurveOptionWidget(KisPressureHSVOption::createHueOption(), KisPressureHSVOption::hueMinLabel(), KisPressureHSVOption::huemaxLabel()), i18n("Hue"));
addPaintOpOption(new KisCurveOptionWidget(KisPressureHSVOption::createSaturationOption(), KisPressureHSVOption::saturationMinLabel(), KisPressureHSVOption::saturationmaxLabel()), i18n("Saturation"));
addPaintOpOption(new KisCurveOptionWidget(KisPressureHSVOption::createValueOption(), KisPressureHSVOption::valueMinLabel(), KisPressureHSVOption::valuemaxLabel()), i18n("Value"));
addPaintOpOption(new KisAirbrushOption(false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"), i18n("100%")), i18n("Rate"));
......
......@@ -58,7 +58,7 @@ KisDeformPaintOp::KisDeformPaintOp(const KisPaintOpSettingsSP settings, KisPaint
m_sizeProperties.readOptionSetting(settings);
m_properties.readOptionSetting(settings);
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
// sensors
m_sizeOption.readOptionSetting(settings);
......@@ -151,10 +151,10 @@ KisSpacingInformation KisDeformPaintOp::updateSpacingImpl(const KisPaintInformat
return KisPaintOpPluginUtils::effectiveSpacing(1.0, 1.0, true, 0.0, false, m_spacing, false,
1.0,
KisLodTransform::lodToScale(painter()->device()),
&m_airbrushOption, nullptr, info);
&m_airbrushOptionWidget, nullptr, info);
}
KisTimingInformation KisDeformPaintOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
......@@ -22,7 +22,7 @@
#include <brushengine/kis_paintop.h>
#include <kis_types.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_size_option.h>
#include <kis_pressure_opacity_option.h>
#include <kis_pressure_rotation_option.h>
......@@ -58,7 +58,7 @@ private:
DeformOption m_properties;
BrushSizeOption m_sizeProperties;
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisPressureSizeOption m_sizeOption;
KisPressureOpacityOption m_opacityOption;
......
......@@ -21,7 +21,7 @@
#include <kis_brush_size_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_deform_option.h>
struct KisDeformPaintOpSettings::Private
......
......@@ -27,7 +27,7 @@
#include <kis_pressure_size_option.h>
#include <kis_pressure_rate_option.h>
#include <kis_curve_option_widget.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_compositeop_option.h>
KisDeformPaintOpSettingsWidget::KisDeformPaintOpSettingsWidget(QWidget* parent)
......@@ -43,7 +43,7 @@ KisDeformPaintOpSettingsWidget::KisDeformPaintOpSettingsWidget(QWidget* parent)
addPaintOpOption(new KisCurveOptionWidget(new KisPressureOpacityOption(), i18n("Transparent"), i18n("Opaque")), i18n("Opacity"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureSizeOption(), i18n("0%"), i18n("100%")), i18n("Size"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRotationOption(), i18n("-180°"), i18n("180°")), i18n("Rotation"));
addPaintOpOption(new KisAirbrushOption(false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"), i18n("100%")), i18n("Rate"));
}
......
set(kritalibpaintop_LIB_SRCS
kis_airbrush_option.cpp
kis_airbrush_option_widget.cpp
kis_auto_brush_widget.cpp
kis_spacing_selection_widget.cpp
kis_bidirectional_mixing_option.cpp
......
......@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_airbrush_option.h"
#include "kis_airbrush_option_widget.h"
#include "kis_paintop_settings.h"
#include <klocalizedstring.h>
......@@ -48,7 +48,7 @@ public:
}
};
struct KisAirbrushOption::Private {
struct KisAirbrushOptionWidget::Private {
public:
bool ignoreSpacing;
// We store the airbrush interval (in milliseconds) instead of the rate because the interval is
......@@ -57,7 +57,7 @@ public:
QScopedPointer<KisAirbrushWidget> configPage;
};
KisAirbrushOption::KisAirbrushOption(bool enabled, bool canIgnoreSpacing)
KisAirbrushOptionWidget::KisAirbrushOptionWidget(bool enabled, bool canIgnoreSpacing)
: KisPaintOpOption(KisPaintOpOption::COLOR, enabled)
, m_d(new Private())
{
......@@ -76,12 +76,12 @@ KisAirbrushOption::KisAirbrushOption(bool enabled, bool canIgnoreSpacing)
updateInterval();
}
KisAirbrushOption::~KisAirbrushOption()
KisAirbrushOptionWidget::~KisAirbrushOptionWidget()
{
delete m_d;
}
void KisAirbrushOption::writeOptionSetting(KisPropertiesConfigurationSP setting) const
void KisAirbrushOptionWidget::writeOptionSetting(KisPropertiesConfigurationSP setting) const
{
KIS_SAFE_ASSERT_RECOVER (m_d->airbrushInterval > 0.0) {
m_d->airbrushInterval = 1.0;
......@@ -91,7 +91,7 @@ void KisAirbrushOption::writeOptionSetting(KisPropertiesConfigurationSP setting)
setting->setProperty(AIRBRUSH_IGNORE_SPACING, m_d->ignoreSpacing);
}
void KisAirbrushOption::readOptionSetting(const KisPropertiesConfigurationSP setting)
void KisAirbrushOptionWidget::readOptionSetting(const KisPropertiesConfigurationSP setting)
{
setChecked(setting->getBool(AIRBRUSH_ENABLED));
// Update settings in the widget. The widget's signals should cause the changes to be propagated
......@@ -101,29 +101,29 @@ void KisAirbrushOption::readOptionSetting(const KisPropertiesConfigurationSP set
false));
}
qreal KisAirbrushOption::airbrushInterval() const
qreal KisAirbrushOptionWidget::airbrushInterval() const
{
return m_d->airbrushInterval;
}
bool KisAirbrushOption::ignoreSpacing() const
bool KisAirbrushOptionWidget::ignoreSpacing() const
{
return m_d->ignoreSpacing;
}
void KisAirbrushOption::slotIntervalChanged()
void KisAirbrushOptionWidget::slotIntervalChanged()
{
updateInterval();
emitSettingChanged();
}
void KisAirbrushOption::slotIgnoreSpacingChanged()
void KisAirbrushOptionWidget::slotIgnoreSpacingChanged()
{
updateIgnoreSpacing();
emitSettingChanged();
}
void KisAirbrushOption::updateInterval()
void KisAirbrushOptionWidget::updateInterval()
{
// Get rate in dabs per second, then convert to interval in milliseconds.
qreal rate = m_d->configPage->sliderRate->value();
......@@ -133,7 +133,7 @@ void KisAirbrushOption::updateInterval()
m_d->airbrushInterval = 1000.0 / rate;
}
void KisAirbrushOption::updateIgnoreSpacing()
void KisAirbrushOptionWidget::updateIgnoreSpacing()
{
m_d->ignoreSpacing = m_d->configPage->checkBoxIgnoreSpacing->isChecked();
}
......@@ -25,13 +25,13 @@
* Allows the user to activate airbrushing of the brush mask (brush is painted at the same position over and over)
* Rate is set in milliseconds.
*/
class PAINTOP_EXPORT KisAirbrushOption : public KisPaintOpOption
class PAINTOP_EXPORT KisAirbrushOptionWidget : public KisPaintOpOption
{
Q_OBJECT
public:
KisAirbrushOption(bool enabled = true, bool canIgnoreSpacing = true);
~KisAirbrushOption() override;
KisAirbrushOptionWidget(bool enabled = true, bool canIgnoreSpacing = true);
~KisAirbrushOptionWidget() override;
void writeOptionSetting(KisPropertiesConfigurationSP setting) const override;
void readOptionSetting(const KisPropertiesConfigurationSP setting) override;
......
......@@ -136,7 +136,7 @@ KisSpacingInformation KisBrushBasedPaintOp::effectiveSpacing(qreal scale, qreal
}
KisSpacingInformation KisBrushBasedPaintOp::effectiveSpacing(qreal scale, qreal rotation,
const KisAirbrushOption *airbrushOption,
const KisAirbrushOptionWidget *airbrushOption,
const KisPressureSpacingOption *spacingOption,
const KisPaintInformation &pi) const
{
......
......@@ -24,7 +24,7 @@
#include "kis_brush.h"
#include "kis_texture_option.h"
#include "kis_precision_option.h"
#include "kis_airbrush_option.h"
#include "kis_airbrush_option_widget.h"
#include "kis_pressure_mirror_option.h"
#include <kis_threaded_text_rendering_workaround.h>
......@@ -73,7 +73,7 @@ public:
KisSpacingInformation effectiveSpacing(qreal scale, qreal rotation, const KisPressureSpacingOption &spacingOption, const KisPaintInformation &pi) const;
KisSpacingInformation effectiveSpacing(qreal scale,
qreal rotation,
const KisAirbrushOption *airbrushOption,
const KisAirbrushOptionWidget *airbrushOption,
const KisPressureSpacingOption *spacingOption,
const KisPaintInformation &pi) const;
......
......@@ -19,7 +19,7 @@
#include "kis_brush_based_paintop_settings.h"
#include <kis_paint_action_type_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include "kis_brush_based_paintop_options_widget.h"
#include <kis_boundary.h>
#include "kis_brush_server.h"
......
......@@ -22,7 +22,7 @@
#include "kis_paint_information.h"
#include "kis_paintop_utils.h"
#include "kis_paintop_settings.h"
#include "kis_airbrush_option.h"
#include "kis_airbrush_option_widget.h"
#include "kis_pressure_spacing_option.h"
#include "kis_pressure_rate_option.h"
......@@ -47,7 +47,7 @@ KisSpacingInformation effectiveSpacing(qreal dabWidth,
bool autoSpacingActive,
qreal autoSpacingCoeff,
qreal lodScale,
const KisAirbrushOption *airbrushOption,
const KisAirbrushOptionWidget *airbrushOption,
const KisPressureSpacingOption *spacingOption,
const KisPaintInformation &pi)
{
......@@ -77,7 +77,7 @@ KisSpacingInformation effectiveSpacing(qreal dabWidth,
* @param rateOption - The pressure-curve airbrush rate option. Can be null for paintops that don't
* support a pressure-based airbrush rate.
*/
KisTimingInformation effectiveTiming(const KisAirbrushOption *airbrushOption,
KisTimingInformation effectiveTiming(const KisAirbrushOptionWidget *airbrushOption,
const KisPressureRateOption *rateOption,
const KisPaintInformation &pi)
{
......
......@@ -56,7 +56,7 @@ KisParticlePaintOp::KisParticlePaintOp(const KisPaintOpSettingsSP settings, KisP
m_particleBrush.setProperties(&m_properties);
m_particleBrush.initParticles();
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
m_rateOption.readOptionSetting(settings);
m_rateOption.resetAllSensors();
......@@ -78,12 +78,12 @@ KisSpacingInformation KisParticlePaintOp::updateSpacingImpl(const KisPaintInform
{
return KisPaintOpPluginUtils::effectiveSpacing(0.0, 0.0, true, 0.0, false, 0.0, false, 0.0,
KisLodTransform::lodToScale(painter()->device()),
&m_airbrushOption, nullptr, info);
&m_airbrushOptionWidget, nullptr, info);
}
KisTimingInformation KisParticlePaintOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
void KisParticlePaintOp::paintLine(const KisPaintInformation &pi1, const KisPaintInformation &pi2,
......
......@@ -21,7 +21,7 @@
#include <brushengine/kis_paintop.h>
#include <kis_types.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_rate_option.h>
#include "kis_particle_paintop_settings.h"
......@@ -54,7 +54,7 @@ private:
KisParticleBrushProperties m_properties;
KisPaintDeviceSP m_dab;
ParticleBrush m_particleBrush;
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisPressureRateOption m_rateOption;
bool m_first;
};
......
......@@ -21,7 +21,7 @@
#include "kis_particleop_option.h"
#include <kis_paint_action_type_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
struct KisParticlePaintOpSettings::Private
{
......
......@@ -24,7 +24,7 @@
#include <kis_paintop_settings_widget.h>
#include <kis_curve_option_widget.h>
#include <kis_paint_action_type_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_compositeop_option.h>
#include <kis_pressure_rate_option.h>
......@@ -36,7 +36,7 @@ KisParticlePaintOpSettingsWidget:: KisParticlePaintOpSettingsWidget(QWidget* par
addPaintOpOption(m_particleOption, i18n("Brush size"));
addPaintOpOption(new KisCompositeOpOption(true), i18n("Blending Mode"));
addPaintOpOption(new KisAirbrushOption(false, false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false, false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"),
i18n("100%")), i18n("Rate"));
addPaintOpOption(m_paintActionTypeOption, i18n("Painting Mode"));
......
......@@ -69,7 +69,7 @@ KisSketchPaintOp::KisSketchPaintOp(const KisPaintOpSettingsSP settings, KisPaint
Q_UNUSED(image);
Q_UNUSED(node);
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
m_opacityOption.readOptionSetting(settings);
m_sizeOption.readOptionSetting(settings);
m_rotationOption.readOptionSetting(settings);
......@@ -316,10 +316,10 @@ KisSpacingInformation KisSketchPaintOp::updateSpacingImpl(const KisPaintInformat
{
return KisPaintOpPluginUtils::effectiveSpacing(0.0, 0.0, true, 0.0, false, 0.0, false, 0.0,
KisLodTransform::lodToScale(painter()->device()),
&m_airbrushOption, nullptr, info);
&m_airbrushOptionWidget, nullptr, info);
}
KisTimingInformation KisSketchPaintOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
......@@ -27,7 +27,7 @@
#include "kis_sketch_paintop_settings.h"
#include "kis_painter.h"
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_size_option.h>
#include <kis_brush_option.h>
#include <kis_pressure_rotation_option.h>
......@@ -74,7 +74,7 @@ private:
KisDensityOption m_densityOption;
KisLineWidthOption m_lineWidthOption;
KisOffsetScaleOption m_offsetScaleOption;
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisBrushOption m_brushOption;
SketchProperties m_sketchProperties;
......
......@@ -21,7 +21,7 @@
#include <kis_sketchop_option.h>
#include <kis_paint_action_type_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include "kis_current_outline_fetcher.h"
......
......@@ -25,7 +25,7 @@
#include <kis_pressure_opacity_option.h>
#include <kis_paintop_settings_widget.h>
#include <kis_paint_action_type_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_size_option.h>
#include <kis_pressure_rate_option.h>
#include <kis_compositeop_option.h>
......@@ -50,7 +50,7 @@ KisSketchPaintOpSettingsWidget::KisSketchPaintOpSettingsWidget(QWidget* parent)
addPaintOpOption(new KisCurveOptionWidget(new KisLineWidthOption() , i18n("0%"), i18n("100%")), i18n("Line width"));
addPaintOpOption(new KisCurveOptionWidget(new KisOffsetScaleOption(), i18n("0%"), i18n("100%")), i18n("Offset scale"));
addPaintOpOption(new KisCurveOptionWidget(new KisDensityOption(), i18n("0%"), i18n("100%")), i18n("Density"));
addPaintOpOption(new KisAirbrushOption(false, false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false, false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"), i18n("100%")), i18n("Rate"));
m_paintActionType = new KisPaintActionTypeOption();
......
......@@ -50,7 +50,7 @@ KisSprayPaintOp::KisSprayPaintOp(const KisPaintOpSettingsSP settings, KisPainter
Q_ASSERT(painter);
Q_UNUSED(image);
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
m_rotationOption.readOptionSetting(settings);
m_opacityOption.readOptionSetting(settings);
......@@ -141,7 +141,7 @@ KisSpacingInformation KisSprayPaintOp::updateSpacingImpl(const KisPaintInformati
KisTimingInformation KisSprayPaintOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
KisSpacingInformation KisSprayPaintOp::computeSpacing(const KisPaintInformation &info,
......@@ -149,5 +149,5 @@ KisSpacingInformation KisSprayPaintOp::computeSpacing(const KisPaintInformation
{
return KisPaintOpPluginUtils::effectiveSpacing(1.0, 1.0, true, 0.0, false,
m_spacing * lodScale, false, 1.0, lodScale,
&m_airbrushOption, nullptr, info);
&m_airbrushOptionWidget, nullptr, info);
}
......@@ -25,7 +25,7 @@
#include "spray_brush.h"
#include "kis_spray_paintop_settings.h"
#include "kis_brush_option.h"
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_rotation_option.h>
#include <kis_pressure_opacity_option.h>
#include <kis_pressure_size_option.h>
......@@ -64,7 +64,7 @@ private:
SprayBrush m_sprayBrush;
qreal m_xSpacing, m_ySpacing, m_spacing;
bool m_isPresetValid;
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisPressureRotationOption m_rotationOption;
KisPressureSizeOption m_sizeOption;
KisPressureOpacityOption m_opacityOption;
......
......@@ -24,7 +24,7 @@
#include "kis_spray_paintop_settings.h"
#include "kis_sprayop_option.h"
#include "kis_spray_shape_option.h"
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
struct KisSprayPaintOpSettings::Private
{
......
......@@ -32,7 +32,7 @@
#include <kis_curve_option_widget.h>
#include <kis_brush_option_widget.h>
#include "kis_spray_shape_dynamics.h"
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_compositeop_option.h>
KisSprayPaintOpSettingsWidget:: KisSprayPaintOpSettingsWidget(QWidget* parent)
......@@ -50,7 +50,7 @@ KisSprayPaintOpSettingsWidget:: KisSprayPaintOpSettingsWidget(QWidget* parent)
addPaintOpOption(new KisColorOption(), i18n("Color options"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRotationOption(), i18n("-180°"), i18n("180°")), i18n("Rotation"));
addPaintOpOption(new KisAirbrushOption(false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"), i18n("100%")), i18n("Rate"));
addPaintOpOption(new KisPaintActionTypeOption(), i18n("Painting Mode"));
}
......
......@@ -43,7 +43,7 @@ KisTangentNormalPaintOp::KisTangentNormalPaintOp(const KisPaintOpSettingsSP sett
Q_UNUSED(image);
//Init, read settings, etc//
m_tangentTiltOption.readOptionSetting(settings);
m_airbrushOption.readOptionSetting(settings);
m_airbrushOptionWidget.readOptionSetting(settings);
m_sizeOption.readOptionSetting(settings);
m_opacityOption.readOptionSetting(settings);
m_flowOption.readOptionSetting(settings);
......@@ -180,13 +180,13 @@ KisSpacingInformation KisTangentNormalPaintOp::updateSpacingImpl(const KisPaintI
KisTimingInformation KisTangentNormalPaintOp::updateTimingImpl(const KisPaintInformation &info) const
{
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOption, &m_rateOption, info);
return KisPaintOpPluginUtils::effectiveTiming(&m_airbrushOptionWidget, &m_rateOption, info);
}
KisSpacingInformation KisTangentNormalPaintOp::computeSpacing(const KisPaintInformation &info,
qreal scale, qreal rotation) const
{
return effectiveSpacing(scale, rotation, &m_airbrushOption, &m_spacingOption, info);
return effectiveSpacing(scale, rotation, &m_airbrushOptionWidget, &m_spacingOption, info);
}
void KisTangentNormalPaintOp::paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, KisDistanceInformation *currentDistance)
......
......@@ -26,7 +26,7 @@
#include <kis_pressure_size_option.h>
#include <kis_tangent_tilt_option.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_flow_opacity_option.h>
#include <kis_pressure_spacing_option.h>
#include <kis_pressure_rate_option.h>
......@@ -71,7 +71,7 @@ private:
KisPressureRotationOption m_rotationOption;
KisPressureScatterOption m_scatterOption;
KisTangentTiltOption m_tangentTiltOption;
KisAirbrushOption m_airbrushOption;
KisAirbrushOptionWidget m_airbrushOptionWidget;
KisPressureSoftnessOption m_softnessOption;
KisPressureSharpnessOption m_sharpnessOption;
KisPressureFlowOption m_flowOption;
......
......@@ -32,7 +32,7 @@
#include <kis_curve_option_widget.h>
#include <kis_pressure_softness_option.h>
#include <kis_pressure_sharpness_option_widget.h>
#include <kis_airbrush_option.h>
#include <kis_airbrush_option_widget.h>
#include <kis_pressure_flow_opacity_option_widget.h>
#include <kis_pressure_spacing_option_widget.h>
#include <kis_pressure_rate_option.h>
......@@ -64,7 +64,7 @@ KisTangentNormalPaintOpSettingsWidget::KisTangentNormalPaintOpSettingsWidget(QWi
addPaintOpOption(new KisPressureSharpnessOptionWidget(), i18n("Sharpness"));
addPaintOpOption(new KisPressureScatterOptionWidget(), i18n("Scatter"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRotationOption(), i18n("-180°"), i18n("180°")), i18n("Rotation"));
addPaintOpOption(new KisAirbrushOption(false), i18n("Airbrush"));
addPaintOpOption(new KisAirbrushOptionWidget(false), i18n("Airbrush"));
addPaintOpOption(new KisCurveOptionWidget(new KisPressureRateOption(), i18n("0%"), i18n("100%")), i18n("Rate"));
addPaintOpOption(new KisPaintActionTypeOption(), i18n("Painting Mode"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment