27 #include "qgsmacnative.h" 28 #elif defined (Q_OS_WIN) 30 #include "qgswinnative.h" 32 #include "qgsnative.h" 34 #elif defined (Q_OS_LINUX) 35 #include "qgslinuxnative.h" 37 #include "qgsnative.h" 60 return instance()->mEditorWidgetRegistry;
65 return instance()->mSourceSelectProviderRegistry;
70 return instance()->mShortcutsManager;
75 return instance()->mLayerTreeEmbeddedWidgetRegistry;
80 return instance()->mMapLayerActionRegistry;
85 return instance()->mLayoutItemGuiRegistry;
90 return instance()->mProcessingGuiRegistry;
95 return instance()->mProcessingRecentAlgorithmLog;
100 if ( widget->objectName().isEmpty() )
102 QgsDebugMsg( QStringLiteral(
"WARNING: No object name set. Best for it to be set objectName when using QgsGui::enableAutoGeometryRestore" ) );
109 return instance()->mWindowManager.get();
114 instance()->mWindowManager.reset( manager );
120 if ( settings.
value( QStringLiteral(
"locale/userLocale" ), QString() ).toString().startsWith( QLatin1String(
"en" ) ) )
132 delete mProcessingGuiRegistry;
133 delete mProcessingRecentAlgorithmLog;
134 delete mLayoutItemGuiRegistry;
135 delete mLayerTreeEmbeddedWidgetRegistry;
136 delete mEditorWidgetRegistry;
137 delete mMapLayerActionRegistry;
138 delete mSourceSelectProviderRegistry;
139 delete mShortcutsManager;
141 delete mWidgetStateHelper;
147 QgsMacNative *macNative =
new QgsMacNative();
150 #elif defined (Q_OS_WIN) 152 mNative =
new QgsWinNative();
154 mNative =
new QgsNative();
156 #elif defined(Q_OS_LINUX) 157 mNative =
new QgsLinuxNative();
159 mNative =
new QgsNative();
169 mProcessingRecentAlgorithmLog =
new QgsProcessingRecentAlgorithmLog();
static QgsProcessingGuiRegistry * processingGuiRegistry()
Returns the global processing gui registry, used for registering the GUI behavior of processing algor...
static QgsWindowManagerInterface * windowManager()
Returns the global window manager, if set.
This class is a composition of two QSettings instances:
Dialog titles should be title case.
static QgsNative * nativePlatformInterface()
Returns the global native interface, which offers abstraction to the host OS's underlying public inte...
QgsGui is a singleton class containing various registry and other global members related to GUI class...
static QgsSourceSelectProviderRegistry * sourceSelectProviderRegistry()
Returns the global source select provider registry, used for managing all known source select widget ...
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
The QgsProcessingGuiRegistry is a home for widgets for processing configuration widgets.
Registry of available layout item GUI behavior.
static QgsGui * instance()
Returns a pointer to the singleton instance.
QgsGui(const QgsGui &other)=delete
QgsGui cannot be copied.
static QgsShortcutsManager * shortcutsManager()
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
static QgsLayoutItemGuiRegistry * layoutItemGuiRegistry()
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items...
static QgsLayerTreeEmbeddedWidgetRegistry * layerTreeEmbeddedWidgetRegistry()
Returns the global layer tree embedded widget registry, used for registering widgets that may be embe...
static QgsEditorWidgetRegistry * editorWidgetRegistry()
Returns the global editor widget registry, used for managing all known edit widget factories...
static QgsProcessingRecentAlgorithmLog * processingRecentAlgorithmLog()
Returns the global processing recent algorithm log, used for tracking recently used processing algori...
This class tracks map layer actions.
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDial...
Menu action texts should be title case.
static void setWindowManager(QgsWindowManagerInterface *manager)
Sets the global window manager.
static QgsGui::HigFlags higFlags()
Returns the platform's HIG flags.
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...
static QString iconsPath()
Returns the path to the icons image directory.
static QgsMapLayerActionRegistry * mapLayerActionRegistry()
Returns the global map layer action registry, used for registering map layer actions.