QGIS API Documentation 4.3.0-Master (bf28115e945)
Loading...
Searching...
No Matches
QgsSymbolSelectorDialog Class Reference

A dialog that can be used to select and build a symbol. More...

#include <qgssymbolselectordialog.h>

Inheritance diagram for QgsSymbolSelectorDialog:

Public Slots

void addLayer ()
void changeLayer (QgsSymbolLayer *layer)
 Alters tree and sets proper widget when Layer Type is changed.
void duplicateLayer ()
 Duplicates the current symbol layer and places the duplicated layer above the current symbol layer.
void layerChanged ()
void lockLayer ()
void moveLayerDown ()
void moveLayerUp ()
void removeLayer ()
void symbolChanged ()
 Slot to update tree when a new symbol from style.
void updateLayerPreview ()
void updatePreview ()

Signals

void symbolModified ()
 Emitted when the symbol defined in the dialog is modified.

Public Member Functions

 QgsSymbolSelectorDialog (QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent=nullptr, bool embedded=false)
 Constructor for QgsSymbolSelectorDialog.
QMenu * advancedMenu ()
 Returns menu for "advanced" button - create it if doesn't exist and show the advanced button.
QDialogButtonBox * buttonBox () const
 Returns a reference to the dialog's button box.
QgsSymbolWidgetContext context () const
 Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
void loadSymbol (QgsSymbol *symbol, SymbolLayerItem *parent=nullptr)
 Loads the given symbol into the widget.
void setContext (const QgsSymbolWidgetContext &context)
 Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
QgsSymbolsymbol ()
 Returns the symbol that is currently active in the widget.

Protected Member Functions

void keyPressEvent (QKeyEvent *e) override

Detailed Description

A dialog that can be used to select and build a symbol.

Definition at line 291 of file qgssymbolselectordialog.h.

Constructor & Destructor Documentation

◆ QgsSymbolSelectorDialog()

QgsSymbolSelectorDialog::QgsSymbolSelectorDialog ( QgsSymbol * symbol,
QgsStyle * style,
QgsVectorLayer * vl,
QWidget * parent = nullptr,
bool embedded = false )

Constructor for QgsSymbolSelectorDialog.

Parameters
symbolThe symbol
styleThe style
vlAssociated vector layer
parentParent widget
embeddedtrue to embed in renderer properties dialog, false otherwise

Definition at line 869 of file qgssymbolselectordialog.cpp.

Member Function Documentation

◆ addLayer

void QgsSymbolSelectorDialog::addLayer ( )
slot

Definition at line 986 of file qgssymbolselectordialog.cpp.

◆ advancedMenu()

QMenu * QgsSymbolSelectorDialog::advancedMenu ( )

Returns menu for "advanced" button - create it if doesn't exist and show the advanced button.

Definition at line 903 of file qgssymbolselectordialog.cpp.

◆ buttonBox()

QDialogButtonBox * QgsSymbolSelectorDialog::buttonBox ( ) const

Returns a reference to the dialog's button box.

Since
QGIS 3.10

Definition at line 1031 of file qgssymbolselectordialog.cpp.

◆ changeLayer

void QgsSymbolSelectorDialog::changeLayer ( QgsSymbolLayer * layer)
slot

Alters tree and sets proper widget when Layer Type is changed.

Note
The layer is received from the LayerPropertiesWidget

Definition at line 1026 of file qgssymbolselectordialog.cpp.

◆ context()

QgsSymbolWidgetContext QgsSymbolSelectorDialog::context ( ) const

Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

See also
setContext()

Definition at line 913 of file qgssymbolselectordialog.cpp.

◆ duplicateLayer

void QgsSymbolSelectorDialog::duplicateLayer ( )
slot

Duplicates the current symbol layer and places the duplicated layer above the current symbol layer.

Definition at line 1001 of file qgssymbolselectordialog.cpp.

◆ keyPressEvent()

void QgsSymbolSelectorDialog::keyPressEvent ( QKeyEvent * e)
overrideprotected

Definition at line 923 of file qgssymbolselectordialog.cpp.

◆ layerChanged

void QgsSymbolSelectorDialog::layerChanged ( )
slot

Definition at line 1006 of file qgssymbolselectordialog.cpp.

◆ loadSymbol()

void QgsSymbolSelectorDialog::loadSymbol ( QgsSymbol * symbol,
SymbolLayerItem * parent = nullptr )

Loads the given symbol into the widget.

Parameters
symbolThe symbol to load.
parentThe parent symbol layer item. If the parent parameter is null, the whole symbol and model will be reset.

Definition at line 941 of file qgssymbolselectordialog.cpp.

◆ lockLayer

void QgsSymbolSelectorDialog::lockLayer ( )
slot

Definition at line 996 of file qgssymbolselectordialog.cpp.

◆ moveLayerDown

void QgsSymbolSelectorDialog::moveLayerDown ( )
slot

Definition at line 976 of file qgssymbolselectordialog.cpp.

◆ moveLayerUp

void QgsSymbolSelectorDialog::moveLayerUp ( )
slot

Definition at line 981 of file qgssymbolselectordialog.cpp.

◆ removeLayer

void QgsSymbolSelectorDialog::removeLayer ( )
slot

Definition at line 991 of file qgssymbolselectordialog.cpp.

◆ setContext()

void QgsSymbolSelectorDialog::setContext ( const QgsSymbolWidgetContext & context)

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

Parameters
contextsymbol widget context
See also
context()

Definition at line 908 of file qgssymbolselectordialog.cpp.

◆ symbol()

QgsSymbol * QgsSymbolSelectorDialog::symbol ( )

Returns the symbol that is currently active in the widget.

Can be nullptr.

Returns
The active symbol.

Definition at line 918 of file qgssymbolselectordialog.cpp.

◆ symbolChanged

void QgsSymbolSelectorDialog::symbolChanged ( )
slot

Slot to update tree when a new symbol from style.

Definition at line 1021 of file qgssymbolselectordialog.cpp.

◆ symbolModified

void QgsSymbolSelectorDialog::symbolModified ( )
signal

Emitted when the symbol defined in the dialog is modified.

◆ updateLayerPreview

void QgsSymbolSelectorDialog::updateLayerPreview ( )
slot

Definition at line 1011 of file qgssymbolselectordialog.cpp.

◆ updatePreview

void QgsSymbolSelectorDialog::updatePreview ( )
slot

Definition at line 1016 of file qgssymbolselectordialog.cpp.


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