Class: QgsStyleManagerDialog¶
A dialog allowing users to customize and populate a
QgsStyle
.

QgsStyleManagerDialog¶
Class Hierarchy¶
Base classes¶
Methods
Raises, unminimizes and activates this window |
|
Triggers adding a new color ramp. |
|
Add selected symbols to favorites |
|
Triggers the dialog for adding a new item, based on the currently selected item type tab. |
|
Triggers the dialog to add a new smart group. |
|
add a new symbol to style |
|
Triggers the dialog to add a new tag. |
|
Remove all tags from selected symbols |
|
Triggers the dialog for editing the current item. |
|
Triggers the dialog for editing the selected smart group. |
|
Enables or disables the groupTree specific inputs |
|
Enables or disables the groupTree items for grouping mode |
|
Enables or disbables the symbol specific inputs |
|
Triggers the dialog to export items. |
|
Triggers the dialog to export selected items as PNG files. |
|
Triggers the dialog to export selected items as SVG files. |
|
Triggers the dialog to export selected items as images of the specified format and size. |
|
Sets the filter string to filter symbols by. |
|
Triggered when the current group (or tag) is changed. |
|
Triggered when a group item is renamed. |
|
Context menu for the groupTree |
|
Triggers the dialog to import items. |
|
Context menu for the listItems ( symbols list ) |
|
Closes the dialog |
|
Called when the dialog is going to be closed. |
|
Populates the list view with color ramps of the current type with the given names. |
|
populate the groups |
|
Refreshes the list of items. |
|
Populates the list view with symbols of the current type with the given names. |
|
Populate combo box with known style items (symbols, color ramps). |
|
Remove selected symbols from favorites |
|
Removes the selected tag or smartgroup. |
|
Removes the current selected item. |
|
Perform tasks when the selected symbols change |
|
Sets the base name for the style, which is used by the dialog to reflect the original style/XML file name. |
|
sets the text of the item with bold font |
|
Sets whether the favorites group should be shown. |
|
Sets whether smart groups should be shown. |
|
Opens the associated help |
|
Perform symbol specific tasks when selected |
|
Tag selected symbols using menu item selection |
|
Toggles the interactive item tagging mode. |
Static Methods
Opens the add color ramp dialog, returning the new color ramp's name if the ramp has been added. |
- class qgis.gui.QgsStyleManagerDialog[source]¶
Bases:
QDialog
- __init__(style: QgsStyle | None, parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags(), readOnly: bool = False)
Constructor for QgsStyleManagerDialog, with the specified
parent
widget and windowflags
.The
style
argument specifies the linkedQgsStyle
database. Symbols and objects contained within this style will be shown in the dialog, and changes made within the dialog will be applied tostyle
. Thestyle
object must last for the lifetime of the dialog.- Parameters:
style (Optional[QgsStyle])
parent (Optional[QWidget] = None)
flags (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())
readOnly (bool = False)
- __init__(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())
Constructor for QgsStyleManagerDialog, with the specified
parent
widget and windowflags
.All styles linked to the current project will be available.
Added in version 3.26.
- Parameters:
parent (Optional[QWidget] = None)
flags (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())
- addColorRamp(self, type: str | None = '') bool [source]¶
Triggers adding a new color ramp.
If
type
is set to a string representing a validQgsColorRamp.type()
value then a new ramp of that type will be created. Iftype
is empty, then the user will be prompted to select the color ramp type.- Parameters:
type (Optional[str] = '')
- Return type:
bool
- static addColorRampStatic(parent: QWidget | None, style: QgsStyle | None, RampType: str | None = '') str [source]¶
Opens the add color ramp dialog, returning the new color ramp’s name if the ramp has been added.
The
RampType
argument should be set to a string representing a validQgsColorRamp.type()
value.- Parameters:
parent (Optional[QWidget])
style (Optional[QgsStyle])
RampType (Optional[str] = '')
- Return type:
str
- addItem(self)[source]¶
Triggers the dialog for adding a new item, based on the currently selected item type tab.
- addSymbol(self, symbolType: int = -1) bool [source]¶
add a new symbol to style
- Parameters:
symbolType (int = -1)
- Return type:
bool
- enableGroupInputs(self, a0: bool)[source]¶
Enables or disables the groupTree specific inputs
- Parameters:
a0 (bool)
- enableItemsForGroupingMode(self, a0: bool)[source]¶
Enables or disables the groupTree items for grouping mode
- Parameters:
a0 (bool)
- enableSymbolInputs(self, a0: bool)[source]¶
Enables or disbables the symbol specific inputs
- Parameters:
a0 (bool)
- exportItemsPNG(self)[source]¶
Triggers the dialog to export selected items as PNG files.
See also
See also
- exportItemsSVG(self)[source]¶
Triggers the dialog to export selected items as SVG files.
See also
See also
- exportSelectedItemsImages(self, dir: str | None, format: str | None, size: QSize)[source]¶
Triggers the dialog to export selected items as images of the specified
format
andsize
.See also
See also
- Parameters:
dir (Optional[str])
format (Optional[str])
size (QSize)
- filterSymbols(self, filter: str | None)[source]¶
Sets the
filter
string to filter symbols by.- Parameters:
filter (Optional[str])
- groupChanged(self, a0: QModelIndex)[source]¶
Triggered when the current group (or tag) is changed.
- Parameters:
a0 (QModelIndex)
- groupRenamed(self, item: QStandardItem | None)[source]¶
Triggered when a group
item
is renamed.- Parameters:
item (Optional[QStandardItem])
- grouptreeContextMenu(self, a0: QPoint)[source]¶
Context menu for the groupTree
- Parameters:
a0 (QPoint)
- itemChanged(self, item: QStandardItem | None)[source]¶
Deprecated since version 3.6.
Has no effect and will be removed in QGIS 4.0.
- Parameters:
item (Optional[QStandardItem])
- listitemsContextMenu(self, a0: QPoint)[source]¶
Context menu for the listItems ( symbols list )
- Parameters:
a0 (QPoint)
- populateColorRamps(self, colorRamps: Iterable[str | None], checkable: bool = False)[source]¶
Populates the list view with color ramps of the current type with the given names.
Deprecated since version 3.40: 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[Optional[str]])
checkable (bool = False)
- populateSymbols(self, symbolNames: Iterable[str | None], checkable: bool = False)[source]¶
Populates the list view with symbols of the current type with the given names.
Deprecated since version 3.40: 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[Optional[str]])
checkable (bool = False)
- populateTypes(self)[source]¶
Populate combo box with known style items (symbols, color ramps).
Deprecated since version 3.6: Has no effect and will be removed in QGIS 4.0.
- regrouped(self, a0: QStandardItem | None)[source]¶
Deprecated since version 3.6.
Has no effect and will be removed in QGIS 4.0.
- Parameters:
a0 (Optional[QStandardItem])
- removeColorRamp(self) bool [source]¶
Deprecated since version 3.6.
Has no effect and will be removed in QGIS 4.0.
- Return type:
bool
- removeSymbol(self) bool [source]¶
Deprecated since version 3.6.
Has no effect and will be removed in QGIS 4.0.
- Return type:
bool
- selectedSymbolsChanged(self, selected: QItemSelection, deselected: QItemSelection)[source]¶
Perform tasks when the selected symbols change
- Parameters:
selected (QItemSelection)
deselected (QItemSelection)
- setBaseStyleName(self, name: str | None)[source]¶
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”.Added in version 3.6.
- Parameters:
name (Optional[str])
- setBold(self, a0: QStandardItem | None)[source]¶
sets the text of the item with bold font
- Parameters:
a0 (Optional[QStandardItem])
- setFavoritesGroupVisible(self, show: bool)[source]¶
Sets whether the favorites group should be shown. The default is to show the group.
Added in version 3.6.
- Parameters:
show (bool)
- setSmartGroupsVisible(self, show: bool)[source]¶
Sets whether smart groups should be shown. The default is to show the groups.
Added in version 3.6.
- Parameters:
show (bool)
- setSymbolsChecked(self, a0: Iterable[str | None])[source]¶
Deprecated since version 3.6.
Has no effect and will be removed in QGIS 4.0.
- Parameters:
a0 (Iterable[Optional[str]])
- symbolSelected(self, a0: QModelIndex)[source]¶
Perform symbol specific tasks when selected
- Parameters:
a0 (QModelIndex)