QgsEffectStackPropertiesWidget class

A widget for modifying the properties of a QgsEffectStack, including adding and reordering effects within the stack.

Base classes

class QgsPanelWidget
Base class for any widget that can be shown as a inline panel.

Constructors, destructors, conversion operators

QgsEffectStackPropertiesWidget(QgsEffectStack* stack, QWidget* parent = nullptr)
QgsEffectStackPropertiesWidget constructor.

Public functions

void setPreviewPicture(const QPicture& picture)
Sets the picture to use for effect previews for the dialog.
auto stack() -> QgsEffectStack*
Returns effect stack attached to the widget.

Public slots

void addEffect()
Adds a new effect to the stack.
void changeEffect(QgsPaintEffect* newEffect)
Updates the effect stack when the currently selected effect changes properties.
void effectChanged()
Updates the widget when the selected effect changes type.
void moveEffectDown()
Moves the currently selected effect down in the stack.
void moveEffectUp()
Moves the currently selected effect up in the stack.
void removeEffect()
Removes the currently selected effect from the stack.
void updatePreview()
Updates the effect preview icon.

Protected functions

auto currentEffectItem() -> EffectItem*
Returns the currently selected effect within the stack.
void loadStack()
Refreshes the widget to reflect the current state of the stack.
void loadStack(QgsEffectStack* stack)
Refreshes the widget to reflect the current state of a specified stack.
void moveEffectByOffset(int offset)
Moves the currently selected effect within the stack by a specified offset.
void setWidget(QWidget* widget)
Sets the effect properties widget.
void updateUi()
Enables or disables widgets depending on the selected effect within the stack.

Function documentation

QgsEffectStackPropertiesWidget::QgsEffectStackPropertiesWidget(QgsEffectStack* stack, QWidget* parent = nullptr)

QgsEffectStackPropertiesWidget constructor.

Parameters
stack QgsEffectStack to modify in the widget
parent parent widget

void QgsEffectStackPropertiesWidget::setPreviewPicture(const QPicture& picture)

Sets the picture to use for effect previews for the dialog.

Parameters
picture preview picture

QgsEffectStack* QgsEffectStackPropertiesWidget::stack()

Returns effect stack attached to the widget.

Returns QgsEffectStack modified by the widget

void QgsEffectStackPropertiesWidget::changeEffect(QgsPaintEffect* newEffect) public slot

Updates the effect stack when the currently selected effect changes properties.

Parameters
newEffect new effect to replace existing effect at selected position within the stack.

EffectItem* QgsEffectStackPropertiesWidget::currentEffectItem() protected

Returns the currently selected effect within the stack.

void QgsEffectStackPropertiesWidget::loadStack(QgsEffectStack* stack) protected

Refreshes the widget to reflect the current state of a specified stack.

Parameters
stack QgsEffectStack for widget