Class: QgsStyleManagerDialog

class qgis.gui.QgsStyleManagerDialog(style: QgsStyle, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags(), readOnly: bool = False)

Bases: PyQt5.QtWidgets.QDialog

Constructor for QgsStyleManagerDialog, with the specified parent widget and window flags.

The style argument specifies the linked QgsStyle database. Symbols and objects contained within this style will be shown in the dialog, and changes made within the dialog will be applied to style. The style object must last for the lifetime of the dialog.

A dialog allowing users to customize and populate a QgsStyle.

Enums

Methods

actionEvent

activate

Raises, unminimizes and activates this window

addColorRamp

addColorRamp(self) -> bool add a new color ramp to style

addColorRampStatic

Opens the add color ramp dialog, returning the new color ramp’s name if the ramp has been added.

addFavoriteSelectedSymbols

Add selected symbols to favorites

addItem

Triggers the dialog for adding a new item, based on the currently selected item type tab.

addSmartgroup

Triggers the dialog to add a new smart group.

addSymbol

add a new symbol to style

addTag

Triggers the dialog to add a new tag.

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

currentItemName

currentItemType

customEvent

destroy

detagSelectedSymbols

Remove all tags from selected symbols

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

editColorRamp

editItem

Triggers the dialog for editing the current item.

editSmartgroupAction

Triggers the dialog for editing the selected smart group.

editSymbol

enableGroupInputs

Enables or disables the groupTree specific inputs

enableItemsForGroupingMode

Enables or disables the groupTree items for grouping mode

enableSymbolInputs

Enables or disbables the symbol specific inputs

enterEvent

event

eventFilter

exportItems

Triggers the dialog to export items.

exportItemsPNG

Triggers the dialog to export selected items as PNG files.

exportItemsSVG

Triggers the dialog to export selected items as SVG files.

exportSelectedItemsImages

Triggers the dialog to export selected items as images of the specified format and size.

filterSymbols

Sets the filter string to filter symbols by.

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

groupChanged

Trigerred when the current group (or tag) is changed.

groupRenamed

Triggered when a group item is renamed.

grouptreeContextMenu

Context menu for the groupTree

hideEvent

importItems

Triggers the dialog to import items.

initPainter

inputMethodEvent

isSignalConnected

itemChanged

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

keyPressEvent

keyReleaseEvent

leaveEvent

listitemsContextMenu

Context menu for the listItems ( symbols list )

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

onClose

Closes the dialog

onFinished

Called when the dialog is going to be closed.

paintEvent

populateColorRamps

Populates the list view with color ramps of the current type with the given names.

populateGroups

populate the groups

populateList

Refreshes the list of items.

populateSymbols

Populates the list view with symbols of the current type with the given names.

populateTypes

Populate combo box with known style items (symbols, color ramps).

receivers

regrouped

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

removeColorRamp

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

removeFavoriteSelectedSymbols

Remove selected symbols from favorites

removeGroup

Removes the selected tag or smartgroup.

removeItem

Removes the current selected item.

removeSymbol

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

resizeEvent

selectedSymbolsChanged

Perform tasks when the selected symbols change

sender

senderSignalIndex

setBaseStyleName

Sets the base name for the style, which is used by the dialog to reflect the original style/XML file name.

setBold

sets the text of the item with bold font

setFavoritesGroupVisible

Sets whether the favorites group should be shown.

setSmartGroupsVisible

Sets whether smart groups should be shown.

setSymbolsChecked

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

sharedPainter

showEvent

showHelp

Opens the associated help

symbolSelected

Perform symbol specific tasks when selected

tabletEvent

tagSelectedSymbols

Tag selected symbols using menu item selection

tagSymbolsAction

Toggles the interactive item tagging mode.

timerEvent

updateMicroFocus

wheelEvent

Signals

Attributes

actionEvent()
activate(self)

Raises, unminimizes and activates this window

New in version 3.4.

addColorRamp(self, action: QAction) → bool

addColorRamp(self) -> bool add a new color ramp to style

addColorRampStatic(parent: QWidget, style: QgsStyle, RampType: str = '') → str

Opens the add color ramp dialog, returning the new color ramp’s name if the ramp has been added.

addFavoriteSelectedSymbols(self)

Add selected symbols to favorites

addItem(self)

Triggers the dialog for adding a new item, based on the currently selected item type tab.

addSmartgroup(self) → int

Triggers the dialog to add a new smart group.

