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 ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsBlurWidget::mBlurStrengthSpnBx_valueChanged );
121 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mDrawModeComboBox_currentIndexChanged );
122 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsBlurWidget::mBlendCmbBx_currentIndexChanged );
134 if ( !effect || effect->
type() != QLatin1String(
"blur" ) )
141 void QgsBlurWidget::initGui()
148 blockSignals(
true );
150 mBlurTypeCombo->setCurrentIndex( mBlurTypeCombo->findData( mEffect->
blurMethod() ) );
151 mBlurStrengthSpnBx->setValue( mEffect->
blurLevel() );
152 mOpacityWidget->setOpacity( mEffect->
opacity() );
153 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
154 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
156 blockSignals(
false );
159 void QgsBlurWidget::blockSignals(
const bool block )
161 mBlurTypeCombo->blockSignals( block );
162 mBlurStrengthSpnBx->blockSignals( block );
163 mOpacityWidget->blockSignals( block );
164 mBlendCmbBx->blockSignals( block );
165 mDrawModeComboBox->blockSignals( block );
168 void QgsBlurWidget::mBlurTypeCombo_currentIndexChanged(
int index )
180 mBlurStrengthSpnBx->setMaximum( 16 );
183 mBlurStrengthSpnBx->setMaximum( 200 );
190 void QgsBlurWidget::mBlurStrengthSpnBx_valueChanged(
int value )
199 void QgsBlurWidget::opacityChanged(
double value )
208 void QgsBlurWidget::mDrawModeComboBox_currentIndexChanged(
int index )
215 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
219 void QgsBlurWidget::mBlendCmbBx_currentIndexChanged(
int index )
240 connect( mShadowOffsetAngleSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged );
241 connect( mShadowOffsetAngleDial, &QDial::valueChanged,
this, &QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged );
242 connect( mShadowOffsetSpnBx, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged );
245 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged );
246 connect( mShadowBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged );
247 connect( mShadowRadiuSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged );
249 mShadowColorBtn->setAllowOpacity(
false );
250 mShadowColorBtn->setColorDialogTitle( tr(
"Select Shadow Color" ) );
251 mShadowColorBtn->setContext( QStringLiteral(
"symbology" ) );
252 mShadowOffsetAngleSpnBx->setClearValue( 0 );
264 if ( !effect || ( effect->
type() != QLatin1String(
"dropShadow" ) && effect->
type() != QLatin1String(
"innerShadow" ) ) )
271 void QgsShadowEffectWidget::initGui()
278 blockSignals(
true );
280 mShadowOffsetAngleSpnBx->setValue( mEffect->
offsetAngle() );
281 mShadowOffsetAngleDial->setValue( mEffect->
offsetAngle() );
283 mOffsetUnitWidget->setUnit( mEffect->
offsetUnit() );
285 mShadowRadiuSpnBx->setValue( mEffect->
blurLevel() );
286 mOpacityWidget->setOpacity( mEffect->
opacity() );
287 mShadowColorBtn->setColor( mEffect->
color() );
288 mShadowBlendCmbBx->setBlendMode( mEffect->
blendMode() );
289 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
291 blockSignals(
false );
294 void QgsShadowEffectWidget::blockSignals(
const bool block )
296 mShadowOffsetAngleSpnBx->blockSignals( block );
297 mShadowOffsetAngleDial->blockSignals( block );
298 mShadowOffsetSpnBx->blockSignals( block );
299 mOffsetUnitWidget->blockSignals( block );
300 mShadowRadiuSpnBx->blockSignals( block );
301 mOpacityWidget->blockSignals( block );
302 mShadowColorBtn->blockSignals( block );
303 mShadowBlendCmbBx->blockSignals( block );
304 mDrawModeComboBox->blockSignals( block );
307 void QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged(
int value )
309 mShadowOffsetAngleDial->blockSignals(
true );
310 mShadowOffsetAngleDial->setValue( value );
311 mShadowOffsetAngleDial->blockSignals(
false );
320 void QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged(
int value )
322 mShadowOffsetAngleSpnBx->setValue( value );
325 void QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged(
double value )
334 void QgsShadowEffectWidget::mOffsetUnitWidget_changed()
346 void QgsShadowEffectWidget::opacityChanged(
double value )
355 void QgsShadowEffectWidget::mShadowColorBtn_colorChanged(
const QColor &color )
364 void QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged(
int value )
373 void QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
380 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
384 void QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged(
int index )
391 mEffect->
setBlendMode( mShadowBlendCmbBx->blendMode() );
406 connect( mSpreadSpnBx, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mSpreadSpnBx_valueChanged );
409 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mBlendCmbBx_currentIndexChanged );
410 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mDrawModeComboBox_currentIndexChanged );
411 connect( mBlurRadiusSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsGlowWidget::mBlurRadiusSpnBx_valueChanged );
413 mColorBtn->setAllowOpacity(
false );
414 mColorBtn->setColorDialogTitle( tr(
"Select Glow Color" ) );
415 mColorBtn->setContext( QStringLiteral(
"symbology" ) );
420 btnColorRamp->setShowGradientOnly(
true );
425 connect( radioSingleColor, &QAbstractButton::toggled,
this, &QgsGlowWidget::colorModeChanged );
431 if ( !effect || ( effect->
type() != QLatin1String(
"outerGlow" ) && effect->
type() != QLatin1String(
"innerGlow" ) ) )
438 void QgsGlowWidget::initGui()
445 blockSignals(
true );
447 mSpreadSpnBx->setValue( mEffect->
spread() );
448 mSpreadUnitWidget->setUnit( mEffect->
spreadUnit() );
450 mBlurRadiusSpnBx->setValue( mEffect->
blurLevel() );
451 mOpacityWidget->setOpacity( mEffect->
opacity() );
452 mColorBtn->setColor( mEffect->
color() );
453 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
455 if ( mEffect->
ramp() )
457 btnColorRamp->setColorRamp( mEffect->
ramp() );
464 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
466 blockSignals(
false );
469 void QgsGlowWidget::blockSignals(
const bool block )
471 mSpreadSpnBx->blockSignals( block );
472 mSpreadUnitWidget->blockSignals( block );
473 mBlurRadiusSpnBx->blockSignals( block );
474 mOpacityWidget->blockSignals( block );
475 mColorBtn->blockSignals( block );
476 mBlendCmbBx->blockSignals( block );
477 btnColorRamp->blockSignals( block );
478 radioSingleColor->blockSignals( block );
479 radioColorRamp->blockSignals( block );
480 mDrawModeComboBox->blockSignals( block );
483 void QgsGlowWidget::colorModeChanged()
490 if ( radioSingleColor->isChecked() )
497 mEffect->
setRamp( btnColorRamp->colorRamp() );
502 void QgsGlowWidget::mSpreadSpnBx_valueChanged(
double value )
511 void QgsGlowWidget::mSpreadUnitWidget_changed()
523 void QgsGlowWidget::opacityChanged(
double value )
532 void QgsGlowWidget::mColorBtn_colorChanged(
const QColor &color )
541 void QgsGlowWidget::mBlurRadiusSpnBx_valueChanged(
int value )
550 void QgsGlowWidget::mBlendCmbBx_currentIndexChanged(
int index )
561 void QgsGlowWidget::mDrawModeComboBox_currentIndexChanged(
int index )
568 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
572 void QgsGlowWidget::applyColorRamp()
596 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsTransformWidget::mDrawModeComboBox_currentIndexChanged );
597 connect( mSpinTranslateX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateX_valueChanged );
598 connect( mSpinTranslateY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateY_valueChanged );
600 connect( mReflectXCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectXCheckBox_stateChanged );
601 connect( mReflectYCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectYCheckBox_stateChanged );
602 connect( mSpinShearX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearX_valueChanged );
603 connect( mSpinShearY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearY_valueChanged );
604 connect( mSpinScaleX, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleX_valueChanged );
605 connect( mSpinScaleY, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleY_valueChanged );
606 connect( mRotationSpinBox, static_cast <
void ( QDoubleSpinBox::* )(
double ) > ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mRotationSpinBox_valueChanged );
610 mSpinTranslateX->setClearValue( 0 );
611 mSpinTranslateY->setClearValue( 0 );
612 mRotationSpinBox->setClearValue( 0 );
613 mSpinShearX->setClearValue( 0 );
614 mSpinShearY->setClearValue( 0 );
615 mSpinScaleX->setClearValue( 100.0 );
616 mSpinScaleY->setClearValue( 100.0 );
624 if ( !effect || effect->
type() != QLatin1String(
"transform" ) )
631 void QgsTransformWidget::initGui()
638 blockSignals(
true );
640 mReflectXCheckBox->setChecked( mEffect->
reflectX() );
641 mReflectYCheckBox->setChecked( mEffect->
reflectY() );
642 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
643 mSpinTranslateX->setValue( mEffect->
translateX() );
644 mSpinTranslateY->setValue( mEffect->
translateY() );
647 mSpinShearX->setValue( mEffect->
shearX() );
648 mSpinShearY->setValue( mEffect->
shearY() );
649 mSpinScaleX->setValue( mEffect->
scaleX() * 100.0 );
650 mSpinScaleY->setValue( mEffect->
scaleY() * 100.0 );
651 mRotationSpinBox->setValue( mEffect->
rotation() );
653 blockSignals(
false );
656 void QgsTransformWidget::blockSignals(
const bool block )
658 mDrawModeComboBox->blockSignals( block );
659 mTranslateUnitWidget->blockSignals( block );
660 mSpinTranslateX->blockSignals( block );
661 mSpinTranslateY->blockSignals( block );
662 mReflectXCheckBox->blockSignals( block );
663 mReflectYCheckBox->blockSignals( block );
664 mSpinShearX->blockSignals( block );
665 mSpinShearY->blockSignals( block );
666 mSpinScaleX->blockSignals( block );
667 mSpinScaleY->blockSignals( block );
668 mRotationSpinBox->blockSignals( block );
672 void QgsTransformWidget::mDrawModeComboBox_currentIndexChanged(
int index )
679 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
683 void QgsTransformWidget::mSpinTranslateX_valueChanged(
double value )
692 void QgsTransformWidget::mSpinTranslateY_valueChanged(
double value )
701 void QgsTransformWidget::mTranslateUnitWidget_changed()
713 void QgsTransformWidget::mReflectXCheckBox_stateChanged(
int state )
722 void QgsTransformWidget::mReflectYCheckBox_stateChanged(
int state )
731 void QgsTransformWidget::mSpinShearX_valueChanged(
double value )
740 void QgsTransformWidget::mSpinShearY_valueChanged(
double value )
749 void QgsTransformWidget::mSpinScaleX_valueChanged(
double value )
758 void QgsTransformWidget::mSpinScaleY_valueChanged(
double value )
767 void QgsTransformWidget::mRotationSpinBox_valueChanged(
double value )
786 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged );
787 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged );
788 connect( mBrightnessSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mBrightnessSpinBox_valueChanged );
789 connect( mContrastSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mContrastSpinBox_valueChanged );
790 connect( mSaturationSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mSaturationSpinBox_valueChanged );
791 connect( mColorizeStrengthSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged );
792 connect( mColorizeCheck, &QCheckBox::stateChanged,
this, &QgsColorEffectWidget::mColorizeCheck_stateChanged );
794 connect( mGrayscaleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged );
796 mBrightnessSpinBox->setClearValue( 0 );
797 mContrastSpinBox->setClearValue( 0 );
798 mSaturationSpinBox->setClearValue( 0 );
799 mColorizeColorButton->setAllowOpacity(
false );
813 if ( !effect || effect->
type() != QLatin1String(
"color" ) )
820 void QgsColorEffectWidget::initGui()
827 blockSignals(
true );
829 mSliderBrightness->setValue( mEffect->
brightness() );
830 mSliderContrast->setValue( mEffect->
contrast() );
831 mSliderSaturation->setValue( ( mEffect->
saturation() - 1.0 ) * 100.0 );
832 mColorizeCheck->setChecked( mEffect->
colorizeOn() );
835 int grayscaleIdx = mGrayscaleCombo->findData( QVariant( (
int ) mEffect->
grayscaleMode() ) );
836 mGrayscaleCombo->setCurrentIndex( grayscaleIdx == -1 ? 0 : grayscaleIdx );
837 mOpacityWidget->setOpacity( mEffect->
opacity() );
838 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
839 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
840 enableColorizeControls( mEffect->
colorizeOn() );
842 blockSignals(
false );
845 void QgsColorEffectWidget::blockSignals(
const bool block )
847 mBrightnessSpinBox->blockSignals( block );
848 mContrastSpinBox->blockSignals( block );
849 mSaturationSpinBox->blockSignals( block );
850 mColorizeStrengthSpinBox->blockSignals( block );
851 mColorizeCheck->blockSignals( block );
852 mColorizeColorButton->blockSignals( block );
853 mGrayscaleCombo->blockSignals( block );
854 mOpacityWidget->blockSignals( block );
855 mBlendCmbBx->blockSignals( block );
856 mDrawModeComboBox->blockSignals( block );
859 void QgsColorEffectWidget::enableColorizeControls(
const bool enable )
861 mSliderColorizeStrength->setEnabled( enable );
862 mColorizeStrengthSpinBox->setEnabled( enable );
863 mColorizeColorButton->setEnabled( enable );
866 void QgsColorEffectWidget::opacityChanged(
double value )
875 void QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged(
int index )
886 void QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
893 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
897 void QgsColorEffectWidget::mBrightnessSpinBox_valueChanged(
int value )
906 void QgsColorEffectWidget::mContrastSpinBox_valueChanged(
int value )
915 void QgsColorEffectWidget::mSaturationSpinBox_valueChanged(
int value )
924 void QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged(
int value )
933 void QgsColorEffectWidget::mColorizeCheck_stateChanged(
int state )
939 enableColorizeControls( state == Qt::Checked );
943 void QgsColorEffectWidget::mColorizeColorButton_colorChanged(
const QColor &color )
952 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.
double opacity() const
Returns the opacity for the effect.
void setOffsetAngle(const int angle)
Sets the angle 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.
Keep the lightness of the color, drops the saturation.
Abstract base class for color ramps.
void setColorizeColor(const QColor &colorizeColor)
Sets the color used for colorizing a picture.
double offsetDistance() const
Returns the distance used for offsetting the shadow.
Base class for visual effects which can be applied to QPicture drawings.
void setDrawMode(const DrawMode drawMode)
Sets the draw mode for the effect.
void setColorizeStrength(int colorizeStrength)
Sets the strength for colorizing a picture.
Gaussian blur, a slower but high quality blur. Blur level values are the distance in pixels for the b...
void setBlurLevel(const int level)
Sets blur level (strength) for the shadow.
double opacity() const
Returns the opacity for the effect.
DrawMode drawMode() const
Returns the draw mode for the effect.
void setBlurLevel(const int level)
Sets blur level (strength)
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 setSpreadMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the spread distance.
void setBlurLevel(const int level)
Sets blur level (strength) for the glow.
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.
int blurLevel() const
Returns the blur level (strength)
points (e.g., for font sizes)
const QgsMapUnitScale & spreadMapUnitScale() const
Returns the map unit scale used for the spread distance.
void setColorizeOn(bool colorizeOn)
Sets whether the effect should colorize a picture.
void setContrast(int contrast)
Sets the contrast modification for the effect.
void setSpread(const double spread)
Sets the spread distance for drawing the glow effect.
int blurLevel() const
Returns the blur level (strength) for the shadow.
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.
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 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.
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.
int brightness() const
Returns the brightness modification for the effect.
int blurLevel() const
Returns the blur level (strength) for the glow.
QColor color() const
Returns the color for the glow.