Commit a479f67f authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix opacity setting shortcuts

We had a complete mess in how the signals inside paintop options
updated the UI. Setting controls in readOptionSetting caused emission
of signals and therefore consequent writeOptionSetting.

Now it is gone and startReadOptionSetting() blocks the update
signal and the settings are applied correctly.

BUG:340391
parent 4e58ae0b
......@@ -162,6 +162,35 @@ QSizeF KisPaintOpSettings::paintOpSize() const
return QSizeF(1.0, 1.0);
}
void KisPaintOpSettings::setPaintOpOpacity(qreal value)
{
setProperty("OpacityValue", value);
}
void KisPaintOpSettings::setPaintOpFlow(qreal value)
{
setProperty("FlowValue", value);
}
void KisPaintOpSettings::setPaintOpCompositeOp(const QString &value)
{
setProperty("CompositeOp", value);
}
qreal KisPaintOpSettings::paintOpOpacity() const
{
return getDouble("OpacityValue", 1.0);
}
qreal KisPaintOpSettings::paintOpFlow() const
{
return getDouble("FlowValue", 1.0);
}
QString KisPaintOpSettings::paintOpCompositeOp() const
{
return getString("CompositeOp", COMPOSITE_OVER);
}
QString KisPaintOpSettings::modelName() const
{
......
......@@ -162,6 +162,36 @@ public:
*/
virtual QSizeF paintOpSize() const;
/**
* Set paintop opacity directly in the properties
*/
void setPaintOpOpacity(qreal value);
/**
* Set paintop flow directly in the properties
*/
void setPaintOpFlow(qreal value);
/**
* Set paintop composite mode directly in the properties
*/
void setPaintOpCompositeOp(const QString &value);
/**
* @return opacity saved in the properties
*/
qreal paintOpOpacity() const;
/**
* @return flow saved in the properties
*/
qreal paintOpFlow() const;
/**
* @return composite mode saved in the properties
*/
QString paintOpCompositeOp() const;
void setPreset(KisPaintOpPresetWSP preset);
KisPaintOpPresetWSP preset() const;
......
......@@ -19,6 +19,8 @@
#ifndef __KIS_SIGNALS_BLOCKER_H
#define __KIS_SIGNALS_BLOCKER_H
#include <QVector>
/**
* Block QObject's signals in a safe and sane way.
*
......@@ -37,22 +39,59 @@
class KisSignalsBlocker
{
public:
/**
* Six should be enough for all usage cases! (c)
*/
KisSignalsBlocker(QObject *o1,
QObject *o2,
QObject *o3 = 0,
QObject *o4 = 0,
QObject *o5 = 0,
QObject *o6 = 0)
{
if (o1) addObject(o1);
if (o2) addObject(o2);
if (o3) addObject(o3);
if (o4) addObject(o4);
if (o5) addObject(o5);
if (o6) addObject(o6);
blockObjects();
}
KisSignalsBlocker(QObject *object)
: m_object(object)
{
m_object->blockSignals(true);
addObject(object);
blockObjects();
}
~KisSignalsBlocker()
{
m_object->blockSignals(false);
QVector<QObject*>::iterator it = m_objects.end();
QVector<QObject*>::iterator begin = m_objects.begin();
while (it != begin) {
--it;
(*it)->blockSignals(false);
}
}
private:
void blockObjects() {
foreach (QObject *object, m_objects) {
object->blockSignals(true);
}
}
inline void addObject(QObject *object) {
m_objects.append(object);
}
private:
Q_DISABLE_COPY(KisSignalsBlocker);
private:
QObject *m_object;
QVector<QObject*> m_objects;
};
#endif /* __KIS_SIGNALS_BLOCKER_H */
......@@ -41,10 +41,10 @@ KisChalkOpOption::KisChalkOpOption()
m_options->radiusSpinBox->setValue(5);
m_options->radiusSpinBox->setSuffix(" px");
connect(m_options->radiusSpinBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->inkDepletionCHBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->opacity, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->saturation, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->radiusSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->inkDepletionCHBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->opacity, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->saturation, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -28,6 +28,7 @@
#include "kis_smudge_option_widget.h"
#include "kis_smudge_option.h"
KisSmudgeOptionWidget::KisSmudgeOptionWidget(const QString& label, const QString& sliderLabel, const QString& name, bool checked):
KisCurveOptionWidget(new KisSmudgeOption(name, label, checked))
{
......@@ -57,7 +58,7 @@ KisSmudgeOptionWidget::KisSmudgeOptionWidget(const QString& label, const QString
void KisSmudgeOptionWidget::slotCurrentIndexChanged(int index)
{
static_cast<KisSmudgeOption*>(curveOption())->setMode((KisSmudgeOption::Mode)index);
emit sigSettingChanged();
emitSettingChanged();
}
void KisSmudgeOptionWidget::readOptionSetting(const KisPropertiesConfiguration* setting)
......@@ -65,8 +66,5 @@ void KisSmudgeOptionWidget::readOptionSetting(const KisPropertiesConfiguration*
KisCurveOptionWidget::readOptionSetting(setting);
KisSmudgeOption::Mode mode = static_cast<KisSmudgeOption*>(curveOption())->getMode();
mCbSmudgeMode->blockSignals(true);
mCbSmudgeMode->setCurrentIndex(mode == KisSmudgeOption::SMEARING_MODE ? 0 : 1);
mCbSmudgeMode->blockSignals(false);
}
......@@ -43,11 +43,11 @@ KisCurveOpOption::KisCurveOpOption()
m_checkable = false;
m_options = new KisCurveOpOptionsWidget();
connect(m_options->connectionCHBox, SIGNAL(toggled(bool)), this, SIGNAL(sigSettingChanged()));
connect(m_options->smoothingCHBox, SIGNAL(toggled(bool)), this, SIGNAL(sigSettingChanged()));
connect(m_options->historySizeSlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged()));
connect(m_options->lineWidthSlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged()));
connect(m_options->curvesOpacitySlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged()));
connect(m_options->connectionCHBox, SIGNAL(toggled(bool)), this, SLOT(emitSettingChanged()));
connect(m_options->smoothingCHBox, SIGNAL(toggled(bool)), this, SLOT(emitSettingChanged()));
connect(m_options->historySizeSlider, SIGNAL(valueChanged(qreal)), this, SLOT(emitSettingChanged()));
connect(m_options->lineWidthSlider, SIGNAL(valueChanged(qreal)), this, SLOT(emitSettingChanged()));
connect(m_options->curvesOpacitySlider, SIGNAL(valueChanged(qreal)), this, SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -47,10 +47,10 @@ KisDuplicateOpOption::KisDuplicateOpOption()
m_checkable = false;
m_optionWidget = new KisDuplicateOpOptionsWidget();
connect(m_optionWidget->cbHealing, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_optionWidget->cbPerspective, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_optionWidget->cbSourcePoint, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_optionWidget->chkCloneProjection, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_optionWidget->cbHealing, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_optionWidget->cbPerspective, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_optionWidget->cbSourcePoint, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_optionWidget->chkCloneProjection, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_optionWidget);
}
......@@ -114,7 +114,6 @@ void KisDuplicateOpOption::readOptionSetting(const KisPropertiesConfiguration* s
m_optionWidget->cbPerspective->setChecked(setting->getBool(DUPLICATE_CORRECT_PERSPECTIVE, false));
m_optionWidget->cbSourcePoint->setChecked(setting->getBool(DUPLICATE_MOVE_SOURCE_POINT, true));
m_optionWidget->chkCloneProjection->setChecked(setting->getBool(DUPLICATE_CLONE_FROM_PROJECTION, false));
emit sigSettingChanged();
}
void KisDuplicateOpOption::setImage(KisImageWSP image)
......
......@@ -36,19 +36,19 @@ KisDeformOption::KisDeformOption()
m_checkable = false;
m_options = new KisDeformOptionsWidget();
connect(m_options->deformAmount, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->interpolationChBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->useCounter, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->useOldData, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->deformAmount, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->interpolationChBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->useCounter, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->useOldData, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->growBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->shrinkBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->swirlCWBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->swirlCCWBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->moveBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->lensBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->lensOutBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->colorBtn, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->growBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->shrinkBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->swirlCWBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->swirlCCWBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->moveBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->lensBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->lensOutBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->colorBtn, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -48,21 +48,21 @@ KisDynaOpOption::KisDynaOpOption()
connect(m_options->fixedAngleChBox, SIGNAL(toggled(bool)), m_options->angleSlider, SLOT(setEnabled(bool)));
// preset
connect(m_options->circleRBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->polygonRBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->wireRBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->linesRBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->initWidthSPBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->massSPBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->dragSPBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->angleSlider, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->widthRangeSPBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->diameterDSSB, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->lineCountSPBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->lineSpacingSPBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->LineCBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->twoCBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->fixedAngleChBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->circleRBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->polygonRBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->wireRBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->linesRBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->initWidthSPBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
connect(m_options->massSPBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
connect(m_options->dragSPBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
connect(m_options->angleSlider, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->widthRangeSPBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
connect(m_options->diameterDSSB, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->lineCountSPBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->lineSpacingSPBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
connect(m_options->LineCBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->twoCBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->fixedAngleChBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -67,11 +67,11 @@ KisExperimentShapeOption::KisExperimentShapeOption()
void KisExperimentShapeOption::setupBrushPreviewSignals()
{
connect(m_options->shapeBox, SIGNAL(currentIndexChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->widthSpin, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->heightSpin, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->jitterShape, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->proportionalBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->shapeBox, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->widthSpin, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->heightSpin, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->jitterShape, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->proportionalBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
}
......
......@@ -50,19 +50,19 @@ KisExperimentOpOption::KisExperimentOpOption()
m_checkable = false;
m_options = new KisExperimentOpOptionsWidget();
connect(m_options->displaceCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->displaceStrength, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->speedCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->speed, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->smoothCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->smoothThreshold, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->displaceCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->displaceStrength, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->speedCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->speed, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->smoothCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->smoothThreshold, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->displaceStrength, SIGNAL(valueChanged(qreal)), SLOT(enableDisplacement(qreal)));
connect(m_options->speed, SIGNAL(valueChanged(qreal)), SLOT(enableSpeed(qreal)));
connect(m_options->smoothThreshold, SIGNAL(valueChanged(qreal)), SLOT(enableSmooth(qreal)));
connect(m_options->windingFillCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->hardEdgeCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->windingFillCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->hardEdgeCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -34,7 +34,7 @@ KisGridShapeOption::KisGridShapeOption()
{
m_checkable = false;
m_options = new KisShapeOptionsWidget();
connect(m_options->shapeCBox, SIGNAL(currentIndexChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->shapeCBox, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -62,14 +62,14 @@ KisGridOpOption::KisGridOpOption()
m_options->vertBorderDSPBox->setValue(0.0);
connect(m_options->gridWidthSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->gridHeightSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->divisionLevelSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->divisionPressureCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->scaleDSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->vertBorderDSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->horizBorderDSPBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->jitterBorderCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->gridWidthSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->gridHeightSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->divisionLevelSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->divisionPressureCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->scaleDSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->vertBorderDSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->horizBorderDSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->jitterBorderCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -49,15 +49,15 @@ KisHairyBristleOption::KisHairyBristleOption()
m_options = new KisBristleOptionsWidget();
// signals
connect(m_options->mousePressureCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->thresholdCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->rndBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->scaleBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->shearBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->densityBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->connectedCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->antialiasCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->compositingCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->mousePressureCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->thresholdCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->rndBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->scaleBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->shearBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->densityBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->connectedCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->antialiasCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->compositingCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -54,16 +54,16 @@ KisHairyInkOption::KisHairyInkOption()
m_options->inkDepletionSlider->setSuffix("%");
connect(m_options->inkAmountSpinBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->saturationCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->opacityCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->useWeightCHBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->pressureSlider, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->bristleLengthSlider, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->bristleInkAmountSlider, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->inkDepletionSlider, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->inkCurve, SIGNAL(modified()), SIGNAL(sigSettingChanged()));
connect(m_options->soakInkCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->inkAmountSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->saturationCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->opacityCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->useWeightCHBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->pressureSlider, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->bristleLengthSlider, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->bristleInkAmountSlider, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->inkDepletionSlider, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->inkCurve, SIGNAL(modified()), SLOT(emitSettingChanged()));
connect(m_options->soakInkCBox, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -35,10 +35,10 @@ KisHairyShapeOption::KisHairyShapeOption()
m_checkable = false;
m_options = new KisShapeOptionsWidget();
connect(m_options->oneDimBrushBtn, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->twoDimBrushBtn, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->radiusSpinBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->sigmaSpinBox, SIGNAL(valueChanged(double)), SIGNAL(sigSettingChanged()));
connect(m_options->oneDimBrushBtn, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->twoDimBrushBtn, SIGNAL(toggled(bool)), SLOT(emitSettingChanged()));
connect(m_options->radiusSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->sigmaSpinBox, SIGNAL(valueChanged(double)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -59,19 +59,19 @@ KisHatchingOptions::KisHatchingOptions()
m_checkable = false;
m_options = new KisHatchingOptionsWidget();
connect(m_options->angleKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->separationKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->thicknessKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->originXKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->originYKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
connect(m_options->noCrosshatchingRadioButton, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->perpendicularRadioButton, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->minusThenPlusRadioButton, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->plusThenMinusRadioButton, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->moirePatternRadioButton, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->separationIntervalSpinBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->angleKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->separationKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->thicknessKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->originXKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->originYKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
connect(m_options->noCrosshatchingRadioButton, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->perpendicularRadioButton, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->minusThenPlusRadioButton, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->plusThenMinusRadioButton, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->moirePatternRadioButton, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->separationIntervalSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -37,13 +37,13 @@ KisHatchingPreferences::KisHatchingPreferences()
m_options = new KisHatchingPreferencesWidget();
/*
connect(m_options->trigonometryAlgebraRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
connect(m_options->scratchOffRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
connect(m_options->trigonometryAlgebraRadioButton, SIGNAL(clicked(bool)),SLOT(emitSettingChanged()));
connect(m_options->scratchOffRadioButton, SIGNAL(clicked(bool)),SLOT(emitSettingChanged()));
*/
connect(m_options->antialiasCheckBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->opaqueBackgroundCheckBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->subpixelPrecisionCheckBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->antialiasCheckBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->opaqueBackgroundCheckBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
connect(m_options->subpixelPrecisionCheckBox, SIGNAL(clicked(bool)), SLOT(emitSettingChanged()));
setConfigurationPage(m_options);
}
......
......@@ -44,7 +44,7 @@ KisAirbrushOption::KisAirbrushOption(bool enabled)
{
m_checkable = true;
m_optionWidget = new KisAirbrushWidget();
connect(m_optionWidget->sliderRate, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_optionWidget->sliderRate, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
setConfigurationPage(m_optionWidget);
}
......
......@@ -33,7 +33,6 @@
#include <kis_fixed_paint_device.h>
#include <kis_mask_generator.h>
#include <kis_slider_spin_box.h>
#include <kis_signals_blocker.h>
#define showSlider(input, step) input->setRange(input->minimum(), input->maximum(), step)
......@@ -309,24 +308,15 @@ void KisAutoBrushWidget::setBrush(KisBrushSP brush)
comboBoxMaskType->setCurrentIndex(comboBoxMaskType->findText(aBrush->maskGenerator()->name()));
inputRadius->setValue(aBrush->maskGenerator()->diameter());
inputRatio->setValue(aBrush->maskGenerator()->ratio());
{
KisSignalsBlocker b1(inputVFade);
KisSignalsBlocker b2(inputHFade);
inputHFade->setValue(aBrush->maskGenerator()->horizontalFade());