addSymbol(self, symbolType: int = -1) → bool

add a new symbol to style

addTag(self) → int

Triggers the dialog to add a new tag.

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
currentItemName(self) → str
currentItemType(self) → int
customEvent()
destroy()
detagSelectedSymbols(self)

Remove all tags from selected symbols

disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
editColorRamp(self) → bool
editItem(self)

Triggers the dialog for editing the current item.

editSmartgroupAction(self)

Triggers the dialog for editing the selected smart group.

editSymbol(self) → bool
enableGroupInputs(self, bool)

Enables or disables the groupTree specific inputs

enableItemsForGroupingMode(self, bool)

Enables or disables the groupTree items for grouping mode

enableSymbolInputs(self, bool)

Enables or disbables the symbol specific inputs

enterEvent()
event()
eventFilter()
exportItems(self)

Triggers the dialog to export items.

See also

importItems()

exportItemsPNG(self)

Triggers the dialog to export selected items as PNG files.

See also

exportItemsSVG()

exportItemsSVG(self)

Triggers the dialog to export selected items as SVG files.

See also

exportItemsPNG()

exportSelectedItemsImages(self, dir: str, format: str, size: QSize)

Triggers the dialog to export selected items as images of the specified format and size.

See also

exportItemsSVG()

See also

exportItemsPNG()

filterSymbols(self, filter: str)

Sets the filter string to filter symbols by.

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
groupChanged(self, QModelIndex)

Trigerred when the current group (or tag) is changed.

groupRenamed(self, item: QStandardItem)

Triggered when a group item is renamed.

grouptreeContextMenu(self, QPoint)

Context menu for the groupTree

hideEvent()
importItems(self)

Triggers the dialog to import items.

See also

exportItems()

initPainter()
inputMethodEvent()
isSignalConnected()
itemChanged(self, item: QStandardItem)

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

keyPressEvent()
keyReleaseEvent()
leaveEvent()
listitemsContextMenu(self, QPoint)

Context menu for the listItems ( symbols list )

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
onClose(self)

Closes the dialog

onFinished(self)

Called when the dialog is going to be closed.

paintEvent()
populateColorRamps(self, colorRamps: Iterable[str], checkable: bool = False)

Populates the list view with color ramps of the current type with the given names.

Deprecated since version No: longer required in QGIS 3.6, as the model is updated live. Has no effect and will be removed in QGIS 4.0

populateGroups(self)

populate the groups

populateList(self)

Refreshes the list of items.

populateSymbols(self, symbolNames: Iterable[str], checkable: bool = False)

Populates the list view with symbols of the current type with the given names.

Deprecated since version No: longer required in QGIS 3.6, as the model is updated live. Has no effect and will be removed in QGIS 4.0

populateTypes(self)

Populate combo box with known style items (symbols, color ramps).

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

receivers()
regrouped(self, QStandardItem)

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

removeColorRamp(self) → bool

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

removeFavoriteSelectedSymbols(self)

Remove selected symbols from favorites

removeGroup(self)

Removes the selected tag or smartgroup.

removeItem(self)

Removes the current selected item.

removeSymbol(self) → bool

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

resizeEvent()
selectedSymbolsChanged(self, selected: QItemSelection, deselected: QItemSelection)

Perform tasks when the selected symbols change

sender()
senderSignalIndex()
setBaseStyleName(self, name: str)

Sets the base name for the style, which is used by the dialog to reflect the original style/XML file name.

name should be stripped of any extensions and folder information, e.g. “transport_styles”, not “d:/stuff/transport_styles.xml”.

New in version 3.6.

setBold(self, QStandardItem)

sets the text of the item with bold font

setFavoritesGroupVisible(self, show: bool)

Sets whether the favorites group should be shown. The default is to show the group.

New in version 3.6.

setSmartGroupsVisible(self, show: bool)

Sets whether smart groups should be shown. The default is to show the groups.

New in version 3.6.

setSymbolsChecked(self, Iterable[str])

Deprecated since version in: QGIS 3.6 - has no effect and will be removed in QGIS 4.0

sharedPainter()
showEvent()
showHelp(self)

Opens the associated help

symbolSelected(self, QModelIndex)

Perform symbol specific tasks when selected

tabletEvent()
tagSelectedSymbols(self, newTag: bool = False)

Tag selected symbols using menu item selection

tagSymbolsAction(self)

Toggles the interactive item tagging mode.

timerEvent()
updateMicroFocus()
wheelEvent()