Class: QgsStyleManagerDialog¶
A dialog allowing users to customize and populate a
QgsStyle.
QgsStyleManagerDialog¶
Class Hierarchy¶
Base classes¶
- 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
parentwidget and windowflags.The
styleargument specifies the linkedQgsStyledatabase. Symbols and objects contained within this style will be shown in the dialog, and changes made within the dialog will be applied tostyle. Thestyleobject 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
parentwidget 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
typeis set to a string representing a validQgsColorRamp.type()value then a new ramp of that type will be created. Iftypeis 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
RampTypeargument 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
formatandsize.See also
See also
- Parameters:
dir (Optional[str])
format (Optional[str])
size (QSize)
- filterSymbols(self, filter: str | None)[source]¶
Sets the
filterstring 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
itemis 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
namefor the style, which is used by the dialog to reflect the original style/XML file name.nameshould 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)