QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
QgsGui is a singleton class containing various registry and other global members related to GUI classes. More...
#include <qgsgui.h>
Public Types | |
enum | HigFlag { HigMenuTextIsTitleCase = 1 << 0 , HigDialogTitleIsTitleCase = 1 << 1 } |
HIG flags, which indicate the Human Interface Guidelines for the current platform. More... | |
enum | ProjectCrsBehavior { UseCrsOfFirstLayerAdded = 1 , UsePresetCrs = 2 } |
Defines the behavior to use when setting the CRS for a newly created project. More... | |
Signals | |
void | optionsChanged () |
This signal is emitted whenever the application options have been changed. More... | |
Public Member Functions | |
QgsGui (const QgsGui &other)=delete | |
QgsGui cannot be copied. More... | |
~QgsGui () | |
QgsGui & | operator= (const QgsGui &other)=delete |
QgsGui cannot be copied. More... | |
Static Public Member Functions | |
static QgsAnnotationItemGuiRegistry * | annotationItemGuiRegistry () |
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation items. More... | |
static QgsCodeEditorColorSchemeRegistry * | codeEditorColorSchemeRegistry () |
Returns the global code editor color scheme registry, used for registering the color schemes for QgsCodeEditor widgets. More... | |
static QgsDataItemGuiProviderRegistry * | dataItemGuiProviderRegistry () |
Returns the global data item GUI provider registry, used for tracking providers which affect the browser GUI. More... | |
static QgsEditorWidgetRegistry * | editorWidgetRegistry () |
Returns the global editor widget registry, used for managing all known edit widget factories. More... | |
static void | enableAutoGeometryRestore (QWidget *widget, const QString &key=QString()) |
Register the widget to allow its position to be automatically saved and restored when open and closed. More... | |
static QScreen * | findScreenAt (QPoint point) |
Returns the screen at the given global point (pixel). More... | |
static QgsGui::HigFlags | higFlags () |
Returns the platform's HIG flags. More... | |
static QgsGui * | instance () |
Returns a pointer to the singleton instance. More... | |
static QgsLayerTreeEmbeddedWidgetRegistry * | layerTreeEmbeddedWidgetRegistry () |
Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view. More... | |
static QgsLayoutItemGuiRegistry * | layoutItemGuiRegistry () |
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items. More... | |
static QgsMapLayerActionRegistry * | mapLayerActionRegistry () |
Returns the global map layer action registry, used for registering map layer actions. More... | |
static QgsNative * | nativePlatformInterface () |
Returns the global native interface, which offers abstraction to the host OS's underlying public interfaces. More... | |
static QgsNumericFormatGuiRegistry * | numericFormatGuiRegistry () |
Returns the global numeric format gui registry, used for registering the GUI widgets associated with QgsNumericFormats. More... | |
static QgsProcessingGuiRegistry * | processingGuiRegistry () |
Returns the global processing gui registry, used for registering the GUI behavior of processing algorithms. More... | |
static QgsProcessingRecentAlgorithmLog * | processingRecentAlgorithmLog () |
Returns the global processing recent algorithm log, used for tracking recently used processing algorithms. More... | |
static QgsProjectStorageGuiRegistry * | projectStorageGuiRegistry () |
Returns the global GUI-related project storage registry. More... | |
static QgsProviderGuiRegistry * | providerGuiRegistry () |
Returns the registry of GUI-related components of data providers. More... | |
static bool | pythonMacroAllowed (void(*lambda)()=nullptr, QgsMessageBar *messageBar=nullptr) |
Returns true if python macros are currently allowed to be run If the global option is to ask user, a modal dialog will be shown. More... | |
static QgsRelationWidgetRegistry * | relationWidgetRegistry () |
Returns the global relation widget registry, used for managing all known relation widget factories. More... | |
static QColor | sampleColor (QPoint point) |
Samples the color on screen at the specified global point (pixel). More... | |
static QgsSettingsRegistryGui * | settingsRegistryGui () |
Returns the gui's settings registry, used for managing gui settings. More... | |
static void | setWindowManager (QgsWindowManagerInterface *manager) |
Sets the global window manager. More... | |
static QgsShortcutsManager * | shortcutsManager () |
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences. More... | |
static QgsSourceSelectProviderRegistry * | sourceSelectProviderRegistry () |
Returns the global source select provider registry, used for managing all known source select widget factories. More... | |
static QgsProviderSourceWidgetProviderRegistry * | sourceWidgetProviderRegistry () |
Returns the registry of provider source widget providers. More... | |
static QgsSubsetStringEditorProviderRegistry * | subsetStringEditorProviderRegistry () |
Returns the registry of subset string editors of data providers. More... | |
static QgsWindowManagerInterface * | windowManager () |
Returns the global window manager, if set. More... | |
QgsGui is a singleton class containing various registry and other global members related to GUI classes.
enum QgsGui::HigFlag |
QgsGui::~QgsGui | ( | ) |
Definition at line 199 of file qgsgui.cpp.
|
static |
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation items.
Definition at line 128 of file qgsgui.cpp.
|
static |
Returns the global code editor color scheme registry, used for registering the color schemes for QgsCodeEditor widgets.
Definition at line 143 of file qgsgui.cpp.
|
static |
Returns the global data item GUI provider registry, used for tracking providers which affect the browser GUI.
Definition at line 153 of file qgsgui.cpp.
|
static |
Returns the global editor widget registry, used for managing all known edit widget factories.
Definition at line 83 of file qgsgui.cpp.
|
static |
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.
Definition at line 168 of file qgsgui.cpp.
|
static |
Returns the screen at the given global point (pixel).
Definition at line 235 of file qgsgui.cpp.
|
static |
|
static |
Returns a pointer to the singleton instance.
Definition at line 67 of file qgsgui.cpp.
|
static |
Returns the global layer tree embedded widget registry, used for registering widgets that may be embedded into layer tree view.
Definition at line 113 of file qgsgui.cpp.
|
static |
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items.
Definition at line 123 of file qgsgui.cpp.
|
static |
Returns the global map layer action registry, used for registering map layer actions.
Definition at line 118 of file qgsgui.cpp.
|
static |
Returns the global native interface, which offers abstraction to the host OS's underlying public interfaces.
Definition at line 73 of file qgsgui.cpp.
|
static |
Returns the global numeric format gui registry, used for registering the GUI widgets associated with QgsNumericFormats.
Definition at line 138 of file qgsgui.cpp.
|
signal |
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.
|
static |
Returns the global processing gui registry, used for registering the GUI behavior of processing algorithms.
Definition at line 133 of file qgsgui.cpp.
|
static |
Returns the global processing recent algorithm log, used for tracking recently used processing algorithms.
Definition at line 148 of file qgsgui.cpp.
|
static |
Returns the global GUI-related project storage registry.
Definition at line 158 of file qgsgui.cpp.
|
static |
Returns the registry of GUI-related components of data providers.
Definition at line 163 of file qgsgui.cpp.
|
static |
Returns true
if python macros are currently allowed to be run If the global option is to ask user, a modal dialog will be shown.
lambda | a pointer to a lambda method. If specified, the dialog is not modal, a message is shown with a button to enable macro. The lambda will be run either if macros are currently allowed or if the user accepts the message. The messageBar must be given in such case. |
messageBar | the message bar must be provided if a lambda method is used. |
Definition at line 300 of file qgsgui.cpp.
|
static |
Returns the global relation widget registry, used for managing all known relation widget factories.
Definition at line 88 of file qgsgui.cpp.
|
static |
Samples the color on screen at the specified global point (pixel).
Definition at line 223 of file qgsgui.cpp.
|
static |
Returns the gui's settings registry, used for managing gui settings.
Definition at line 78 of file qgsgui.cpp.
|
static |
Sets the global window manager.
Ownership is transferred to the QgsGui instance.
Definition at line 182 of file qgsgui.cpp.
|
static |
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
Definition at line 108 of file qgsgui.cpp.
|
static |
Returns the global source select provider registry, used for managing all known source select widget factories.
Definition at line 93 of file qgsgui.cpp.
|
static |
Returns the registry of provider source widget providers.
Definition at line 103 of file qgsgui.cpp.
|
static |
Returns the registry of subset string editors of data providers.
Definition at line 98 of file qgsgui.cpp.
|
static |
Returns the global window manager, if set.
Definition at line 177 of file qgsgui.cpp.