Class: QgsGui¶
-
class
qgis.gui.
QgsGui
¶ Bases:
PyQt5.QtCore.QObject
QgsGui
is a singleton class containing various registry and other global members related to GUI classes.Methods
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).Returns the platform’s HIG flags.
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 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
Samples the color on screen at the specified global
point
(pixel).Sets the global window
manager
.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 global window manager, if set.
Attributes
-
HigDialogTitleIsTitleCase
= 2¶
-
class
HigFlag
¶ Bases:
int
-
class
HigFlags
¶ Bases:
sip.wrapper
QgsGui.HigFlags(Union[QgsGui.HigFlags, QgsGui.HigFlag]) QgsGui.HigFlags(QgsGui.HigFlags)
-
HigMenuTextIsTitleCase
= 1¶
-
UseCrsOfFirstLayerAdded
= 1¶
-
UsePresetCrs
= 2¶
-
dataItemGuiProviderRegistry
() → QgsDataItemGuiProviderRegistry¶ Returns the global data item GUI provider registry, used for tracking providers which affect the browser GUI.
New in version 3.6.
- Return type
-
editorWidgetRegistry
() → QgsEditorWidgetRegistry¶ Returns the global editor widget registry, used for managing all known edit widget factories.
- Return type
-
enableAutoGeometryRestore
(widget: QWidget, key: str = '')¶ 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() and restoreGeometry() on your widget.
- Parameters
widget (QWidget) –
key (str = '') –
-
findScreenAt
(point: QPoint) → QScreen¶ Returns the screen at the given global
point
(pixel).New in version 3.10.
- Parameters
point (QPoint) –
- Return type
QScreen
-
higFlags
() → QgsGui.HigFlags¶ Returns the platform’s HIG flags.
New in version 3.4.
- Return type
-
layerTreeEmbeddedWidgetRegistry
() → QgsLayerTreeEmbeddedWidgetRegistry¶ Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view.
- Return type
-
layoutItemGuiRegistry
() → QgsLayoutItemGuiRegistry¶ Returns the global layout item GUI registry, used for registering the GUI behavior of layout items.
- Return type
-
mapLayerActionRegistry
() → QgsMapLayerActionRegistry¶ Returns the global map layer action registry, used for registering map layer actions.
- Return type
-
processingGuiRegistry
() → QgsProcessingGuiRegistry¶ Returns the global processing gui registry, used for registering the GUI behavior of processing algorithms.
New in version 3.2.
- Return type
-
processingRecentAlgorithmLog
() → QgsProcessingRecentAlgorithmLog¶ Returns the global processing recent algorithm log, used for tracking recently used processing algorithms.
New in version 3.4.
- Return type
-
projectStorageGuiRegistry
() → QgsProjectStorageGuiRegistry¶ Returns the global GUI-related project storage registry
New in version 3.10.
- Return type
-
providerGuiRegistry
() → QgsProviderGuiRegistry¶ Returns the registry of GUI-related components of data providers
New in version 3.10.
- Return type
-
sampleColor
(point: QPoint) → QColor¶ Samples the color on screen at the specified global
point
(pixel).New in version 3.10.
- Parameters
point (QPoint) –
- Return type
QColor
-
setWindowManager
(manager: QgsWindowManagerInterface)¶ Sets the global window
manager
. Ownership is transferred to theQgsGui
instance.See also
New in version 3.4.
- Parameters
manager (QgsWindowManagerInterface) –
-
shortcutsManager
() → QgsShortcutsManager¶ Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
- Return type
-
sourceSelectProviderRegistry
() → QgsSourceSelectProviderRegistry¶ Returns the global source select provider registry, used for managing all known source select widget factories.
- Return type
-
windowManager
() → QgsWindowManagerInterface¶ Returns the global window manager, if set.
See also
New in version 3.4.
- Return type
-