Class: QgsGui¶
A singleton class containing various registry and other global members
Class Hierarchy¶
Base classes¶
Static Methods
Returns the global advanced digitizing tools registry, used for registering advanced digitizing tools. |
|
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation items. |
|
Returns the global code editor color scheme registry, used for registering the color schemes for |
|
Returns the global data item GUI provider registry, used for tracking providers which affect the browser GUI. |
|
Returns the global editor widget registry, used for managing all known edit widget factories. |
|
Register the widget to allow its position to be automatically saved and restored when open and closed. |
|
Returns the screen at the given global point (pixel). |
|
Checks whether QWebEngineView is available to display HTML content. |
|
Returns the platform's HIG flags. |
|
Returns the global history provider registry, used for tracking history providers. |
|
Returns the global input controller manager. |
|
Returns a pointer to the singleton instance. |
|
Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view. |
|
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items. |
|
Returns the global map layer action registry, used for registering map layer actions. |
|
Returns the global numeric format gui registry, used for registering the GUI widgets associated with |
|
Returns the global Processing favorite algorithm manager, used for tracking favorite Processing algorithms. |
|
Returns the global processing gui registry, used for registering the GUI behavior of processing algorithms. |
|
Returns the global processing recent algorithm log, used for tracking recently used processing algorithms. |
|
Returns the global GUI-related project storage registry |
|
Returns the registry of GUI-related components of data providers |
|
Returns the global relation widget registry, used for managing all known relation widget factories. |
|
Samples the color on screen at the specified global point (pixel). |
|
Returns the registry of GUI-related components for sensors |
|
Sets the global window manager. |
|
Returns the registry of settings editors. |
|
Returns the gui's settings registry, used for managing gui settings. |
|
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences. |
|
Returns the global source select provider registry, used for managing all known source select widget factories. |
|
Returns the registry of provider source widget providers. |
|
Returns the global stored SQL query manager. |
|
Returns the registry of subset string editors of data providers |
|
Returns the global window manager, if set. |
Signals
This signal is emitted whenever the application options have been changed. |
Attributes
- class qgis.gui.QgsGui[source]¶
Bases:
QObject
- HigDialogTitleIsTitleCase = 2¶
- class HigFlag¶
Bases:
int
- class HigFlags¶
- class HigFlags(f: QgsGui.HigFlags | QgsGui.HigFlag)
- class HigFlags(a0: QgsGui.HigFlags)
Bases:
object
- HigMenuTextIsTitleCase = 1¶
- class ProjectCrsBehavior¶
Bases:
int
- UseCrsOfFirstLayerAdded = 1¶
- UsePresetCrs = 2¶
- static advancedDigitizingToolsRegistry() QgsAdvancedDigitizingToolsRegistry | None [source]¶
Returns the global advanced digitizing tools registry, used for registering advanced digitizing tools.
Added in version 3.40.
- Return type:
Optional[QgsAdvancedDigitizingToolsRegistry]
- static annotationItemGuiRegistry() QgsAnnotationItemGuiRegistry | None [source]¶
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation items.
Added in version 3.22.
- Return type:
Optional[QgsAnnotationItemGuiRegistry]
- static codeEditorColorSchemeRegistry() QgsCodeEditorColorSchemeRegistry | None [source]¶
Returns the global code editor color scheme registry, used for registering the color schemes for
QgsCodeEditor
widgets.Added in version 3.16.
- Return type:
Optional[QgsCodeEditorColorSchemeRegistry]
- static dataItemGuiProviderRegistry() QgsDataItemGuiProviderRegistry | None [source]¶
Returns the global data item GUI provider registry, used for tracking providers which affect the browser GUI.
Added in version 3.6.
- Return type:
Optional[QgsDataItemGuiProviderRegistry]
- static editorWidgetRegistry() QgsEditorWidgetRegistry | None [source]¶
Returns the global editor widget registry, used for managing all known edit widget factories.
- Return type:
Optional[QgsEditorWidgetRegistry]
- static enableAutoGeometryRestore(widget: QWidget | None, key: str | None = '')[source]¶
Register the widget to allow its position to be automatically saved and restored when open and closed. Use this to avoid needing to call
saveGeometry()
andrestoreGeometry()
on your widget.- Parameters:
widget (Optional[QWidget])
key (Optional[str] = '')
- static findScreenAt(point: QPoint) QScreen | None [source]¶
Returns the screen at the given global
point
(pixel).Added in version 3.10.
- Parameters:
point (QPoint)
- Return type:
Optional[QScreen]
- static hasWebEngine() bool [source]¶
Checks whether QWebEngineView is available to display HTML content.
Added in version 3.42.
- Return type:
bool
- static higFlags() QgsGui.HigFlags [source]¶
Returns the platform’s HIG flags.
Added in version 3.4.
- Return type:
- static historyProviderRegistry() QgsHistoryProviderRegistry | None [source]¶
Returns the global history provider registry, used for tracking history providers.
Added in version 3.24.
- Return type:
Optional[QgsHistoryProviderRegistry]
- static inputControllerManager() QgsInputControllerManager | None [source]¶
Returns the global input controller manager.
Added in version 3.32.
- Return type:
Optional[QgsInputControllerManager]
- static instance() QgsGui | None [source]¶
Returns a pointer to the singleton instance.
- Return type:
Optional[QgsGui]
- static layerTreeEmbeddedWidgetRegistry() QgsLayerTreeEmbeddedWidgetRegistry | None [source]¶
Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view.
- Return type:
Optional[QgsLayerTreeEmbeddedWidgetRegistry]
- static layoutItemGuiRegistry() QgsLayoutItemGuiRegistry | None [source]¶
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items.
- Return type:
Optional[QgsLayoutItemGuiRegistry]
- static mapLayerActionRegistry() QgsMapLayerActionRegistry | None [source]¶
Returns the global map layer action registry, used for registering map layer actions.
- Return type:
Optional[QgsMapLayerActionRegistry]
- static numericFormatGuiRegistry() QgsNumericFormatGuiRegistry | None [source]¶
Returns the global numeric format gui registry, used for registering the GUI widgets associated with
QgsNumericFormats
.Added in version 3.12.
- Return type:
Optional[QgsNumericFormatGuiRegistry]
- signal optionsChanged[source]¶
This signal is emitted whenever the application options have been changed.
This signal is a “blanket” signal, and will be emitted whenever the options dialog has been accepted regardless of whether or not individual settings are changed. It is designed as a “last resort” fallback only, allowing widgets to respond to possible settings changes.
Added in version 3.16.
- static processingFavoriteAlgorithmManager() QgsProcessingFavoriteAlgorithmManager | None [source]¶
Returns the global Processing favorite algorithm manager, used for tracking favorite Processing algorithms.
Added in version 3.40.
- Return type:
Optional[QgsProcessingFavoriteAlgorithmManager]
- static processingGuiRegistry() QgsProcessingGuiRegistry | None [source]¶
Returns the global processing gui registry, used for registering the GUI behavior of processing algorithms.
Added in version 3.2.
- Return type:
Optional[QgsProcessingGuiRegistry]
- static processingRecentAlgorithmLog() QgsProcessingRecentAlgorithmLog | None [source]¶
Returns the global processing recent algorithm log, used for tracking recently used processing algorithms.
Added in version 3.4.
- Return type:
Optional[QgsProcessingRecentAlgorithmLog]
- static projectStorageGuiRegistry() QgsProjectStorageGuiRegistry | None [source]¶
Returns the global GUI-related project storage registry
Added in version 3.10.
- Return type:
Optional[QgsProjectStorageGuiRegistry]
- static providerGuiRegistry() QgsProviderGuiRegistry | None [source]¶
Returns the registry of GUI-related components of data providers
Added in version 3.10.
- Return type:
Optional[QgsProviderGuiRegistry]
- static relationWidgetRegistry() QgsRelationWidgetRegistry | None [source]¶
Returns the global relation widget registry, used for managing all known relation widget factories.
Added in version 3.18.
- Return type:
Optional[QgsRelationWidgetRegistry]
- static sampleColor(point: QPoint) QColor [source]¶
Samples the color on screen at the specified global
point
(pixel).Added in version 3.10.
- Parameters:
point (QPoint)
- Return type:
QColor
- static sensorGuiRegistry() QgsSensorGuiRegistry | None [source]¶
Returns the registry of GUI-related components for sensors
Added in version 3.32.
- Return type:
Optional[QgsSensorGuiRegistry]
- static setWindowManager(manager: QgsWindowManagerInterface | None)[source]¶
Sets the global window
manager
. Ownership is transferred to theQgsGui
instance.See also
Added in version 3.4.
- Parameters:
manager (Optional[QgsWindowManagerInterface])
- static settingsEditorWidgetRegistry() QgsSettingsEditorWidgetRegistry | None [source]¶
Returns the registry of settings editors.
Added in version 3.32.
- Return type:
Optional[QgsSettingsEditorWidgetRegistry]
- static settingsRegistryGui() QgsSettingsRegistryGui | None [source]¶
Returns the gui’s settings registry, used for managing gui settings.
Added in version 3.22.
- Return type:
Optional[QgsSettingsRegistryGui]
- static shortcutsManager() QgsShortcutsManager | None [source]¶
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
- Return type:
Optional[QgsShortcutsManager]
- static sourceSelectProviderRegistry() QgsSourceSelectProviderRegistry | None [source]¶
Returns the global source select provider registry, used for managing all known source select widget factories.
- Return type:
Optional[QgsSourceSelectProviderRegistry]
- static sourceWidgetProviderRegistry() QgsProviderSourceWidgetProviderRegistry | None [source]¶
Returns the registry of provider source widget providers.
Added in version 3.18.
- Return type:
Optional[QgsProviderSourceWidgetProviderRegistry]
- static storedQueryManager() QgsStoredQueryManager | None [source]¶
Returns the global stored SQL query manager.
Added in version 3.44.
- Return type:
Optional[QgsStoredQueryManager]
- static subsetStringEditorProviderRegistry() QgsSubsetStringEditorProviderRegistry | None [source]¶
Returns the registry of subset string editors of data providers
Added in version 3.18.
- Return type:
Optional[QgsSubsetStringEditorProviderRegistry]
- static windowManager() QgsWindowManagerInterface | None [source]¶
Returns the global window manager, if set.
See also
Added in version 3.4.
- Return type:
Optional[QgsWindowManagerInterface]