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" ) )
55void QgsDrawSourceWidget::initGui()
64 mOpacityWidget->setOpacity( mEffect->
opacity() );
65 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
66 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
68 blockSignals(
false );
71void QgsDrawSourceWidget::blockSignals(
const bool block )
73 mOpacityWidget->blockSignals( block );
74 mBlendCmbBx->blockSignals( block );
75 mDrawModeComboBox->blockSignals( block );
78void QgsDrawSourceWidget::opacityChanged(
double value )
87void QgsDrawSourceWidget::mDrawModeComboBox_currentIndexChanged(
int index )
94 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
98void 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" ) )
145void 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 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
163 blockSignals(
false );
166void QgsBlurWidget::blockSignals(
const bool block )
168 mBlurTypeCombo->blockSignals( block );
169 mBlurStrengthSpnBx->blockSignals( block );
170 mOpacityWidget->blockSignals( block );
171 mBlendCmbBx->blockSignals( block );
172 mDrawModeComboBox->blockSignals( block );
175void QgsBlurWidget::mBlurTypeCombo_currentIndexChanged(
int index )
187 mBlurStrengthSpnBx->setMaximum( 16 );
190 mBlurStrengthSpnBx->setMaximum( 200 );
197void QgsBlurWidget::mBlurStrengthSpnBx_valueChanged(
double value )
206void QgsBlurWidget::mBlurUnitWidget_changed()
218void QgsBlurWidget::opacityChanged(
double value )
227void QgsBlurWidget::mDrawModeComboBox_currentIndexChanged(
int index )
234 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
238void QgsBlurWidget::mBlendCmbBx_currentIndexChanged(
int index )
259 connect( mShadowOffsetAngleSpnBx,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged );
260 connect( mShadowOffsetAngleDial, &QDial::valueChanged,
this, &QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged );
261 connect( mShadowOffsetSpnBx,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged );
264 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged );
265 connect( mShadowBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged );
266 connect( mShadowRadiuSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged );
269 mShadowColorBtn->setAllowOpacity(
false );
270 mShadowColorBtn->setColorDialogTitle( tr(
"Select Shadow Color" ) );
271 mShadowColorBtn->setContext( QStringLiteral(
"symbology" ) );
272 mShadowOffsetAngleSpnBx->setClearValue( 0 );
286 if ( !effect || ( effect->
type() != QLatin1String(
"dropShadow" ) && effect->
type() != QLatin1String(
"innerShadow" ) ) )
293void QgsShadowEffectWidget::initGui()
300 blockSignals(
true );
302 mShadowOffsetAngleSpnBx->setValue( mEffect->
offsetAngle() );
303 mShadowOffsetAngleDial->setValue( mEffect->
offsetAngle() );
305 mOffsetUnitWidget->setUnit( mEffect->
offsetUnit() );
307 mShadowRadiuSpnBx->setValue( mEffect->
blurLevel() );
308 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
310 mOpacityWidget->setOpacity( mEffect->
opacity() );
311 mShadowColorBtn->setColor( mEffect->
color() );
312 mShadowBlendCmbBx->setBlendMode( mEffect->
blendMode() );
313 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
315 blockSignals(
false );
318void QgsShadowEffectWidget::blockSignals(
const bool block )
320 mShadowOffsetAngleSpnBx->blockSignals( block );
321 mShadowOffsetAngleDial->blockSignals( block );
322 mShadowOffsetSpnBx->blockSignals( block );
323 mOffsetUnitWidget->blockSignals( block );
324 mShadowRadiuSpnBx->blockSignals( block );
325 mBlurUnitWidget->blockSignals( block );
326 mOpacityWidget->blockSignals( block );
327 mShadowColorBtn->blockSignals( block );
328 mShadowBlendCmbBx->blockSignals( block );
329 mDrawModeComboBox->blockSignals( block );
332void QgsShadowEffectWidget::mShadowOffsetAngleSpnBx_valueChanged(
int value )
334 mShadowOffsetAngleDial->blockSignals(
true );
335 mShadowOffsetAngleDial->setValue( value );
336 mShadowOffsetAngleDial->blockSignals(
false );
345void QgsShadowEffectWidget::mShadowOffsetAngleDial_valueChanged(
int value )
347 mShadowOffsetAngleSpnBx->setValue( value );
350void QgsShadowEffectWidget::mShadowOffsetSpnBx_valueChanged(
double value )
359void QgsShadowEffectWidget::mOffsetUnitWidget_changed()
371void QgsShadowEffectWidget::opacityChanged(
double value )
380void QgsShadowEffectWidget::mShadowColorBtn_colorChanged(
const QColor &color )
389void QgsShadowEffectWidget::mShadowRadiuSpnBx_valueChanged(
double value )
398void QgsShadowEffectWidget::mBlurUnitWidget_changed()
410void QgsShadowEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
417 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
421void QgsShadowEffectWidget::mShadowBlendCmbBx_currentIndexChanged(
int index )
428 mEffect->
setBlendMode( mShadowBlendCmbBx->blendMode() );
443 connect( mSpreadSpnBx,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mSpreadSpnBx_valueChanged );
446 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mBlendCmbBx_currentIndexChanged );
447 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGlowWidget::mDrawModeComboBox_currentIndexChanged );
448 connect( mBlurRadiusSpnBx,
static_cast< void ( QDoubleSpinBox::* )(
double )
>( &QDoubleSpinBox::valueChanged ),
this, &QgsGlowWidget::mBlurRadiusSpnBx_valueChanged );
451 mColorBtn->setAllowOpacity(
false );
452 mColorBtn->setColorDialogTitle( tr(
"Select Glow Color" ) );
453 mColorBtn->setContext( QStringLiteral(
"symbology" ) );
460 btnColorRamp->setShowGradientOnly(
true );
465 connect( radioSingleColor, &QAbstractButton::toggled,
this, &QgsGlowWidget::colorModeChanged );
471 if ( !effect || ( effect->
type() != QLatin1String(
"outerGlow" ) && effect->
type() != QLatin1String(
"innerGlow" ) ) )
478void QgsGlowWidget::initGui()
485 blockSignals(
true );
487 mSpreadSpnBx->setValue( mEffect->
spread() );
488 mSpreadUnitWidget->setUnit( mEffect->
spreadUnit() );
490 mBlurRadiusSpnBx->setValue( mEffect->
blurLevel() );
491 mBlurUnitWidget->setUnit( mEffect->
blurUnit() );
493 mOpacityWidget->setOpacity( mEffect->
opacity() );
494 mColorBtn->setColor( mEffect->
color() );
495 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
497 if ( mEffect->
ramp() )
499 btnColorRamp->setColorRamp( mEffect->
ramp() );
506 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
508 blockSignals(
false );
511void QgsGlowWidget::blockSignals(
const bool block )
513 mSpreadSpnBx->blockSignals( block );
514 mSpreadUnitWidget->blockSignals( block );
515 mBlurRadiusSpnBx->blockSignals( block );
516 mOpacityWidget->blockSignals( block );
517 mColorBtn->blockSignals( block );
518 mBlendCmbBx->blockSignals( block );
519 btnColorRamp->blockSignals( block );
520 radioSingleColor->blockSignals( block );
521 radioColorRamp->blockSignals( block );
522 mDrawModeComboBox->blockSignals( block );
525void QgsGlowWidget::colorModeChanged()
532 if ( radioSingleColor->isChecked() )
539 mEffect->
setRamp( btnColorRamp->colorRamp() );
544void QgsGlowWidget::mSpreadSpnBx_valueChanged(
double value )
553void QgsGlowWidget::mSpreadUnitWidget_changed()
565void QgsGlowWidget::opacityChanged(
double value )
574void QgsGlowWidget::mColorBtn_colorChanged(
const QColor &color )
583void QgsGlowWidget::mBlurRadiusSpnBx_valueChanged(
double value )
592void QgsGlowWidget::mBlurUnitWidget_changed()
604void QgsGlowWidget::mBlendCmbBx_currentIndexChanged(
int index )
615void QgsGlowWidget::mDrawModeComboBox_currentIndexChanged(
int index )
622 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
626void QgsGlowWidget::applyColorRamp()
650 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsTransformWidget::mDrawModeComboBox_currentIndexChanged );
651 connect( mSpinTranslateX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateX_valueChanged );
652 connect( mSpinTranslateY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinTranslateY_valueChanged );
654 connect( mReflectXCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectXCheckBox_stateChanged );
655 connect( mReflectYCheckBox, &QCheckBox::stateChanged,
this, &QgsTransformWidget::mReflectYCheckBox_stateChanged );
656 connect( mSpinShearX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearX_valueChanged );
657 connect( mSpinShearY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinShearY_valueChanged );
658 connect( mSpinScaleX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleX_valueChanged );
659 connect( mSpinScaleY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mSpinScaleY_valueChanged );
660 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsTransformWidget::mRotationSpinBox_valueChanged );
664 mSpinTranslateX->setClearValue( 0 );
665 mSpinTranslateY->setClearValue( 0 );
666 mRotationSpinBox->setClearValue( 0 );
667 mSpinShearX->setClearValue( 0 );
668 mSpinShearY->setClearValue( 0 );
669 mSpinScaleX->setClearValue( 100.0 );
670 mSpinScaleY->setClearValue( 100.0 );
678 if ( !effect || effect->
type() != QLatin1String(
"transform" ) )
685void QgsTransformWidget::initGui()
692 blockSignals(
true );
694 mReflectXCheckBox->setChecked( mEffect->
reflectX() );
695 mReflectYCheckBox->setChecked( mEffect->
reflectY() );
696 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
697 mSpinTranslateX->setValue( mEffect->
translateX() );
698 mSpinTranslateY->setValue( mEffect->
translateY() );
701 mSpinShearX->setValue( mEffect->
shearX() );
702 mSpinShearY->setValue( mEffect->
shearY() );
703 mSpinScaleX->setValue( mEffect->
scaleX() * 100.0 );
704 mSpinScaleY->setValue( mEffect->
scaleY() * 100.0 );
705 mRotationSpinBox->setValue( mEffect->
rotation() );
707 blockSignals(
false );
710void QgsTransformWidget::blockSignals(
const bool block )
712 mDrawModeComboBox->blockSignals( block );
713 mTranslateUnitWidget->blockSignals( block );
714 mSpinTranslateX->blockSignals( block );
715 mSpinTranslateY->blockSignals( block );
716 mReflectXCheckBox->blockSignals( block );
717 mReflectYCheckBox->blockSignals( block );
718 mSpinShearX->blockSignals( block );
719 mSpinShearY->blockSignals( block );
720 mSpinScaleX->blockSignals( block );
721 mSpinScaleY->blockSignals( block );
722 mRotationSpinBox->blockSignals( block );
726void QgsTransformWidget::mDrawModeComboBox_currentIndexChanged(
int index )
733 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
737void QgsTransformWidget::mSpinTranslateX_valueChanged(
double value )
746void QgsTransformWidget::mSpinTranslateY_valueChanged(
double value )
755void QgsTransformWidget::mTranslateUnitWidget_changed()
767void QgsTransformWidget::mReflectXCheckBox_stateChanged(
int state )
776void QgsTransformWidget::mReflectYCheckBox_stateChanged(
int state )
785void QgsTransformWidget::mSpinShearX_valueChanged(
double value )
794void QgsTransformWidget::mSpinShearY_valueChanged(
double value )
803void QgsTransformWidget::mSpinScaleX_valueChanged(
double value )
812void QgsTransformWidget::mSpinScaleY_valueChanged(
double value )
821void QgsTransformWidget::mRotationSpinBox_valueChanged(
double value )
840 connect( mBlendCmbBx,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged );
841 connect( mDrawModeComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged );
842 connect( mBrightnessSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mBrightnessSpinBox_valueChanged );
843 connect( mContrastSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mContrastSpinBox_valueChanged );
844 connect( mSaturationSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mSaturationSpinBox_valueChanged );
845 connect( mColorizeStrengthSpinBox,
static_cast< void ( QSpinBox::* )(
int )
>( &QSpinBox::valueChanged ),
this, &QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged );
846 connect( mColorizeCheck, &QCheckBox::stateChanged,
this, &QgsColorEffectWidget::mColorizeCheck_stateChanged );
848 connect( mGrayscaleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsColorEffectWidget::mGrayscaleCombo_currentIndexChanged );
850 mBrightnessSpinBox->setClearValue( 0 );
851 mContrastSpinBox->setClearValue( 0 );
852 mSaturationSpinBox->setClearValue( 0 );
853 mColorizeStrengthSpinBox->setClearValue( 100 );
854 mColorizeColorButton->setAllowOpacity(
false );
868 if ( !effect || effect->
type() != QLatin1String(
"color" ) )
875void QgsColorEffectWidget::initGui()
882 blockSignals(
true );
884 mSliderBrightness->setValue( mEffect->
brightness() );
885 mSliderContrast->setValue( mEffect->
contrast() );
886 mSliderSaturation->setValue( ( mEffect->
saturation() - 1.0 ) * 100.0 );
887 mColorizeCheck->setChecked( mEffect->
colorizeOn() );
890 const int grayscaleIdx = mGrayscaleCombo->findData( QVariant( (
int ) mEffect->
grayscaleMode() ) );
891 mGrayscaleCombo->setCurrentIndex( grayscaleIdx == -1 ? 0 : grayscaleIdx );
892 mOpacityWidget->setOpacity( mEffect->
opacity() );
893 mBlendCmbBx->setBlendMode( mEffect->
blendMode() );
894 mDrawModeComboBox->setDrawMode( mEffect->
drawMode() );
895 enableColorizeControls( mEffect->
colorizeOn() );
897 blockSignals(
false );
900void QgsColorEffectWidget::blockSignals(
const bool block )
902 mBrightnessSpinBox->blockSignals( block );
903 mContrastSpinBox->blockSignals( block );
904 mSaturationSpinBox->blockSignals( block );
905 mColorizeStrengthSpinBox->blockSignals( block );
906 mColorizeCheck->blockSignals( block );
907 mColorizeColorButton->blockSignals( block );
908 mGrayscaleCombo->blockSignals( block );
909 mOpacityWidget->blockSignals( block );
910 mBlendCmbBx->blockSignals( block );
911 mDrawModeComboBox->blockSignals( block );
914void QgsColorEffectWidget::enableColorizeControls(
const bool enable )
916 mSliderColorizeStrength->setEnabled( enable );
917 mColorizeStrengthSpinBox->setEnabled( enable );
918 mColorizeColorButton->setEnabled( enable );
921void QgsColorEffectWidget::opacityChanged(
double value )
930void QgsColorEffectWidget::mBlendCmbBx_currentIndexChanged(
int index )
941void QgsColorEffectWidget::mDrawModeComboBox_currentIndexChanged(
int index )
948 mEffect->
setDrawMode( mDrawModeComboBox->drawMode() );
952void QgsColorEffectWidget::mBrightnessSpinBox_valueChanged(
int value )
961void QgsColorEffectWidget::mContrastSpinBox_valueChanged(
int value )
970void QgsColorEffectWidget::mSaturationSpinBox_valueChanged(
int value )
979void QgsColorEffectWidget::mColorizeStrengthSpinBox_valueChanged(
int value )
988void QgsColorEffectWidget::mColorizeCheck_stateChanged(
int state )
994 enableColorizeControls( state == Qt::Checked );
998void QgsColorEffectWidget::mColorizeColorButton_colorChanged(
const QColor &color )
1007void 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.