QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsEffectStackPropertiesWidget Class Reference

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

#include <qgseffectstackpropertieswidget.h>

Inheritance diagram for QgsEffectStackPropertiesWidget:
Inheritance graph
[legend]

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.
 
- Public Slots inherited from QgsPanelWidget
void acceptPanel ()
 Accept the panel.
 
void openPanel (QgsPanelWidget *panel)
 Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event.
 

Public Member Functions

 QgsEffectStackPropertiesWidget (QgsEffectStack *stack, QWidget *parent=nullptr)
 QgsEffectStackPropertiesWidget constructor.
 
 ~QgsEffectStackPropertiesWidget () override
 
void setPreviewPicture (const QPicture &picture)
 Sets the picture to use for effect previews for the dialog.
 
QgsEffectStackstack ()
 Returns effect stack attached to the widget.
 
- Public Member Functions inherited from QgsPanelWidget
 QgsPanelWidget (QWidget *parent=nullptr)
 Base class for any widget that can be shown as a inline panel.
 
virtual bool applySizeConstraintsToStack () const
 Returns true if the size constraints and hints for the panel widget should be applied to the parent QgsPanelWidgetStack which this panel is shown in.
 
bool autoDelete ()
 The the auto delete property on the widget.
 
void connectChildPanel (QgsPanelWidget *panel)
 Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
 
void connectChildPanels (const QList< QgsPanelWidget * > &panels)
 Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user.
 
bool dockMode ()
 Returns the dock mode state.
 
virtual QMenu * menuButtonMenu ()
 Returns the menu to use for the menu button for this panel, or nullptr if no menu button is required.
 
virtual QString menuButtonTooltip () const
 Returns the (translated) tooltip text to use for the menu button for this panel.
 
QString panelTitle ()
 The title of the panel.
 
void setAutoDelete (bool autoDelete)
 The the auto delete property on the widget.
 
virtual void setDockMode (bool dockMode)
 Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
 
void setPanelTitle (const QString &panelTitle)
 Set the title of the panel when shown in the interface.
 

Protected Member Functions

EffectItem * currentEffectItem ()
 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.
 
- Protected Member Functions inherited from QgsPanelWidget
void keyPressEvent (QKeyEvent *event) override
 Overridden key press event to handle the esc event on the widget.
 

Protected Attributes

QStandardItemModel * mModel = nullptr
 
QWidget * mPresentWidget = nullptr
 
QPicture mPreviewPicture
 
QgsEffectStackmStack = nullptr
 

Additional Inherited Members

- Signals inherited from QgsPanelWidget
void panelAccepted (QgsPanelWidget *panel)
 Emitted when the panel is accepted by the user.
 
void showPanel (QgsPanelWidget *panel)
 Emit when you require a panel to be show in the interface.
 
void widgetChanged ()
 Emitted when the widget state changes.
 
- Static Public Member Functions inherited from QgsPanelWidget
static QgsPanelWidgetfindParentPanel (QWidget *widget)
 Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget.
 

Detailed Description

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

See also
QgsEffectStack
QgsEffectStackPropertiesDialog
QgsEffectStackCompactWidget

Definition at line 49 of file qgseffectstackpropertieswidget.h.

Constructor & Destructor Documentation

◆ QgsEffectStackPropertiesWidget()

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

QgsEffectStackPropertiesWidget constructor.

Parameters
stackQgsEffectStack to modify in the widget
parentparent widget

Definition at line 98 of file qgseffectstackpropertieswidget.cpp.

◆ ~QgsEffectStackPropertiesWidget()

QgsEffectStackPropertiesWidget::~QgsEffectStackPropertiesWidget ( )
overridedefault

Member Function Documentation

◆ addEffect

void QgsEffectStackPropertiesWidget::addEffect ( )
slot

Adds a new effect to the stack.

Definition at line 276 of file qgseffectstackpropertieswidget.cpp.

◆ changeEffect

void QgsEffectStackPropertiesWidget::changeEffect ( QgsPaintEffect newEffect)
slot

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

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

