Class: QgsSymbolSelectorWidget¶
-
class
qgis.gui.
QgsSymbolSelectorWidget
(symbol: QgsSymbol, style: QgsStyle, vl: QgsVectorLayer, parent: QWidget = None)¶ Bases:
QgsPanelWidget
Symbol selector widget that can be used to select and build a symbol
- Parameters
symbol (QgsSymbol) – The symbol to load into the widget as a start point.
style (QgsStyle) – The style used by the widget.
vl (QgsVectorLayer) – The vector layer for the symbol.
parent (QWidget = None) –
Note
The ownership of the symbol is not transferred and must exist for the lifetime of the widget.
Symbol selector widget that can be used to select and build a symbol
Methods
Add a symbol layer to the bottom of the stack.
Returns menu for “advanced” button - create it if doesn’t exist and show the advanced button
alters tree and sets proper widget when Layer Type is changed note: The layer is received from the LayerPropertiesWidget
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer
Overridden key press event to handle the esc event on the widget.
Called when the layer changes in the widget.
Lock the current active symbol layer.
Move the active symbol layer down.
Move the active symbol layer up.
Remove the current active symbol layer.
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
Returns the symbol that is currently active in the widget.
Slot to update tree when a new symbol from style
Update the single symbol layer preview in the widget.
Update the preview of the whole symbol in the interface.
Signals
Emitted when a symbol is modified in the widget.
-
actionEvent
(self, QActionEvent)¶
-
addLayer
(self)¶ Add a symbol layer to the bottom of the stack.
-
advancedMenu
(self) → QMenu¶ Returns menu for “advanced” button - create it if doesn’t exist and show the advanced button
- Return type
QMenu
-
changeEvent
(self, QEvent)¶
-
changeLayer
(self, layer: QgsSymbolLayer)¶ alters tree and sets proper widget when Layer Type is changed note: The layer is received from the LayerPropertiesWidget
- Parameters
layer (QgsSymbolLayer) –
-
childEvent
(self, QChildEvent)¶
-
closeEvent
(self, QCloseEvent)¶
-
connectNotify
(self, QMetaMethod)¶
-
context
(self) → QgsSymbolWidgetContext¶ Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
See also
New in version 3.0.
- Return type
-
contextMenuEvent
(self, QContextMenuEvent)¶
-
create
(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
-
customEvent
(self, QEvent)¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
dropEvent
(self, QDropEvent)¶
-
duplicateLayer
(self)¶ Duplicates the current symbol layer and places the duplicated layer above the current symbol layer
New in version 2.14.
-
enterEvent
(self, QEvent)¶
-
event
(self, QEvent) → bool¶
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPreviousChild
(self) → bool¶
-
hideEvent
(self, QHideEvent)¶
-
initPainter
(self, QPainter)¶
-
inputMethodEvent
(self, QInputMethodEvent)¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
keyPressEvent
(self, event: QKeyEvent)¶ Overridden key press event to handle the esc event on the widget.
- Parameters
event – The key event
-
keyReleaseEvent
(self, QKeyEvent)¶
-
layerChanged
(self)¶ Called when the layer changes in the widget. Updates the active properties for active symbol layer.
-
leaveEvent
(self, QEvent)¶
-
lockLayer
(self)¶ Lock the current active symbol layer.
-
metric
(self, QPaintDevice.PaintDeviceMetric) → int¶
-
mouseDoubleClickEvent
(self, QMouseEvent)¶
-
mouseMoveEvent
(self, QMouseEvent)¶
-
mousePressEvent
(self, QMouseEvent)¶
-
mouseReleaseEvent
(self, QMouseEvent)¶
-
moveEvent
(self, QMoveEvent)¶
-
moveLayerDown
(self)¶ Move the active symbol layer down.
-
moveLayerUp
(self)¶ Move the active symbol layer up.
-
nativeEvent
(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
-
paintEvent
(self, QPaintEvent)¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
removeLayer
(self)¶ Remove the current active symbol layer.
-
resizeEvent
(self, QResizeEvent)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setContext
(self, context: QgsSymbolWidgetContext)¶ Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
- Parameters
context (QgsSymbolWidgetContext) – symbol widget context
See also
New in version 3.0.
-
showEvent
(self, QShowEvent)¶
-
symbol
(self) → QgsSymbol¶ Returns the symbol that is currently active in the widget. Can be
None
.- Return type
- Returns
The active symbol.
-
symbolChanged
(self)¶ Slot to update tree when a new symbol from style
-
symbolModified
¶ Emitted when a symbol is modified in the widget. [signal]
-
tabletEvent
(self, QTabletEvent)¶
-
timerEvent
(self, QTimerEvent)¶
-
updateLayerPreview
(self)¶ Update the single symbol layer preview in the widget.
-
updateMicroFocus
(self)¶
-
updatePreview
(self)¶ Update the preview of the whole symbol in the interface.
-
wheelEvent
(self, QWheelEvent)¶