QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Symbol selector widget that can be used to select and build a symbol. More...
#include <qgssymbolselectordialog.h>
Public Slots | |
void | addLayer () |
Add a symbol layer to the bottom of the stack. More... | |
void | changeLayer (QgsSymbolLayer *layer) |
alters tree and sets proper widget when Layer Type is changed More... | |
void | duplicateLayer () |
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer. More... | |
void | layerChanged () |
Called when the layer changes in the widget. More... | |
void | lockLayer () |
Lock the current active symbol layer. More... | |
void | moveLayerDown () |
Move the active symbol layer down. More... | |
void | moveLayerUp () |
Move the active symbol layer up. More... | |
void | removeLayer () |
Remove the current active symbol layer. More... | |
void | symbolChanged () |
Slot to update tree when a new symbol from style. More... | |
void | updateLayerPreview () |
Update the single symbol layer preview in the widget. More... | |
void | updatePreview () |
Update the preview of the whole symbol in the interface. More... | |
Public Slots inherited from QgsPanelWidget | |
void | acceptPanel () |
Accept the panel. 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... | |
Signals | |
void | symbolModified () |
Emitted when a symbol is modified in the widget. More... | |
Signals inherited from QgsPanelWidget | |
void | panelAccepted (QgsPanelWidget *panel) |
Emitted when the panel is accepted by the user. More... | |
void | showPanel (QgsPanelWidget *panel) |
Emit when you require a panel to be show in the interface. More... | |
void | widgetChanged () |
Emitted when the widget state changes. More... | |
Public Member Functions | |
QgsSymbolSelectorWidget (QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent=nullptr) | |
Symbol selector widget that can be used to select and build a symbol. More... | |
QMenu * | advancedMenu () |
Returns menu for "advanced" button - create it if doesn't exist and show the advanced button. More... | |
QgsSymbolWidgetContext | context () const |
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. More... | |
void | loadSymbol (QgsSymbol *symbol, SymbolLayerItem *parent=nullptr) |
Loads the given symbol into the widget. More... | |
void | setContext (const QgsSymbolWidgetContext &context) |
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. More... | |
QgsSymbol * | symbol () |
Returns the symbol that is currently active in the widget. More... | |
Public Member Functions inherited from QgsPanelWidget | |
QgsPanelWidget (QWidget *parent=nullptr) | |
Base class for any widget that can be shown as a inline panel. More... | |
bool | autoDelete () |
The the auto delete property on the widget. More... | |
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. More... | |
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. More... | |
bool | dockMode () |
Returns the dock mode state. More... | |
virtual QMenu * | menuButtonMenu () |
Returns the menu to use for the menu button for this panel, or nullptr if no menu button is required. More... | |
virtual QString | menuButtonTooltip () const |
Returns the (translated) tooltip text to use for the menu button for this panel. More... | |
QString | panelTitle () |
The title of the panel. More... | |
void | setAutoDelete (bool autoDelete) |
The the auto delete property on the widget. More... | |
virtual void | setDockMode (bool dockMode) |
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs. More... | |
void | setPanelTitle (const QString &panelTitle) |
Set the title of the panel when shown in the interface. More... | |
Friends | |
class | QgsSymbolSelectorDialog |
To allow for non API break access from the dialog. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsPanelWidget | |
static QgsPanelWidget * | findParentPanel (QWidget *widget) |
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. More... | |
Protected Member Functions inherited from QgsPanelWidget | |
void | keyPressEvent (QKeyEvent *event) override |
Overridden key press event to handle the esc event on the widget. More... | |
Symbol selector widget that can be used to select and build a symbol.
Definition at line 87 of file qgssymbolselectordialog.h.
QgsSymbolSelectorWidget::QgsSymbolSelectorWidget | ( | QgsSymbol * | symbol, |
QgsStyle * | style, | ||
QgsVectorLayer * | vl, | ||
QWidget * | parent = nullptr |
||
) |
Symbol selector widget that can be used to select and build a symbol.
symbol | The symbol to load into the widget as a start point. |
style | The style used by the widget. |
vl | The vector layer for the symbol. |
parent |
Definition at line 232 of file qgssymbolselectordialog.cpp.
|
slot |
Add a symbol layer to the bottom of the stack.
Definition at line 588 of file qgssymbolselectordialog.cpp.
QMenu * QgsSymbolSelectorWidget::advancedMenu | ( | ) |
Returns menu for "advanced" button - create it if doesn't exist and show the advanced button.
Definition at line 344 of file qgssymbolselectordialog.cpp.
|
slot |
alters tree and sets proper widget when Layer Type is changed
Definition at line 742 of file qgssymbolselectordialog.cpp.
QgsSymbolWidgetContext QgsSymbolSelectorWidget::context | ( | ) | const |
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
Definition at line 381 of file qgssymbolselectordialog.cpp.
|
slot |
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer.
Definition at line 705 of file qgssymbolselectordialog.cpp.
|
slot |
Called when the layer changes in the widget.
Updates the active properties for active symbol layer.
Definition at line 502 of file qgssymbolselectordialog.cpp.
void QgsSymbolSelectorWidget::loadSymbol | ( | QgsSymbol * | symbol, |
SymbolLayerItem * | parent = nullptr |
||
) |
Loads the given symbol into the widget.
symbol | The symbol to load. |
parent | The parent symbol layer item. If the parent parameter is null, the whole symbol and model will be reset. |
Definition at line 386 of file qgssymbolselectordialog.cpp.
|
slot |
Lock the current active symbol layer.
Definition at line 696 of file qgssymbolselectordialog.cpp.
|
slot |
Move the active symbol layer down.
Definition at line 660 of file qgssymbolselectordialog.cpp.
|
slot |
Move the active symbol layer up.
Definition at line 665 of file qgssymbolselectordialog.cpp.
|
slot |
Remove the current active symbol layer.
Definition at line 638 of file qgssymbolselectordialog.cpp.
void QgsSymbolSelectorWidget::setContext | ( | const QgsSymbolWidgetContext & | context | ) |
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
context | symbol widget context |
Definition at line 355 of file qgssymbolselectordialog.cpp.
|
inline |
Returns the symbol that is currently active in the widget.
Can be nullptr
.
Definition at line 129 of file qgssymbolselectordialog.h.
|
slot |
Slot to update tree when a new symbol from style.
Definition at line 542 of file qgssymbolselectordialog.cpp.
|
signal |
Emitted when a symbol is modified in the widget.
|
slot |
Update the single symbol layer preview in the widget.
Definition at line 466 of file qgssymbolselectordialog.cpp.
|
slot |
Update the preview of the whole symbol in the interface.
Definition at line 453 of file qgssymbolselectordialog.cpp.
|
friend |
To allow for non API break access from the dialog.
Definition at line 91 of file qgssymbolselectordialog.h.