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 mOpacityWidget->setOpacity( mEffect->
opacity() );
489 mColorBtn->setColor( mEffect->
color() );
490 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
492 if ( mEffect->
ramp() )
494 btnColorRamp->setColorRamp( mEffect->
ramp() );
501 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
503 blockSignals(
false );
506 void QgsGlowWidget::blockSignals(
const bool block )
508 mSpreadSpnBx->blockSignals( block );
509 mSpreadUnitWidget->blockSignals( block );
510 mBlurRadiusSpnBx->blockSignals( block );
511 mOpacityWidget->blockSignals( block );
512 mColorBtn->blockSignals( block );
513 mBlendCmbBx->blockSignals( block );
514 btnColorRamp->blockSignals( block );
515 radioSingleColor->blockSignals( block );
516 radioColorRamp->blockSignals( block );
517 mDrawModeComboBox->blockSignals( block );
520 void QgsGlowWidget::colorModeChanged()
527 if ( radioSingleColor->isChecked() )
534 mEffect->
setRamp( btnColorRamp->colorRamp() );
539 void QgsGlowWidget::mSpreadSpnBx_valueChanged(
double value )
548 void QgsGlowWidget::mSpreadUnitWidget_changed()
560 void QgsGlowWidget::opacityChanged(
double value )
569 void QgsGlowWidget::mColorBtn_colorChanged(
const QColor &color )
578 void QgsGlowWidget::mBlurRadiusSpnBx_valueChanged(
double value )
587 void QgsGlowWidget::mBlurUnitWidget_changed()
599 void QgsGlowWidget::mBlendCmbBx_currentIndexChanged(
int index )
610 void QgsGlowWidget::mDrawModeComboBox_currentIndexChanged(
int index )
617 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
621 void QgsGlowWidget::applyColorRamp()
645 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsTransformWidget::mDrawModeComboBox_currentIndexChanged );
646 connect( mSpinTranslateX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateX_valueChanged );
647 connect( mSpinTranslateY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateY_valueChanged );
649 connect( mReflectXCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectXCheckBox_stateChanged );
650 connect( mReflectYCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectYCheckBox_stateChanged );
651 connect( mSpinShearX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearX_valueChanged );
652 connect( mSpinShearY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearY_valueChanged );
653 connect( mSpinScaleX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleX_valueChanged );
654 connect( mSpinScaleY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleY_valueChanged );
655 connect( mRotationSpinBox, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mRotationSpinBox_valueChanged );
659 mSpinTranslateX->setClearValue( 0 );
660 mSpinTranslateY->setClearValue( 0 );
661 mRotationSpinBox->setClearValue( 0 );
662 mSpinShearX->setClearValue( 0 );
663 mSpinShearY->setClearValue( 0 );
664 mSpinScaleX->setClearValue( 100.0 );
665 mSpinScaleY->setClearValue( 100.0 );
673 if ( !effect || effect->
type() != QLatin1String(
"transform" ) )
680 void QgsTransformWidget::initGui()
687 blockSignals(
true );
689 mReflectXCheckBox->setChecked( mEffect->
reflectX() );
690 mReflectYCheckBox->setChecked( mEffect->
reflectY() );
691 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
692 mSpinTranslateX->setValue( mEffect->
translateX() );
693 mSpinTranslateY->setValue( mEffect->
translateY() );
696 mSpinShearX->setValue( mEffect->
shearX() );
697 mSpinShearY->setValue( mEffect->
shearY() );
698 mSpinScaleX->setValue( mEffect->
scaleX() * 100.0 );
699 mSpinScaleY->setValue( mEffect->
scaleY() * 100.0 );
700 mRotationSpinBox->setValue( mEffect->
rotation() );
702 blockSignals(
false );
705 void QgsTransformWidget::blockSignals(
const bool block )
707 mDrawModeComboBox->blockSignals( block );
708 mTranslateUnitWidget->blockSignals( block );
709 mSpinTranslateX->blockSignals( block );
710 mSpinTranslateY->blockSignals( block );
711 mReflectXCheckBox->blockSignals( block );
712 mReflectYCheckBox->blockSignals( block );
713 mSpinShearX->blockSignals( block );
714 mSpinShearY->blockSignals( block );
715 mSpinScaleX->blockSignals( block );
716 mSpinScaleY->blockSignals( block );
717 mRotationSpinBox->blockSignals( block );
721 void QgsTransformWidget::mDrawModeComboBox_currentIndexChanged(
int index )
728 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
732 void QgsTransformWidget::mSpinTranslateX_valueChanged(
double value )
741 void QgsTransformWidget::mSpinTranslateY_valueChanged(
double value )
750 void QgsTransformWidget::mTranslateUnitWidget_changed()
762 void QgsTransformWidget::mReflectXCheckBox_stateChanged(
int state )
771 void QgsTransformWidget::mReflectYCheckBox_stateChanged(
int state )
780 void QgsTransformWidget::mSpinShearX_valueChanged(
double value )
789 void QgsTransformWidget::mSpinShearY_valueChanged(
double value )
798 void QgsTransformWidget::mSpinScaleX_valueChanged(
double value )
807 void QgsTransformWidget::mSpinScaleY_valueChanged(
double value )
816 void QgsTransformWidget::mRotationSpinBox_valueChanged(
double value )
835 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged );
836 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged );
837 connect( mBrightnessSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mBrightnessSpinBox_valueChanged );
838 connect( mContrastSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mContrastSpinBox_valueChanged );
839 connect( mSaturationSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mSaturationSpinBox_valueChanged );
840 connect( mColorizeStrengthSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged );
841 connect( mColorizeCheck, &QCheckBox::stateChanged,
this, &QgsColorEffectWidget::mColorizeCheck_stateChanged );
843 connect( mGrayscaleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged );
845 mBrightnessSpinBox->setClearValue( 0 );
846 mContrastSpinBox->setClearValue( 0 );
847 mSaturationSpinBox->setClearValue( 0 );
848 mColorizeColorButton->setAllowOpacity(
false );
862 if ( !effect || effect->
type() != QLatin1String(
"color" ) )
869 void QgsColorEffectWidget::initGui()
876 blockSignals(
true );
878 mSliderBrightness->setValue( mEffect->
brightness() );
879 mSliderContrast->setValue( mEffect->
contrast() );
880 mSliderSaturation->setValue( ( mEffect->
saturation() - 1.0 ) * 100.0 );
881 mColorizeCheck->setChecked( mEffect->
colorizeOn() );
884 int grayscaleIdx = mGrayscaleCombo->findData( QVariant( (
int ) mEffect->
grayscaleMode() ) );
885 mGrayscaleCombo->setCurrentIndex( grayscaleIdx == -1 ? 0 : grayscaleIdx );
886 mOpacityWidget->setOpacity( mEffect->
opacity() );
887 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
888 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
889 enableColorizeControls( mEffect->
colorizeOn() );
891 blockSignals(
false );
894 void QgsColorEffectWidget::blockSignals(
const bool block )
896 mBrightnessSpinBox->blockSignals( block );
897 mContrastSpinBox->blockSignals( block );
898 mSaturationSpinBox->blockSignals( block );
899 mColorizeStrengthSpinBox->blockSignals( block );
900 mColorizeCheck->blockSignals( block );
901 mColorizeColorButton->blockSignals( block );
902 mGrayscaleCombo->blockSignals( block );
903 mOpacityWidget->blockSignals( block );
904 mBlendCmbBx->blockSignals( block );
905 mDrawModeComboBox->blockSignals( block );
908 void QgsColorEffectWidget::enableColorizeControls(
const bool enable )
910 mSliderColorizeStrength->setEnabled( enable );
911 mColorizeStrengthSpinBox->setEnabled( enable );
912 mColorizeColorButton->setEnabled( enable );
915 void QgsColorEffectWidget::opacityChanged(
double value )
924 void QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged(
int index )
935 void QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
942 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
946 void QgsColorEffectWidget::mBrightnessSpinBox_valueChanged(
int value )
955 void QgsColorEffectWidget::mContrastSpinBox_valueChanged(
int value )
964 void QgsColorEffectWidget::mSaturationSpinBox_valueChanged(
int value )
973 void QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged(
int value )
982 void QgsColorEffectWidget::mColorizeCheck_stateChanged(
int state )
988 enableColorizeControls( state == Qt::Checked );
992 void QgsColorEffectWidget::mColorizeColorButton_colorChanged(
const QColor &color )
1001 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.
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.
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.