38 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsDrawSourceWidget::mDrawModeComboBox_currentIndexChanged );
39 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsDrawSourceWidget::mBlendCmbBx_currentIndexChanged );
46 if ( !effect || effect->
type() != QLatin1String(
"drawSource" ) )
55 void QgsDrawSourceWidget::initGui()
64 mOpacityWidget->setOpacity( mEffect->
opacity() );
65 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
66 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
68 blockSignals(
false );
71 void QgsDrawSourceWidget::blockSignals(
const bool block )
73 mOpacityWidget->blockSignals( block );
74 mBlendCmbBx->blockSignals( block );
75 mDrawModeComboBox->blockSignals( block );
78 void QgsDrawSourceWidget::opacityChanged(
double value )
87 void QgsDrawSourceWidget::mDrawModeComboBox_currentIndexChanged(
int index )
94 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
98 void QgsDrawSourceWidget::mBlendCmbBx_currentIndexChanged(
int index )
119 connect( mBlurTypeCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mBlurTypeCombo_currentIndexChanged );
120 connect( mBlurStrengthSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsBlurWidget::mBlurStrengthSpnBx_valueChanged );
122 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mDrawModeComboBox_currentIndexChanged );
123 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mBlendCmbBx_currentIndexChanged );
138 if ( !effect || effect->
type() != QLatin1String(
"blur" ) )
145 void QgsBlurWidget::initGui()
152 blockSignals(
true );
154 mBlurTypeCombo->setCurrentIndex( mBlurTypeCombo->findData( mEffect->
blurMethod() ) );
155 mBlurStrengthSpnBx->setValue( mEffect->
blurLevel() );
156 mOpacityWidget->setOpacity( mEffect->
opacity() );
157 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
158 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
160 blockSignals(
false );
163 void QgsBlurWidget::blockSignals(
const bool block )
165 mBlurTypeCombo->blockSignals( block );
166 mBlurStrengthSpnBx->blockSignals( block );
167 mOpacityWidget->blockSignals( block );
168 mBlendCmbBx->blockSignals( block );
169 mDrawModeComboBox->blockSignals( block );
172 void QgsBlurWidget::mBlurTypeCombo_currentIndexChanged(
int index )
184 mBlurStrengthSpnBx->setMaximum( 16 );
187 mBlurStrengthSpnBx->setMaximum( 200 );
194 void QgsBlurWidget::mBlurStrengthSpnBx_valueChanged(
double value )
203 void QgsBlurWidget::mBlurUnitWidget_changed()
215 void QgsBlurWidget::opacityChanged(
double value )
224 void QgsBlurWidget::mDrawModeComboBox_currentIndexChanged(
int index )
231 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
235 void QgsBlurWidget::mBlendCmbBx_currentIndexChanged(
int index )
256 connect( mShadowOffsetAngleSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged );
257 connect( mShadowOffsetAngleDial, &QDial::valueChanged,
this, &QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged );
258 connect( mShadowOffsetSpnBx, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged );
261 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged );
262 connect( mShadowBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged );
263 connect( mShadowRadiuSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged );
266 mShadowColorBtn->setAllowOpacity(
false );
267 mShadowColorBtn->setColorDialogTitle( tr(
"Select Shadow Color" ) );
268 mShadowColorBtn->setContext( QStringLiteral(
"symbology" ) );
269 mShadowOffsetAngleSpnBx->setClearValue( 0 );
283 if ( !effect || ( effect->
type() != QLatin1String(
"dropShadow" ) && effect->
type() != QLatin1String(
"innerShadow" ) ) )
290 void QgsShadowEffectWidget::initGui()
297 blockSignals(
true );
299 mShadowOffsetAngleSpnBx->setValue( mEffect->
offsetAngle() );
300 mShadowOffsetAngleDial->setValue( mEffect->
offsetAngle() );
302 mOffsetUnitWidget->setUnit( mEffect->
offsetUnit() );
304 mShadowRadiuSpnBx->setValue( mEffect->
blurLevel() );
305 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
307 mOpacityWidget->setOpacity( mEffect->
opacity() );
308 mShadowColorBtn->setColor( mEffect->
color() );
309 mShadowBlendCmbBx->setBlendMode( mEffect->
blendMode() );
310 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
312 blockSignals(
false );
315 void QgsShadowEffectWidget::blockSignals(
const bool block )
317 mShadowOffsetAngleSpnBx->blockSignals( block );
318 mShadowOffsetAngleDial->blockSignals( block );
319 mShadowOffsetSpnBx->blockSignals( block );
320 mOffsetUnitWidget->blockSignals( block );
321 mShadowRadiuSpnBx->blockSignals( block );
322 mBlurUnitWidget->blockSignals( block );
323 mOpacityWidget->blockSignals( block );
324 mShadowColorBtn->blockSignals( block );
325 mShadowBlendCmbBx->blockSignals( block );
326 mDrawModeComboBox->blockSignals( block );
329 void QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged(
int value )
331 mShadowOffsetAngleDial->blockSignals(
true );
332 mShadowOffsetAngleDial->setValue( value );
333 mShadowOffsetAngleDial->blockSignals(
false );
342 void QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged(
int value )
344 mShadowOffsetAngleSpnBx->setValue( value );
347 void QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged(
double value )
356 void QgsShadowEffectWidget::mOffsetUnitWidget_changed()
368 void QgsShadowEffectWidget::opacityChanged(
double value )
377 void QgsShadowEffectWidget::mShadowColorBtn_colorChanged(
const QColor &color )
386 void QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged(
double value )
395 void QgsShadowEffectWidget::mBlurUnitWidget_changed()
407 void QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
414 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
418 void QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged(
int index )
425 mEffect->
setBlendMode( mShadowBlendCmbBx->blendMode() );
440 connect( mSpreadSpnBx, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mSpreadSpnBx_valueChanged );
443 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mBlendCmbBx_currentIndexChanged );
444 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mDrawModeComboBox_currentIndexChanged );
445 connect( mBlurRadiusSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mBlurRadiusSpnBx_valueChanged );
448 mColorBtn->setAllowOpacity(
false );
449 mColorBtn->setColorDialogTitle( tr(
"Select Glow Color" ) );
450 mColorBtn->setContext( QStringLiteral(
"symbology" ) );
457 btnColorRamp->setShowGradientOnly(
true );
462 connect( radioSingleColor, &QAbstractButton::toggled,
this, &QgsGlowWidget::colorModeChanged );
468 if ( !effect || ( effect->
type() != QLatin1String(
"outerGlow" ) && effect->
type() != QLatin1String(
"innerGlow" ) ) )
475 void QgsGlowWidget::initGui()
482 blockSignals(
true );
484 mSpreadSpnBx->setValue( mEffect->
spread() );
485 mSpreadUnitWidget->setUnit( mEffect->
spreadUnit() );
487 mBlurRadiusSpnBx->setValue( mEffect->
blurLevel() );
488 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
490 mOpacityWidget->setOpacity( mEffect->
opacity() );
491 mColorBtn->setColor( mEffect->
color() );
492 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
494 if ( mEffect->
ramp() )
496 btnColorRamp->setColorRamp( mEffect->
ramp() );
503 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
505 blockSignals(
false );
508 void QgsGlowWidget::blockSignals(
const bool block )
510 mSpreadSpnBx->blockSignals( block );
511 mSpreadUnitWidget->blockSignals( block );
512 mBlurRadiusSpnBx->blockSignals( block );
513 mOpacityWidget->blockSignals( block );
514 mColorBtn->blockSignals( block );
515 mBlendCmbBx->blockSignals( block );
516 btnColorRamp->blockSignals( block );
517 radioSingleColor->blockSignals( block );
518 radioColorRamp->blockSignals( block );
519 mDrawModeComboBox->blockSignals( block );
522 void QgsGlowWidget::colorModeChanged()
529 if ( radioSingleColor->isChecked() )
536 mEffect->
setRamp( btnColorRamp->colorRamp() );
541 void QgsGlowWidget::mSpreadSpnBx_valueChanged(
double value )
550 void QgsGlowWidget::mSpreadUnitWidget_changed()
562 void QgsGlowWidget::opacityChanged(
double value )
571 void QgsGlowWidget::mColorBtn_colorChanged(
const QColor &color )
580 void QgsGlowWidget::mBlurRadiusSpnBx_valueChanged(
double value )
589 void QgsGlowWidget::mBlurUnitWidget_changed()
601 void QgsGlowWidget::mBlendCmbBx_currentIndexChanged(
int index )
612 void QgsGlowWidget::mDrawModeComboBox_currentIndexChanged(
int index )
619 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
623 void QgsGlowWidget::applyColorRamp()
647 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsTransformWidget::mDrawModeComboBox_currentIndexChanged );
648 connect( mSpinTranslateX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateX_valueChanged );
649 connect( mSpinTranslateY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateY_valueChanged );
651 connect( mReflectXCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectXCheckBox_stateChanged );
652 connect( mReflectYCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectYCheckBox_stateChanged );
653 connect( mSpinShearX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearX_valueChanged );
654 connect( mSpinShearY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearY_valueChanged );
655 connect( mSpinScaleX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleX_valueChanged );
656 connect( mSpinScaleY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleY_valueChanged );
657 connect( mRotationSpinBox, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mRotationSpinBox_valueChanged );
661 mSpinTranslateX->setClearValue( 0 );
662 mSpinTranslateY->setClearValue( 0 );
663 mRotationSpinBox->setClearValue( 0 );
664 mSpinShearX->setClearValue( 0 );
665 mSpinShearY->setClearValue( 0 );
666 mSpinScaleX->setClearValue( 100.0 );
667 mSpinScaleY->setClearValue( 100.0 );
675 if ( !effect || effect->
type() != QLatin1String(
"transform" ) )
682 void QgsTransformWidget::initGui()
689 blockSignals(
true );
691 mReflectXCheckBox->setChecked( mEffect->
reflectX() );
692 mReflectYCheckBox->setChecked( mEffect->
reflectY() );
693 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
694 mSpinTranslateX->setValue( mEffect->
translateX() );
695 mSpinTranslateY->setValue( mEffect->
translateY() );
698 mSpinShearX->setValue( mEffect->
shearX() );
699 mSpinShearY->setValue( mEffect->
shearY() );
700 mSpinScaleX->setValue( mEffect->
scaleX() * 100.0 );
701 mSpinScaleY->setValue( mEffect->
scaleY() * 100.0 );
702 mRotationSpinBox->setValue( mEffect->
rotation() );
704 blockSignals(
false );
707 void QgsTransformWidget::blockSignals(
const bool block )
709 mDrawModeComboBox->blockSignals( block );
710 mTranslateUnitWidget->blockSignals( block );
711 mSpinTranslateX->blockSignals( block );
712 mSpinTranslateY->blockSignals( block );
713 mReflectXCheckBox->blockSignals( block );
714 mReflectYCheckBox->blockSignals( block );
715 mSpinShearX->blockSignals( block );
716 mSpinShearY->blockSignals( block );
717 mSpinScaleX->blockSignals( block );
718 mSpinScaleY->blockSignals( block );
719 mRotationSpinBox->blockSignals( block );
723 void QgsTransformWidget::mDrawModeComboBox_currentIndexChanged(
int index )
730 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
734 void QgsTransformWidget::mSpinTranslateX_valueChanged(
double value )
743 void QgsTransformWidget::mSpinTranslateY_valueChanged(
double value )
752 void QgsTransformWidget::mTranslateUnitWidget_changed()
764 void QgsTransformWidget::mReflectXCheckBox_stateChanged(
int state )
773 void QgsTransformWidget::mReflectYCheckBox_stateChanged(
int state )
782 void QgsTransformWidget::mSpinShearX_valueChanged(
double value )
791 void QgsTransformWidget::mSpinShearY_valueChanged(
double value )
800 void QgsTransformWidget::mSpinScaleX_valueChanged(
double value )
809 void QgsTransformWidget::mSpinScaleY_valueChanged(
double value )
818 void QgsTransformWidget::mRotationSpinBox_valueChanged(
double value )
837 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged );
838 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged );
839 connect( mBrightnessSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mBrightnessSpinBox_valueChanged );
840 connect( mContrastSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mContrastSpinBox_valueChanged );
841 connect( mSaturationSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mSaturationSpinBox_valueChanged );
842 connect( mColorizeStrengthSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged );
843 connect( mColorizeCheck, &QCheckBox::stateChanged,
this, &QgsColorEffectWidget::mColorizeCheck_stateChanged );
845 connect( mGrayscaleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged );
847 mBrightnessSpinBox->setClearValue( 0 );
848 mContrastSpinBox->setClearValue( 0 );
849 mSaturationSpinBox->setClearValue( 0 );
850 mColorizeColorButton->setAllowOpacity(
false );
864 if ( !effect || effect->
type() != QLatin1String(
"color" ) )
871 void QgsColorEffectWidget::initGui()
878 blockSignals(
true );
880 mSliderBrightness->setValue( mEffect->
brightness() );
881 mSliderContrast->setValue( mEffect->
contrast() );
882 mSliderSaturation->setValue( ( mEffect->
saturation() - 1.0 ) * 100.0 );
883 mColorizeCheck->setChecked( mEffect->
colorizeOn() );
886 int grayscaleIdx = mGrayscaleCombo->findData( QVariant( (
int ) mEffect->
grayscaleMode() ) );
887 mGrayscaleCombo->setCurrentIndex( grayscaleIdx == -1 ? 0 : grayscaleIdx );
888 mOpacityWidget->setOpacity( mEffect->
opacity() );
889 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
890 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
891 enableColorizeControls( mEffect->
colorizeOn() );
893 blockSignals(
false );
896 void QgsColorEffectWidget::blockSignals(
const bool block )
898 mBrightnessSpinBox->blockSignals( block );
899 mContrastSpinBox->blockSignals( block );
900 mSaturationSpinBox->blockSignals( block );
901 mColorizeStrengthSpinBox->blockSignals( block );
902 mColorizeCheck->blockSignals( block );
903 mColorizeColorButton->blockSignals( block );
904 mGrayscaleCombo->blockSignals( block );
905 mOpacityWidget->blockSignals( block );
906 mBlendCmbBx->blockSignals( block );
907 mDrawModeComboBox->blockSignals( block );
910 void QgsColorEffectWidget::enableColorizeControls(
const bool enable )
912 mSliderColorizeStrength->setEnabled( enable );
913 mColorizeStrengthSpinBox->setEnabled( enable );
914 mColorizeColorButton->setEnabled( enable );
917 void QgsColorEffectWidget::opacityChanged(
double value )
926 void QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged(
int index )
937 void QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
944 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
948 void QgsColorEffectWidget::mBrightnessSpinBox_valueChanged(
int value )
957 void QgsColorEffectWidget::mContrastSpinBox_valueChanged(
int value )
966 void QgsColorEffectWidget::mSaturationSpinBox_valueChanged(
int value )
975 void QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged(
int value )
984 void QgsColorEffectWidget::mColorizeCheck_stateChanged(
int state )
990 enableColorizeControls( state == Qt::Checked );
994 void QgsColorEffectWidget::mColorizeColorButton_colorChanged(
const QColor &color )
1003 void QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged(
int index )
double opacity() const
Returns the opacity for the effect.
void setOffsetDistance(const double distance)
Sets the distance for offsetting the shadow.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setBlurMethod(const BlurMethod method)
Sets the blur method (algorithm) to use for performing the blur.
QgsUnitTypes::RenderUnit blurUnit() const
Returns the units used for the shadow blur level (radius).
double opacity() const
Returns the opacity for the effect.
const QgsMapUnitScale & blurMapUnitScale() const
Returns the map unit scale used for the glow blur strength (radius).
void setOffsetAngle(const int angle)
Sets the angle for offsetting the shadow.
double blurLevel() const
Returns the blur level (radius) for the shadow.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setBlurUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the blur level (radius).
void setOpacity(const double opacity)
Sets the opacity for the effect.
Keep the lightness of the color, drops the saturation.
Abstract base class for color ramps.
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow blur strength (radius).
void setColorizeColor(const QColor &colorizeColor)
Sets the color used for colorizing a picture.
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).
Base class for visual effects which can be applied to QPicture drawings.
void setColorizeStrength(int colorizeStrength)
Sets the strength for colorizing a picture.
void setBlurLevel(const double level)
Sets blur level (radius)
Gaussian blur, a slower but high quality blur. Blur level values are the distance in pixels for the b...
double opacity() const
Returns the opacity for the effect.
void setBlurUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the glow blur level (radius).
DrawMode drawMode() const
Returns the draw mode for the effect.
BlurMethod blurMethod() const
Returns the blur method (algorithm) used for performing the blur.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
QList< QgsUnitTypes::RenderUnit > RenderUnitList
List of render units.
Base class for paint effect which draw a glow inside or outside a picture.
Grayscale by perceptual luminosity (weighted sum of color RGB components)
Grayscale by taking average of color RGB components.
void setGrayscaleMode(QgsImageOperation::GrayscaleMode grayscaleMode)
Sets whether the effect should convert a picture to grayscale.
void setBrightness(int brightness)
Sets the brightness modification for the effect.
Stack blur, a fast but low quality blur. Valid blur level values are between 0 - 16.
BlurMethod
Available blur methods (algorithms)
void setBlurLevel(const double level)
Sets blur level (radius) for the shadow.
void setSpreadMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the spread distance.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
double opacity() const
Returns the opacity for the effect.
QColor color() const
Returns the color used for the shadow.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
virtual QString type() const =0
Returns the effect type.
QgsUnitTypes::RenderUnit spreadUnit() const
Returns the units used for the glow spread distance.
void setSpreadUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the glow spread distance.
void setColorType(GlowColorType colorType)
Sets the color mode to use for the glow.
const QgsMapUnitScale & spreadMapUnitScale() const
Returns the map unit scale used for the spread distance.
void setBlurLevel(const double level)
Sets blur level (radius) for the glow.
void setColorizeOn(bool colorizeOn)
Sets whether the effect should colorize a picture.
void setContrast(int contrast)
Sets the contrast modification for the effect.
double blurLevel() const
Returns the blur level (radius) for the glow.
void setSpread(const double spread)
Sets the spread distance for drawing the glow effect.
A paint effect which blurs a source picture, using a number of different blur methods.
GlowColorType colorType() const
Returns the color mode used for the glow.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
QgsImageOperation::GrayscaleMode grayscaleMode() const
Returns whether the effect will convert a picture to grayscale.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow offset distance.
Use a single color and fade the color to totally transparent.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
void setSaturation(double saturation)
Sets the saturation modification for the effect.
Use colors from a color ramp.
double spread() const
Returns the spread distance used for drawing the glow effect.
int colorizeStrength() const
Returns the strength used for colorizing a picture.
Points (e.g., for font sizes)
void setBlurUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the shadow blur level (radius).
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 saturation() const
Returns the saturation modification for the effect.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
A paint effect which alters the colors (e.g., brightness, contrast) in a source picture.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the shadow offset distance.
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units used for the shadow offset distance.
Base class for paint effects which offset, blurred shadows.
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the blur strength (radius).
void setRamp(QgsColorRamp *ramp)
Sets the color ramp for the glow.
QgsColorRamp * ramp() const
Returns the color ramp used for the glow.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
QgsUnitTypes::RenderUnit blurUnit() const
Returns the units used for the glow blur level (radius).
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
double opacity() const
Returns the opacity for the effect.
A paint effect which draws the source picture with minor or no alterations.
GrayscaleMode
Modes for converting a QImage to grayscale.
bool colorizeOn() const
Returns whether the effect will colorize a picture.
int contrast() const
Returns the contrast modification for the effect.
double blurLevel() const
Returns the blur level (radius)
void setColor(const QColor &color)
Sets the color for the shadow.
int offsetAngle() const
Returns the angle used for offsetting the shadow.
void setColor(const QColor &color)
Sets the color for the glow.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale used for the shadow offset distance.
QColor colorizeColor() const
Returns the color used for colorizing a picture.
void setDrawMode(DrawMode drawMode)
Sets the draw mode for the effect.
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the glow blur strength (radius).
int brightness() const
Returns the brightness modification for the effect.
QColor color() const
Returns the color for the glow.