QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsRendererPropertiesDialog Class Reference

#include <qgsrendererpropertiesdialog.h>

Inheritance diagram for QgsRendererPropertiesDialog:
Inheritance graph
[legend]

Public Slots

void apply ()
 Apply the changes from the dialog to the layer. More...
 
void onOK ()
 Apply and accept the changes for the dialog. More...
 
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. More...
 
void rendererChanged ()
 called when user changes renderer type More...
 

Signals

void layerVariablesChanged ()
 Emitted when expression context variables on the associated vector layers have been changed. More...
 
void showPanel (QgsPanelWidget *panel)
 Emit when you require a panel to be show in the interface. More...
 
void widgetChanged ()
 Emitted when something on the widget has changed. More...
 

Public Member Functions

 QgsRendererPropertiesDialog (QgsVectorLayer *layer, QgsStyle *style, bool embedded=false, QWidget *parent=nullptr)
 Constructor for QgsRendererPropertiesDialog. More...
 
 ~QgsRendererPropertiesDialog () override
 
void setContext (const QgsSymbolWidgetContext &context)
 Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts. More...
 
void setDockMode (bool dockMode)
 Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs. More...
 
void setMapCanvas (QgsMapCanvas *canvas)
 Sets the map canvas associated with the dialog. More...
 

Protected Member Functions

void connectValueChanged (const QList< QWidget * > &widgets, const char *slot)
 Connect the given slot to the value changed event for the set of widgets Each widget is checked for type and the common type of signal is connected to the slot. More...
 
void keyPressEvent (QKeyEvent *event) override
 

Protected Attributes

QgsRendererWidgetmActiveWidget = nullptr
 
QgsVectorLayermLayer = nullptr
 
QgsMapCanvasmMapCanvas = nullptr
 
QgsMessageBarmMessageBar = nullptr
 
QgsFeatureRequest::OrderBy mOrderBy
 
QgsPaintEffectmPaintEffect = nullptr
 
QgsStylemStyle = nullptr
 

Friends

class QgsAppScreenShots
 

Detailed Description

Definition at line 43 of file qgsrendererpropertiesdialog.h.

Constructor & Destructor Documentation

◆ QgsRendererPropertiesDialog()

QgsRendererPropertiesDialog::QgsRendererPropertiesDialog ( QgsVectorLayer layer,
QgsStyle style,
bool  embedded = false,
QWidget *  parent = nullptr 
)

Constructor for QgsRendererPropertiesDialog.

Parameters
layerassociated layer
stylestyle collection
embeddedset to true to indicate that the dialog will be embedded in another widget, rather than shown as a dialog by itself
parentparent widget

Definition at line 82 of file qgsrendererpropertiesdialog.cpp.

◆ ~QgsRendererPropertiesDialog()

QgsRendererPropertiesDialog::~QgsRendererPropertiesDialog ( )
override

Definition at line 183 of file qgsrendererpropertiesdialog.cpp.

Member Function Documentation

◆ apply

void QgsRendererPropertiesDialog::apply ( )
slot

Apply the changes from the dialog to the layer.

Definition at line 283 of file qgsrendererpropertiesdialog.cpp.

◆ connectValueChanged()

void QgsRendererPropertiesDialog::connectValueChanged ( const QList< QWidget * > &  widgets,
const char *  slot 
)
protected

Connect the given slot to the value changed event for the set of widgets Each widget is checked for type and the common type of signal is connected to the slot.

Parameters
widgetsThe list of widgets to check.
slotThe slot to connect to the signals.

Definition at line 134 of file qgsrendererpropertiesdialog.cpp.

◆ keyPressEvent()

void QgsRendererPropertiesDialog::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 417 of file qgsrendererpropertiesdialog.cpp.

◆ layerVariablesChanged

void QgsRendererPropertiesDialog::layerVariablesChanged ( )
signal

Emitted when expression context variables on the associated vector layers have been changed.

Will request the parent dialog to re-synchronize with the variables.

◆ onOK

void QgsRendererPropertiesDialog::onOK ( )
slot

Apply and accept the changes for the dialog.

Definition at line 311 of file qgsrendererpropertiesdialog.cpp.

◆ openPanel

void QgsRendererPropertiesDialog::openPanel ( QgsPanelWidget panel)
slot

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.

If dock mode is false this method will open a dialog and block the user.

Parameters
panelThe panel widget to open.

Definition at line 317 of file qgsrendererpropertiesdialog.cpp.

◆ rendererChanged

void QgsRendererPropertiesDialog::rendererChanged ( )
slot

called when user changes renderer type

Definition at line 218 of file qgsrendererpropertiesdialog.cpp.

◆ setContext()

void QgsRendererPropertiesDialog::setContext ( const QgsSymbolWidgetContext context)

Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts.

Since
QGIS 3.6

Definition at line 199 of file qgsrendererpropertiesdialog.cpp.

◆ setDockMode()

void QgsRendererPropertiesDialog::setDockMode ( bool  dockMode)

Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.

Parameters
dockModetrue to enable dock mode.

Definition at line 209 of file qgsrendererpropertiesdialog.cpp.

◆ setMapCanvas()

void QgsRendererPropertiesDialog::setMapCanvas ( QgsMapCanvas canvas)

Sets the map canvas associated with the dialog.

This allows the widget to retrieve the current map scale and other properties from the canvas.

Parameters
canvasmap canvas
Since
QGIS 2.12

Definition at line 188 of file qgsrendererpropertiesdialog.cpp.

◆ showPanel

void QgsRendererPropertiesDialog::showPanel ( QgsPanelWidget panel)
signal

Emit when you require a panel to be show in the interface.

Parameters
panelThe panel widget to show.
Note
If you are connected to this signal you should also connect given panels showPanel signal as they can be nested.

◆ widgetChanged

void QgsRendererPropertiesDialog::widgetChanged ( )
signal

Emitted when something on the widget has changed.

All widgets will fire this event to notify of an internal change.

Friends And Related Function Documentation

◆ QgsAppScreenShots

friend class QgsAppScreenShots
friend

Definition at line 166 of file qgsrendererpropertiesdialog.h.

Member Data Documentation

◆ mActiveWidget

QgsRendererWidget* QgsRendererPropertiesDialog::mActiveWidget = nullptr
protected

Definition at line 154 of file qgsrendererpropertiesdialog.h.

◆ mLayer

QgsVectorLayer* QgsRendererPropertiesDialog::mLayer = nullptr
protected

Definition at line 151 of file qgsrendererpropertiesdialog.h.

◆ mMapCanvas

QgsMapCanvas* QgsRendererPropertiesDialog::mMapCanvas = nullptr
protected

Definition at line 158 of file qgsrendererpropertiesdialog.h.

◆ mMessageBar

QgsMessageBar* QgsRendererPropertiesDialog::mMessageBar = nullptr
protected

Definition at line 159 of file qgsrendererpropertiesdialog.h.

◆ mOrderBy

QgsFeatureRequest::OrderBy QgsRendererPropertiesDialog::mOrderBy
protected

Definition at line 161 of file qgsrendererpropertiesdialog.h.

◆ mPaintEffect

QgsPaintEffect* QgsRendererPropertiesDialog::mPaintEffect = nullptr
protected

Definition at line 156 of file qgsrendererpropertiesdialog.h.

◆ mStyle

QgsStyle* QgsRendererPropertiesDialog::mStyle = nullptr
protected

Definition at line 152 of file qgsrendererpropertiesdialog.h.


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