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" 61 return instance()->mEditorWidgetRegistry;
66 return instance()->mSourceSelectProviderRegistry;
71 return instance()->mShortcutsManager;
76 return instance()->mLayerTreeEmbeddedWidgetRegistry;
81 return instance()->mMapLayerActionRegistry;
86 return instance()->mLayoutItemGuiRegistry;
91 return instance()->mProcessingGuiRegistry;
96 return instance()->mProcessingRecentAlgorithmLog;
101 return instance()->mDataItemGuiProviderRegistry;
106 if ( widget->objectName().isEmpty() )
108 QgsDebugMsg( QStringLiteral(
"WARNING: No object name set. Best for it to be set objectName when using QgsGui::enableAutoGeometryRestore" ) );
115 return instance()->mWindowManager.get();
120 instance()->mWindowManager.reset( manager );
126 if ( settings.
value( QStringLiteral(
"locale/userLocale" ), QString() ).toString().startsWith( QLatin1String(
"en" ) ) )
138 delete mProcessingGuiRegistry;
139 delete mDataItemGuiProviderRegistry;
140 delete mProcessingRecentAlgorithmLog;
141 delete mLayoutItemGuiRegistry;
142 delete mLayerTreeEmbeddedWidgetRegistry;
143 delete mEditorWidgetRegistry;
144 delete mMapLayerActionRegistry;
145 delete mSourceSelectProviderRegistry;
146 delete mShortcutsManager;
148 delete mWidgetStateHelper;
154 QgsMacNative *macNative =
new QgsMacNative();
157 #elif defined (Q_OS_WIN) 159 mNative =
new QgsWinNative();
161 mNative =
new QgsNative();
163 #elif defined(Q_OS_LINUX) 164 mNative =
new QgsLinuxNative();
166 mNative =
new QgsNative();
176 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...
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
QgsGui is a singleton class containing various registry and other global members related to GUI class...
static QgsDataItemGuiProviderRegistry * dataItemGuiProviderRegistry()
Returns the global data item GUI provider registry, used for tracking providers which affect the brow...
static QgsSourceSelectProviderRegistry * sourceSelectProviderRegistry()
Returns the global source select provider registry, used for managing all known source select widget ...
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...
This class keeps a list of data item GUI providers that may affect how QgsDataItems behave within the...
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.