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.

Parameters
  • style (QgsStyle) –

  • parent (QWidget = None) –

  • flags (Union[Qt.WindowFlags) –

  • readOnly

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

Parameters

action (QAction) –

Return type

bool

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.

Parameters
  • parent (QWidget) –

  • style (QgsStyle) –

  • RampType (str = '') –

Return type

str

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.

Return type

int

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

add a new symbol to style

Parameters

symbolType (int = -1) –

Return type

bool

addTag(self) → int

Triggers the dialog to add a new tag.

Return type

int

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
currentItemName(self) → str
Return type

str

currentItemType(self) → int
Return type

int

customEvent()
destroy()
detagSelectedSymbols(self)

Remove all tags from selected symbols

disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
editColorRamp(self) → bool
Return type

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
Return type

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()

Parameters
  • dir (str) –

  • format (str) –

  • size (QSize) –

filterSymbols(self, filter: str)

Sets the filter string to filter symbols by.

Parameters

filter (str) –

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

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

groupRenamed(self, item: QStandardItem)

Triggered when a group item is renamed.

Parameters

item (QStandardItem) –

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 QGIS: 3.6 - has no effect and will be removed in QGIS 4.0

Parameters

item (QStandardItem) –

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

Parameters
  • colorRamps (Iterable[str]) –

  • checkable (bool = False) –

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

Parameters
  • symbolNames (Iterable[str]) –

  • checkable (bool = False) –

populateTypes(self)

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

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

receivers()
regrouped(self, QStandardItem)

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

removeColorRamp(self) → bool

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

Return type

bool

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 QGIS: 3.6 - has no effect and will be removed in QGIS 4.0

Return type

bool

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

Perform tasks when the selected symbols change

Parameters
  • selected (QItemSelection) –

  • deselected (QItemSelection) –

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.

Parameters

name (str) –

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.

Parameters

show (bool) –

setSmartGroupsVisible(self, show: bool)

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

New in version 3.6.

Parameters

show (bool) –

setSymbolsChecked(self, Iterable[str])

Deprecated since version 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

Parameters

newTag (bool = False) –

tagSymbolsAction(self)

Toggles the interactive item tagging mode.

timerEvent()
updateMicroFocus()
wheelEvent()