18#include "moc_qgspainteffectwidget.cpp"
39 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsDrawSourceWidget::mDrawModeComboBox_currentIndexChanged );
40 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsDrawSourceWidget::mBlendCmbBx_currentIndexChanged );
47 if ( !effect || effect->
type() != QLatin1String(
"drawSource" ) )
56void QgsDrawSourceWidget::initGui()
65 mOpacityWidget->setOpacity( mEffect->
opacity() );
66 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
67 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
69 blockSignals(
false );
72void QgsDrawSourceWidget::blockSignals(
const bool block )
74 mOpacityWidget->blockSignals( block );
75 mBlendCmbBx->blockSignals( block );
76 mDrawModeComboBox->blockSignals( block );
79void QgsDrawSourceWidget::opacityChanged(
double value )
88void QgsDrawSourceWidget::mDrawModeComboBox_currentIndexChanged(
int index )
95 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
99void QgsDrawSourceWidget::mBlendCmbBx_currentIndexChanged(
int index )
120 connect( mBlurTypeCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mBlurTypeCombo_currentIndexChanged );
121 connect( mBlurStrengthSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsBlurWidget::mBlurStrengthSpnBx_valueChanged );
123 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mDrawModeComboBox_currentIndexChanged );
124 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mBlendCmbBx_currentIndexChanged );
139 if ( !effect || effect->
type() != QLatin1String(
"blur" ) )
146void QgsBlurWidget::initGui()
153 blockSignals(
true );
155 mBlurTypeCombo->setCurrentIndex( mBlurTypeCombo->findData( mEffect->
blurMethod() ) );
156 mBlurStrengthSpnBx->setValue( mEffect->
blurLevel() );
157 mOpacityWidget->setOpacity( mEffect->
opacity() );
158 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
159 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
161 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
164 blockSignals(
false );
167void QgsBlurWidget::blockSignals(
const bool block )
169 mBlurTypeCombo->blockSignals( block );
170 mBlurStrengthSpnBx->blockSignals( block );
171 mOpacityWidget->blockSignals( block );
172 mBlendCmbBx->blockSignals( block );
173 mDrawModeComboBox->blockSignals( block );
176void QgsBlurWidget::mBlurTypeCombo_currentIndexChanged(
int index )
188 mBlurStrengthSpnBx->setMaximum( 16 );
191 mBlurStrengthSpnBx->setMaximum( 200 );
198void QgsBlurWidget::mBlurStrengthSpnBx_valueChanged(
double value )
207void QgsBlurWidget::mBlurUnitWidget_changed()
219void QgsBlurWidget::opacityChanged(
double value )
228void QgsBlurWidget::mDrawModeComboBox_currentIndexChanged(
int index )
235 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
239void QgsBlurWidget::mBlendCmbBx_currentIndexChanged(
int index )
260 connect( mShadowOffsetAngleSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged );
261 connect( mShadowOffsetAngleDial, &QDial::valueChanged,
this, &QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged );
262 connect( mShadowOffsetSpnBx,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged );
265 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged );
266 connect( mShadowBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged );
267 connect( mShadowRadiuSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged );
270 mShadowColorBtn->setAllowOpacity(
false );
271 mShadowColorBtn->setColorDialogTitle( tr(
"Select Shadow Color" ) );
272 mShadowColorBtn->setContext( QStringLiteral(
"symbology" ) );
273 mShadowOffsetAngleSpnBx->setClearValue( 0 );
287 if ( !effect || ( effect->
type() != QLatin1String(
"dropShadow" ) && effect->
type() != QLatin1String(
"innerShadow" ) ) )
294void QgsShadowEffectWidget::initGui()
301 blockSignals(
true );
303 mShadowOffsetAngleSpnBx->setValue( mEffect->
offsetAngle() );
304 mShadowOffsetAngleDial->setValue( mEffect->
offsetAngle() );
306 mOffsetUnitWidget->setUnit( mEffect->
offsetUnit() );
308 mShadowRadiuSpnBx->setValue( mEffect->
blurLevel() );
309 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
311 mOpacityWidget->setOpacity( mEffect->
opacity() );
312 mShadowColorBtn->setColor( mEffect->
color() );
313 mShadowBlendCmbBx->setBlendMode( mEffect->
blendMode() );
314 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
316 blockSignals(
false );
319void QgsShadowEffectWidget::blockSignals(
const bool block )
321 mShadowOffsetAngleSpnBx->blockSignals( block );
322 mShadowOffsetAngleDial->blockSignals( block );
323 mShadowOffsetSpnBx->blockSignals( block );
324 mOffsetUnitWidget->blockSignals( block );
325 mShadowRadiuSpnBx->blockSignals( block );
326 mBlurUnitWidget->blockSignals( block );
327 mOpacityWidget->blockSignals( block );
328 mShadowColorBtn->blockSignals( block );
329 mShadowBlendCmbBx->blockSignals( block );
330 mDrawModeComboBox->blockSignals( block );
333void QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged(
int value )
335 mShadowOffsetAngleDial->blockSignals(
true );
336 mShadowOffsetAngleDial->setValue( value );
337 mShadowOffsetAngleDial->blockSignals(
false );
346void QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged(
int value )
348 mShadowOffsetAngleSpnBx->setValue( value );
351void QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged(
double value )
360void QgsShadowEffectWidget::mOffsetUnitWidget_changed()
372void QgsShadowEffectWidget::opacityChanged(
double value )
381void QgsShadowEffectWidget::mShadowColorBtn_colorChanged(
const QColor &color )
390void QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged(
double value )
399void QgsShadowEffectWidget::mBlurUnitWidget_changed()
411void QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
418 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
422void QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged(
int index )
429 mEffect->
setBlendMode( mShadowBlendCmbBx->blendMode() );
444 connect( mSpreadSpnBx,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mSpreadSpnBx_valueChanged );
447 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mBlendCmbBx_currentIndexChanged );
448 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mDrawModeComboBox_currentIndexChanged );
449 connect( mBlurRadiusSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mBlurRadiusSpnBx_valueChanged );
452 mColorBtn->setAllowOpacity(
false );
453 mColorBtn->setColorDialogTitle( tr(
"Select Glow Color" ) );
454 mColorBtn->setContext( QStringLiteral(
"symbology" ) );
461 btnColorRamp->setShowGradientOnly(
true );
466 connect( radioSingleColor, &QAbstractButton::toggled,
this, &QgsGlowWidget::colorModeChanged );
472 if ( !effect || ( effect->
type() != QLatin1String(
"outerGlow" ) && effect->
type() != QLatin1String(
"innerGlow" ) ) )
479void QgsGlowWidget::initGui()
486 blockSignals(
true );
488 mSpreadSpnBx->setValue( mEffect->
spread() );
489 mSpreadUnitWidget->setUnit( mEffect->
spreadUnit() );
491 mBlurRadiusSpnBx->setValue( mEffect->
blurLevel() );
492 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
494 mOpacityWidget->setOpacity( mEffect->
opacity() );
495 mColorBtn->setColor( mEffect->
color() );
496 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
498 if ( mEffect->
ramp() )
500 btnColorRamp->setColorRamp( mEffect->
ramp() );
507 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
509 blockSignals(
false );
512void QgsGlowWidget::blockSignals(
const bool block )
514 mSpreadSpnBx->blockSignals( block );
515 mSpreadUnitWidget->blockSignals( block );
516 mBlurRadiusSpnBx->blockSignals( block );
517 mOpacityWidget->blockSignals( block );
518 mColorBtn->blockSignals( block );
519 mBlendCmbBx->blockSignals( block );
520 btnColorRamp->blockSignals( block );
521 radioSingleColor->blockSignals( block );
522 radioColorRamp->blockSignals( block );
523 mDrawModeComboBox->blockSignals( block );
526void QgsGlowWidget::colorModeChanged()
533 if ( radioSingleColor->isChecked() )
540 mEffect->
setRamp( btnColorRamp->colorRamp() );
545void QgsGlowWidget::mSpreadSpnBx_valueChanged(
double value )
554void QgsGlowWidget::mSpreadUnitWidget_changed()
566void QgsGlowWidget::opacityChanged(
double value )
575void QgsGlowWidget::mColorBtn_colorChanged(
const QColor &color )
584void QgsGlowWidget::mBlurRadiusSpnBx_valueChanged(
double value )
593void QgsGlowWidget::mBlurUnitWidget_changed()
605void QgsGlowWidget::mBlendCmbBx_currentIndexChanged(
int index )
616void QgsGlowWidget::mDrawModeComboBox_currentIndexChanged(
int index )
623 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
627void QgsGlowWidget::applyColorRamp()
651 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsTransformWidget::mDrawModeComboBox_currentIndexChanged );
652 connect( mSpinTranslateX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateX_valueChanged );
653 connect( mSpinTranslateY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateY_valueChanged );
655 connect( mReflectXCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectXCheckBox_stateChanged );
656 connect( mReflectYCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectYCheckBox_stateChanged );
657 connect( mSpinShearX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearX_valueChanged );
658 connect( mSpinShearY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearY_valueChanged );
659 connect( mSpinScaleX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleX_valueChanged );
660 connect( mSpinScaleY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleY_valueChanged );
661 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mRotationSpinBox_valueChanged );
665 mSpinTranslateX->setClearValue( 0 );
666 mSpinTranslateY->setClearValue( 0 );
667 mRotationSpinBox->setClearValue( 0 );
668 mSpinShearX->setClearValue( 0 );
669 mSpinShearY->setClearValue( 0 );
670 mSpinScaleX->setClearValue( 100.0 );
671 mSpinScaleY->setClearValue( 100.0 );
679 if ( !effect || effect->
type() != QLatin1String(
"transform" ) )
686void QgsTransformWidget::initGui()
693 blockSignals(
true );
695 mReflectXCheckBox->setChecked( mEffect->
reflectX() );
696 mReflectYCheckBox->setChecked( mEffect->
reflectY() );
697 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
698 mSpinTranslateX->setValue( mEffect->
translateX() );
699 mSpinTranslateY->setValue( mEffect->
translateY() );
702 mSpinShearX->setValue( mEffect->
shearX() );
703 mSpinShearY->setValue( mEffect->
shearY() );
704 mSpinScaleX->setValue( mEffect->
scaleX() * 100.0 );
705 mSpinScaleY->setValue( mEffect->
scaleY() * 100.0 );
706 mRotationSpinBox->setValue( mEffect->
rotation() );
708 blockSignals(
false );
711void QgsTransformWidget::blockSignals(
const bool block )
713 mDrawModeComboBox->blockSignals( block );
714 mTranslateUnitWidget->blockSignals( block );
715 mSpinTranslateX->blockSignals( block );
716 mSpinTranslateY->blockSignals( block );
717 mReflectXCheckBox->blockSignals( block );
718 mReflectYCheckBox->blockSignals( block );
719 mSpinShearX->blockSignals( block );
720 mSpinShearY->blockSignals( block );
721 mSpinScaleX->blockSignals( block );
722 mSpinScaleY->blockSignals( block );
723 mRotationSpinBox->blockSignals( block );
727void QgsTransformWidget::mDrawModeComboBox_currentIndexChanged(
int index )
734 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
738void QgsTransformWidget::mSpinTranslateX_valueChanged(
double value )
747void QgsTransformWidget::mSpinTranslateY_valueChanged(
double value )
756void QgsTransformWidget::mTranslateUnitWidget_changed()
768void QgsTransformWidget::mReflectXCheckBox_stateChanged(
int state )
777void QgsTransformWidget::mReflectYCheckBox_stateChanged(
int state )
786void QgsTransformWidget::mSpinShearX_valueChanged(
double value )
795void QgsTransformWidget::mSpinShearY_valueChanged(
double value )
804void QgsTransformWidget::mSpinScaleX_valueChanged(
double value )
813void QgsTransformWidget::mSpinScaleY_valueChanged(
double value )
822void QgsTransformWidget::mRotationSpinBox_valueChanged(
double value )
841 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged );
842 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged );
843 connect( mBrightnessSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mBrightnessSpinBox_valueChanged );
844 connect( mContrastSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mContrastSpinBox_valueChanged );
845 connect( mSaturationSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mSaturationSpinBox_valueChanged );
846 connect( mColorizeStrengthSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged );
847 connect( mColorizeCheck, &QCheckBox::stateChanged,
this, &QgsColorEffectWidget::mColorizeCheck_stateChanged );
849 connect( mGrayscaleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged );
851 mBrightnessSpinBox->setClearValue( 0 );
852 mContrastSpinBox->setClearValue( 0 );
853 mSaturationSpinBox->setClearValue( 0 );
854 mColorizeStrengthSpinBox->setClearValue( 100 );
855 mColorizeColorButton->setAllowOpacity(
false );
869 if ( !effect || effect->
type() != QLatin1String(
"color" ) )
876void QgsColorEffectWidget::initGui()
883 blockSignals(
true );
885 mSliderBrightness->setValue( mEffect->
brightness() );
886 mSliderContrast->setValue( mEffect->
contrast() );
887 mSliderSaturation->setValue( ( mEffect->
saturation() - 1.0 ) * 100.0 );
888 mColorizeCheck->setChecked( mEffect->
colorizeOn() );
891 const int grayscaleIdx = mGrayscaleCombo->findData( QVariant( (
int ) mEffect->
grayscaleMode() ) );
892 mGrayscaleCombo->setCurrentIndex( grayscaleIdx == -1 ? 0 : grayscaleIdx );
893 mOpacityWidget->setOpacity( mEffect->
opacity() );
894 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
895 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
896 enableColorizeControls( mEffect->
colorizeOn() );
898 blockSignals(
false );
901void QgsColorEffectWidget::blockSignals(
const bool block )
903 mBrightnessSpinBox->blockSignals( block );
904 mContrastSpinBox->blockSignals( block );
905 mSaturationSpinBox->blockSignals( block );
906 mColorizeStrengthSpinBox->blockSignals( block );
907 mColorizeCheck->blockSignals( block );
908 mColorizeColorButton->blockSignals( block );
909 mGrayscaleCombo->blockSignals( block );
910 mOpacityWidget->blockSignals( block );
911 mBlendCmbBx->blockSignals( block );
912 mDrawModeComboBox->blockSignals( block );
915void QgsColorEffectWidget::enableColorizeControls(
const bool enable )
917 mSliderColorizeStrength->setEnabled( enable );
918 mColorizeStrengthSpinBox->setEnabled( enable );
919 mColorizeColorButton->setEnabled( enable );
922void QgsColorEffectWidget::opacityChanged(
double value )
931void QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged(
int index )
942void QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
949 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
953void QgsColorEffectWidget::mBrightnessSpinBox_valueChanged(
int value )
962void QgsColorEffectWidget::mContrastSpinBox_valueChanged(
int value )
971void QgsColorEffectWidget::mSaturationSpinBox_valueChanged(
int value )
980void QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged(
int value )
989void QgsColorEffectWidget::mColorizeCheck_stateChanged(
int state )
995 enableColorizeControls( state == Qt::Checked );
999void QgsColorEffectWidget::mColorizeColorButton_colorChanged(
const QColor &color )
1008void QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged(
int index )
@ Millimeters
Millimeters.
@ Points
Points (e.g., for font sizes)
A paint effect which blurs a source picture, using a number of different blur methods.
const QgsMapUnitScale & blurMapUnitScale() const
Returns the map unit scale used for the blur strength (radius).
void setBlurUnit(const Qgis::RenderUnit unit)
Sets the units used for the blur level (radius).
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the blur strength (radius).
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
Qgis::RenderUnit blurUnit() const
Returns the units used for the blur level (radius).
BlurMethod
Available blur methods (algorithms)
@ GaussianBlur
Gaussian blur, a slower but high quality blur. Blur level values are the distance in pixels for the b...
@ StackBlur
Stack blur, a fast but low quality blur. Valid blur level values are between 0 - 16.
double opacity() const
Returns the opacity for the effect.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
BlurMethod blurMethod() const
Returns the blur method (algorithm) used for performing the blur.
double blurLevel() const
Returns the blur level (radius)
void setBlurMethod(const BlurMethod method)
Sets the blur method (algorithm) to use for performing the blur.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setBlurLevel(const double level)
Sets blur level (radius)
A paint effect which alters the colors (e.g., brightness, contrast) in a source picture.
bool colorizeOn() const
Returns whether the effect will colorize a picture.
QgsImageOperation::GrayscaleMode grayscaleMode() const
Returns whether the effect will convert a picture to grayscale.
double opacity() const
Returns the opacity for the effect.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setSaturation(double saturation)
Sets the saturation modification for the effect.
void setColorizeStrength(int colorizeStrength)
Sets the strength for colorizing a picture.
int colorizeStrength() const
Returns the strength used for colorizing a picture.
void setColorizeColor(const QColor &colorizeColor)
Sets the color used for colorizing a picture.
void setColorizeOn(bool colorizeOn)
Sets whether the effect should colorize a picture.
int contrast() const
Returns the contrast modification for the effect.
int brightness() const
Returns the brightness modification for the effect.
void setContrast(int contrast)
Sets the contrast modification for the effect.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
double saturation() const
Returns the saturation modification for the effect.
void setBrightness(int brightness)
Sets the brightness modification for the effect.
QColor colorizeColor() const
Returns the color used for colorizing a picture.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
void setGrayscaleMode(QgsImageOperation::GrayscaleMode grayscaleMode)
Sets whether the effect should convert a picture to grayscale.
Abstract base class for color ramps.
A paint effect which draws the source picture with minor or no alterations.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
double opacity() const
Returns the opacity for the effect.
void setOpacity(const double opacity)
Sets the opacity for the effect.
Base class for paint effect which draw a glow inside or outside a picture.
void setSpread(const double spread)
Sets the spread distance for drawing the glow effect.
void setColorType(GlowColorType colorType)
Sets the color mode to use for the glow.
void setSpreadMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the spread distance.
Qgis::RenderUnit blurUnit() const
Returns the units used for the glow blur level (radius).
void setOpacity(const double opacity)
Sets the opacity for the effect.
double spread() const
Returns the spread distance used for drawing the glow effect.
const QgsMapUnitScale & spreadMapUnitScale() const
Returns the map unit scale used for the spread distance.
@ SingleColor
Use a single color and fade the color to totally transparent.
@ ColorRamp
Use colors from a color ramp.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
double blurLevel() const
Returns the blur level (radius) for the glow.
double opacity() const
Returns the opacity for the effect.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
QColor color() const
Returns the color for the glow.
const QgsMapUnitScale & blurMapUnitScale() const
Returns the map unit scale used for the glow blur strength (radius).
void setBlurUnit(const Qgis::RenderUnit unit)
Sets the units used for the glow blur level (radius).
void setBlurLevel(const double level)
Sets blur level (radius) for the glow.
QgsColorRamp * ramp() const
Returns the color ramp used for the glow.
Qgis::RenderUnit spreadUnit() const
Returns the units used for the glow spread distance.
void setRamp(QgsColorRamp *ramp)
Sets the color ramp for the glow.
void setSpreadUnit(const Qgis::RenderUnit unit)
Sets the units used for the glow spread distance.
void setColor(const QColor &color)
Sets the color for the glow.
GlowColorType colorType() const
Returns the color mode used for the glow.
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the glow blur strength (radius).
GrayscaleMode
Modes for converting a QImage to grayscale.
@ GrayscaleLightness
Keep the lightness of the color, drops the saturation.
@ GrayscaleLuminosity
Grayscale by perceptual luminosity (weighted sum of color RGB components)
@ GrayscaleAverage
Grayscale by taking average of color RGB components.
Base class for visual effects which can be applied to QPicture drawings.
void setDrawMode(DrawMode drawMode)
Sets the draw mode for the effect.
DrawMode drawMode() const
Returns the draw mode for the effect.
virtual QString type() const =0
Returns the effect type.
Base class for paint effects which offset, blurred shadows.
int offsetAngle() const
Returns the angle used for offsetting the shadow.
void setOffsetAngle(const int angle)
Sets the angle for offsetting the shadow.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setColor(const QColor &color)
Sets the color for the shadow.
double opacity() const
Returns the opacity for the effect.
Qgis::RenderUnit offsetUnit() const
Returns the units used for the shadow offset distance.
QColor color() const
Returns the color used for the shadow.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
Qgis::RenderUnit blurUnit() const
Returns the units used for the shadow blur level (radius).
void setBlurLevel(const double level)
Sets blur level (radius) for the shadow.
void setOffsetUnit(const Qgis::RenderUnit unit)
Sets the units used for the shadow offset distance.
void setOffsetDistance(const double distance)
Sets the distance for offsetting the shadow.
double blurLevel() const
Returns the blur level (radius) for the shadow.
void setBlurUnit(const Qgis::RenderUnit unit)
Sets the units used for the shadow blur level (radius).
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale used for the shadow offset distance.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow offset distance.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
double offsetDistance() const
Returns the distance used for offsetting the shadow.
const QgsMapUnitScale & blurMapUnitScale() const
Returns the map unit scale used for the shadow blur strength (radius).
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow blur strength (radius).
QList< Qgis::RenderUnit > RenderUnitList
List of render units.