Definition at line 345 of file qgseffectstackpropertieswidget.cpp.

◆ currentEffectItem()

EffectItem * QgsEffectStackPropertiesWidget::currentEffectItem ( )
protected

Returns the currently selected effect within the stack.

Note
not available in Python bindings

Definition at line 238 of file qgseffectstackpropertieswidget.cpp.

◆ effectChanged

void QgsEffectStackPropertiesWidget::effectChanged ( )
slot

Updates the widget when the selected effect changes type.

Definition at line 248 of file qgseffectstackpropertieswidget.cpp.

◆ loadStack() [1/2]

void QgsEffectStackPropertiesWidget::loadStack ( )
protected

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

Definition at line 184 of file qgseffectstackpropertieswidget.cpp.

◆ loadStack() [2/2]

void QgsEffectStackPropertiesWidget::loadStack ( QgsEffectStack stack)
protected

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

Parameters
stackQgsEffectStack for widget

Definition at line 165 of file qgseffectstackpropertieswidget.cpp.

◆ moveEffectByOffset()

void QgsEffectStackPropertiesWidget::moveEffectByOffset ( int  offset)
protected

Moves the currently selected effect within the stack by a specified offset.

Definition at line 320 of file qgseffectstackpropertieswidget.cpp.

◆ moveEffectDown

void QgsEffectStackPropertiesWidget::moveEffectDown ( )
slot

Moves the currently selected effect down in the stack.

Definition at line 310 of file qgseffectstackpropertieswidget.cpp.

◆ moveEffectUp

void QgsEffectStackPropertiesWidget::moveEffectUp ( )
slot

Moves the currently selected effect up in the stack.

Definition at line 315 of file qgseffectstackpropertieswidget.cpp.

◆ removeEffect

void QgsEffectStackPropertiesWidget::removeEffect ( )
slot

Removes the currently selected effect from the stack.

Definition at line 289 of file qgseffectstackpropertieswidget.cpp.

◆ setPreviewPicture()

void QgsEffectStackPropertiesWidget::setPreviewPicture ( const QPicture &  picture)

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

Parameters
picturepreview picture

Definition at line 159 of file qgseffectstackpropertieswidget.cpp.

◆ setWidget()

void QgsEffectStackPropertiesWidget::setWidget ( QWidget *  widget)
protected

Sets the effect properties widget.

Definition at line 263 of file qgseffectstackpropertieswidget.cpp.

◆ stack()

QgsEffectStack * QgsEffectStackPropertiesWidget::stack ( )
inline

Returns effect stack attached to the widget.

Returns
QgsEffectStack modified by the widget

Definition at line 68 of file qgseffectstackpropertieswidget.h.

◆ updatePreview

void QgsEffectStackPropertiesWidget::updatePreview ( )
slot

Updates the effect preview icon.

Definition at line 207 of file qgseffectstackpropertieswidget.cpp.

◆ updateUi()

void QgsEffectStackPropertiesWidget::updateUi ( )
protected

Enables or disables widgets depending on the selected effect within the stack.

Definition at line 190 of file qgseffectstackpropertieswidget.cpp.

Member Data Documentation

◆ mModel

QStandardItemModel* QgsEffectStackPropertiesWidget::mModel = nullptr
protected

Definition at line 117 of file qgseffectstackpropertieswidget.h.

◆ mPresentWidget

QWidget* QgsEffectStackPropertiesWidget::mPresentWidget = nullptr
protected

Definition at line 118 of file qgseffectstackpropertieswidget.h.

◆ mPreviewPicture

QPicture QgsEffectStackPropertiesWidget::mPreviewPicture
protected

Definition at line 119 of file qgseffectstackpropertieswidget.h.

◆ mStack

QgsEffectStack* QgsEffectStackPropertiesWidget::mStack = nullptr
protected

Definition at line 116 of file qgseffectstackpropertieswidget.h.


The documentation for this class was generated from the following files: