QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsgui.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgui.cpp
3  ----------
4  begin : May 2017
5  copyright : (C) 2017 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 
19 #include <QScreen>
20 #include <QDesktopWidget>
21 #include <QMessageBox>
22 
23 #include "qgsgui.h"
28 #include "qgslayoutitemregistry.h"
32 #ifdef Q_OS_MACX
33 #include "qgsmacnative.h"
34 #elif defined (Q_OS_WIN)
35 #ifndef __MINGW32__
36 #include "qgswinnative.h"
37 #else
38 #include "qgsnative.h"
39 #endif
40 #elif defined (Q_OS_LINUX)
41 #include "qgslinuxnative.h"
42 #else
43 #include "qgsnative.h"
44 #endif
46 #include "qgsshortcutsmanager.h"
47 #include "qgswidgetstatehelper_p.h"
48 #include "qgslogger.h"
51 #include "qgssettings.h"
53 #include "qgsgdalguiprovider.h"
54 #include "qgsogrguiprovider.h"
55 #include "qgsproviderregistry.h"
56 #include "qgsproviderguiregistry.h"
58 #include "qgsmessagebar.h"
59 #include "qgsmessagebaritem.h"
66 #include "qgssettingsregistrygui.h"
68 
70 {
71  static QgsGui *sInstance( new QgsGui() );
72  return sInstance;
73 }
74 
76 {
77  return instance()->mNative;
78 }
79 
81 {
82  return instance()->mSettingsRegistryGui;
83 }
84 
86 {
87  return instance()->mEditorWidgetRegistry;
88 }
89 
91 {
92  return instance()->mRelationEditorRegistry;
93 }
94 
96 {
97  return instance()->mShapeMapToolRegistry;
98 }
99 
101 {
102  return instance()->mSourceSelectProviderRegistry;
103 }
104 
106 {
107  return instance()->mSubsetStringEditorProviderRegistry;
108 }
109 
111 {
112  return instance()->mProviderSourceWidgetProviderRegistry;
113 }
114 
116 {
117  return instance()->mShortcutsManager;
118 }
119 
121 {
122  return instance()->mLayerTreeEmbeddedWidgetRegistry;
123 }
124 
126 {
127  return instance()->mMapLayerActionRegistry;
128 }
129 
131 {
132  return instance()->mLayoutItemGuiRegistry;
133 }
134 
136 {
137  return instance()->mAnnotationItemGuiRegistry;
138 }
139 
141 {
142  return instance()->mProcessingGuiRegistry;
143 }
144 
146 {
147  return instance()->mNumericFormatGuiRegistry;
148 }
149 
151 {
152  return instance()->mCodeEditorColorSchemeRegistry;
153 }
154 
155 QgsProcessingRecentAlgorithmLog *QgsGui::processingRecentAlgorithmLog()
156 {
157  return instance()->mProcessingRecentAlgorithmLog;
158 }
159 
161 {
162  return instance()->mDataItemGuiProviderRegistry;
163 }
164 
166 {
167  return instance()->mProjectStorageGuiRegistry;
168 }
169 
171 {
172  return instance()->mProviderGuiRegistry;
173 }
174 
176 {
177  return instance()->mHistoryProviderRegistry;
178 }
179 
180 void QgsGui::enableAutoGeometryRestore( QWidget *widget, const QString &key )
181 {
182  if ( widget->objectName().isEmpty() )
183  {
184  QgsDebugMsg( QStringLiteral( "WARNING: No object name set. Best for it to be set objectName when using QgsGui::enableAutoGeometryRestore" ) );
185  }
186  instance()->mWidgetStateHelper->registerWidget( widget, key );
187 }
188 
189 QgsWindowManagerInterface *QgsGui::windowManager()
190 {
191  return instance()->mWindowManager.get();
192 }
193 
194 void QgsGui::setWindowManager( QgsWindowManagerInterface *manager )
195 {
196  instance()->mWindowManager.reset( manager );
197 }
198 
199 QgsGui::HigFlags QgsGui::higFlags()
200 {
201  if ( QgsApplication::settingsLocaleUserLocale.value().startsWith( QLatin1String( "en" ) ) )
202  {
204  }
205  else
206  {
207  return QgsGui::HigFlags();
208  }
209 }
210 
212 {
213  delete mProcessingGuiRegistry;
214  delete mDataItemGuiProviderRegistry;
215  delete mProcessingRecentAlgorithmLog;
216  delete mLayoutItemGuiRegistry;
217  delete mAnnotationItemGuiRegistry;
218  delete mLayerTreeEmbeddedWidgetRegistry;
219  delete mEditorWidgetRegistry;
220  delete mMapLayerActionRegistry;
221  delete mSourceSelectProviderRegistry;
222  delete mHistoryProviderRegistry;
223  delete mShortcutsManager;
224  delete mNative;
225  delete mNumericFormatGuiRegistry;
226  delete mWidgetStateHelper;
227  delete mProjectStorageGuiRegistry;
228  delete mProviderGuiRegistry;
229  delete mCodeEditorColorSchemeRegistry;
230  delete mSubsetStringEditorProviderRegistry;
231  delete mProviderSourceWidgetProviderRegistry;
232  delete mShapeMapToolRegistry;
233  delete mRelationEditorRegistry;
234  delete mSettingsRegistryGui;
235 }
236 
237 QColor QgsGui::sampleColor( QPoint point )
238 {
239  QScreen *screen = findScreenAt( point );
240  if ( ! screen )
241  {
242  return QColor();
243  }
244  const QPixmap snappedPixmap = screen->grabWindow( QApplication::desktop()->winId(), point.x(), point.y(), 1, 1 );
245  const QImage snappedImage = snappedPixmap.toImage();
246  return snappedImage.pixel( 0, 0 );
247 }
248 
249 QScreen *QgsGui::findScreenAt( QPoint point )
250 {
251  const QList< QScreen * > screens = QGuiApplication::screens();
252  for ( QScreen *screen : screens )
253  {
254  if ( screen->geometry().contains( point ) )
255  {
256  return screen;
257  }
258  }
259  return nullptr;
260 }
261 
262 QgsGui::QgsGui()
263 {
264 #ifdef Q_OS_MAC
265  QgsMacNative *macNative = new QgsMacNative();
266  macNative->setIconPath( QgsApplication::iconsPath() + QStringLiteral( "qgis-icon-macos.png" ) );
267  mNative = macNative;
268 #elif defined (Q_OS_WIN)
269 #ifndef __MINGW32__
270  mNative = new QgsWinNative();
271 #else
272  mNative = new QgsNative();
273 #endif
274 #elif defined(Q_OS_LINUX)
275  mNative = new QgsLinuxNative();
276 #else
277  mNative = new QgsNative();
278 #endif
279 
280  mSettingsRegistryGui = new QgsSettingsRegistryGui();
281 
282  mCodeEditorColorSchemeRegistry = new QgsCodeEditorColorSchemeRegistry();
283 
284  // provider gui registry initialize QgsProviderRegistry too
285  mHistoryProviderRegistry = new QgsHistoryProviderRegistry();
286  mHistoryProviderRegistry->addDefaultProviders();
287 
288  mProviderGuiRegistry = new QgsProviderGuiRegistry( QgsApplication::pluginPath() );
289  mProjectStorageGuiRegistry = new QgsProjectStorageGuiRegistry();
290  mDataItemGuiProviderRegistry = new QgsDataItemGuiProviderRegistry();
291  mSourceSelectProviderRegistry = new QgsSourceSelectProviderRegistry();
292  mNumericFormatGuiRegistry = new QgsNumericFormatGuiRegistry();
293  mSubsetStringEditorProviderRegistry = new QgsSubsetStringEditorProviderRegistry();
294  mProviderSourceWidgetProviderRegistry = new QgsProviderSourceWidgetProviderRegistry();
295 
296  mProjectStorageGuiRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry );
297  mDataItemGuiProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry );
298  mSourceSelectProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry );
299  mSubsetStringEditorProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry );
300  mProviderSourceWidgetProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry );
301 
302  mEditorWidgetRegistry = new QgsEditorWidgetRegistry();
303  mRelationEditorRegistry = new QgsRelationWidgetRegistry();
304  mShapeMapToolRegistry = new QgsMapToolShapeRegistry();
305  mShortcutsManager = new QgsShortcutsManager();
306  mLayerTreeEmbeddedWidgetRegistry = new QgsLayerTreeEmbeddedWidgetRegistry();
307  mMapLayerActionRegistry = new QgsMapLayerActionRegistry();
308  mLayoutItemGuiRegistry = new QgsLayoutItemGuiRegistry();
309 
310  mAnnotationItemGuiRegistry = new QgsAnnotationItemGuiRegistry();
311  mAnnotationItemGuiRegistry->addDefaultItems();
312 
313  mWidgetStateHelper = new QgsWidgetStateHelper();
314  mProcessingRecentAlgorithmLog = new QgsProcessingRecentAlgorithmLog();
315  mProcessingGuiRegistry = new QgsProcessingGuiRegistry();
316 }
317 
318 bool QgsGui::pythonMacroAllowed( void ( *lambda )(), QgsMessageBar *messageBar )
319 {
320  const Qgis::PythonMacroMode macroMode = QgsSettings().enumValue( QStringLiteral( "qgis/enableMacros" ), Qgis::PythonMacroMode::Ask );
321 
322  switch ( macroMode )
323  {
326  if ( lambda )
327  lambda();
328  return true;
331  if ( messageBar )
332  {
333  messageBar->pushMessage( tr( "Python Macros" ),
334  tr( "Python macros are currently disabled and will not be run" ),
335  Qgis::MessageLevel::Warning );
336  }
337  return false;
339  if ( !lambda )
340  {
341  QMessageBox msgBox( QMessageBox::Information, tr( "Python Macros" ),
342  tr( "Python macros are currently disabled. Do you allow this macro to run?" ) );
343  QAbstractButton *stopSessionButton = msgBox.addButton( tr( "Disable for this Session" ), QMessageBox::DestructiveRole );
344  msgBox.addButton( tr( "No" ), QMessageBox::NoRole );
345  QAbstractButton *yesButton = msgBox.addButton( tr( "Yes" ), QMessageBox::YesRole );
346  msgBox.exec();
347 
348  QAbstractButton *clicked = msgBox.clickedButton();
349  if ( clicked == stopSessionButton )
350  {
351  QgsSettings().setEnumValue( QStringLiteral( "qgis/enableMacros" ), Qgis::PythonMacroMode::NotForThisSession );
352  }
353  return clicked == yesButton;
354  }
355  else
356  {
357  // create the notification widget for macros
358  Q_ASSERT( messageBar );
359  if ( messageBar )
360  {
361  QToolButton *btnEnableMacros = new QToolButton();
362  btnEnableMacros->setText( tr( "Enable Macros" ) );
363  btnEnableMacros->setStyleSheet( QStringLiteral( "background-color: rgba(255, 255, 255, 0); color: black; text-decoration: underline;" ) );
364  btnEnableMacros->setCursor( Qt::PointingHandCursor );
365  btnEnableMacros->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred );
366 
367  QgsMessageBarItem *macroMsg = new QgsMessageBarItem(
368  tr( "Security warning" ),
369  tr( "Python macros cannot currently be run." ),
370  btnEnableMacros,
371  Qgis::MessageLevel::Warning,
372  0,
373  messageBar );
374 
375  connect( btnEnableMacros, &QToolButton::clicked, messageBar, [ = ]()
376  {
377  lambda();
378  messageBar->popWidget( macroMsg );
379  } );
380 
381  // display the macros notification widget
382  messageBar->pushItem( macroMsg );
383  }
384 
385  return false;
386  }
387  }
388  return false;
389 }
390 
392 void QgsGui::emitOptionsChanged()
393 {
394  emit optionsChanged();
395 }
QgsDataItemGuiProviderRegistry
This class keeps a list of data item GUI providers that may affect how QgsDataItems behave within the...
Definition: qgsdataitemguiproviderregistry.h:37
qgsdataitemguiproviderregistry.h
QgsProviderSourceWidgetProviderRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition: qgsprovidersourcewidgetproviderregistry.cpp:52
QgsGui::editorWidgetRegistry
static QgsEditorWidgetRegistry * editorWidgetRegistry()
Returns the global editor widget registry, used for managing all known edit widget factories.
Definition: qgsgui.cpp:85
QgsGui::pythonMacroAllowed
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,...
Definition: qgsgui.cpp:318
QgsSourceSelectProviderRegistry
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDial...
Definition: qgssourceselectproviderregistry.h:41
QgsGui::settingsRegistryGui
static QgsSettingsRegistryGui * settingsRegistryGui()
Returns the gui's settings registry, used for managing gui settings.
Definition: qgsgui.cpp:80
qgsmessagebaritem.h
QgsGui::sampleColor
static QColor sampleColor(QPoint point)
Samples the color on screen at the specified global point (pixel).
Definition: qgsgui.cpp:237
QgsCodeEditorColorSchemeRegistry
A registry of color schemes for use in QgsCodeEditor widgets.
Definition: qgscodeeditorcolorschemeregistry.h:35
qgsshortcutsmanager.h
qgslayertreeembeddedwidgetregistry.h
Qgis::PythonMacroMode::SessionOnly
@ SessionOnly
Only during this session.
qgssubsetstringeditorproviderregistry.h
QgsGui::HigMenuTextIsTitleCase
@ HigMenuTextIsTitleCase
Menu action texts should be title case.
Definition: qgsgui.h:234
QgsGui::setWindowManager
static void setWindowManager(QgsWindowManagerInterface *manager)
Sets the global window manager.
Definition: qgsgui.cpp:194
Qgis::PythonMacroMode
PythonMacroMode
Vector layer type flags.
Definition: qgis.h:179
QgsGui::mapLayerActionRegistry
static QgsMapLayerActionRegistry * mapLayerActionRegistry()
Returns the global map layer action registry, used for registering map layer actions.
Definition: qgsgui.cpp:125
qgsgui.h
qgsrelationwidgetregistry.h
QgsAnnotationItemGuiRegistry
Registry of available annotation item GUI behavior.
Definition: qgsannotationitemguiregistry.h:304
QgsGui::providerGuiRegistry
static QgsProviderGuiRegistry * providerGuiRegistry()
Returns the registry of GUI-related components of data providers.
Definition: qgsgui.cpp:170
qgsannotationitemguiregistry.h
QgsWidgetStateHelper
QgsWidgetStateHelper is a helper class to save and restore the geometry of QWidgets in the applicatio...
Definition: qgswidgetstatehelper_p.h:32
QgsGui::windowManager
static QgsWindowManagerInterface * windowManager()
Returns the global window manager, if set.
Definition: qgsgui.cpp:189
QgsSubsetStringEditorProviderRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition: qgssubsetstringeditorproviderregistry.cpp:53
QgsDataItemGuiProviderRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition: qgsdataitemguiproviderregistry.cpp:41
QgsGui::higFlags
static QgsGui::HigFlags higFlags()
Returns the platform's HIG flags.
Definition: qgsgui.cpp:199
Qgis::PythonMacroMode::Never
@ Never
Macros are never run.
QgsSettings
This class is a composition of two QSettings instances:
Definition: qgssettings.h:61
QgsGui::HigDialogTitleIsTitleCase
@ HigDialogTitleIsTitleCase
Dialog titles should be title case.
Definition: qgsgui.h:235
QgsDebugMsg
#define QgsDebugMsg(str)
Definition: qgslogger.h:38
QgsMessageBar::popWidget
bool popWidget(QgsMessageBarItem *item)
Remove the specified item from the bar, and display the next most recent one in the stack.
Definition: qgsmessagebar.cpp:161
Qgis::PythonMacroMode::Always
@ Always
Macros are always run.
QgsGui::codeEditorColorSchemeRegistry
static QgsCodeEditorColorSchemeRegistry * codeEditorColorSchemeRegistry()
Returns the global code editor color scheme registry, used for registering the color schemes for QgsC...
Definition: qgsgui.cpp:150
qgsproviderguiregistry.h
QgsHistoryProviderRegistry::addDefaultProviders
void addDefaultProviders()
Adds the default history providers to the registry.
Definition: qgshistoryproviderregistry.cpp:81
QgsShortcutsManager
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
Definition: qgsshortcutsmanager.h:37
qgssourceselectproviderregistry.h
QgsGui::enableAutoGeometryRestore
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...
Definition: qgsgui.cpp:180
qgslayoutviewrubberband.h
qgswidgetstatehelper_p.h
QgsGui::findScreenAt
static QScreen * findScreenAt(QPoint point)
Returns the screen at the given global point (pixel).
Definition: qgsgui.cpp:249
QgsMapToolShapeRegistry
Keeps track of the registered shape map tools.
Definition: qgsmaptoolshaperegistry.h:35
qgsproviderregistry.h
Qgis::PythonMacroMode::Ask
@ Ask
User is prompt before running.
QgsHistoryProviderRegistry
The QgsHistoryProviderRegistry is a registry for objects which track user history (i....
Definition: qgshistoryproviderregistry.h:89
QgsMapLayerActionRegistry
This class tracks map layer actions.
Definition: qgsmaplayeractionregistry.h:149
QgsApplication::iconsPath
static QString iconsPath()
Returns the path to the icons image directory.
Definition: qgsapplication.cpp:1119
QgsMessageBarItem
Represents an item shown within a QgsMessageBar widget.
Definition: qgsmessagebaritem.h:38
QgsGui::~QgsGui
~QgsGui()
Definition: qgsgui.cpp:211
QgsGui::projectStorageGuiRegistry
static QgsProjectStorageGuiRegistry * projectStorageGuiRegistry()
Returns the global GUI-related project storage registry.
Definition: qgsgui.cpp:165
QgsMessageBar::pushItem
void pushItem(QgsMessageBarItem *item)
Display a message item on the bar, after hiding the currently visible one and putting it in a stack.
Definition: qgsmessagebar.cpp:295
QgsLayerTreeEmbeddedWidgetRegistry
Registry of widgets that may be embedded into layer tree view. Embedded widgets are assigned per indi...
Definition: qgslayertreeembeddedwidgetregistry.h:70
QgsSettings::setEnumValue
void setEnumValue(const QString &key, const T &value, const Section section=NoSection)
Set the value of a setting based on an enum.
Definition: qgssettings.h:334
QgsRelationWidgetRegistry
Keeps track of the registered relations widgets.
Definition: qgsrelationwidgetregistry.h:31
QgsGui::processingGuiRegistry
static QgsProcessingGuiRegistry * processingGuiRegistry()
Returns the global processing gui registry, used for registering the GUI behavior of processing algor...
Definition: qgsgui.cpp:140
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:60
qgsprovidersourcewidgetproviderregistry.h
QgsProviderGuiRegistry
A registry / canonical manager of GUI parts of data providers.
Definition: qgsproviderguiregistry.h:53
qgslayoutitemguiregistry.h
qgsnumericformatguiregistry.h
Qgis::PythonMacroMode::NotForThisSession
@ NotForThisSession
Macros will not be run for this session.
qgsmessagebar.h
QgsApplication::settingsLocaleUserLocale
static const QgsSettingsEntryString settingsLocaleUserLocale
Settings entry locale user locale.
Definition: qgsapplication.h:1029
QgsGui::subsetStringEditorProviderRegistry
static QgsSubsetStringEditorProviderRegistry * subsetStringEditorProviderRegistry()
Returns the registry of subset string editors of data providers.
Definition: qgsgui.cpp:105
QgsSubsetStringEditorProviderRegistry
This class keeps a list of subset string editor providers.
Definition: qgssubsetstringeditorproviderregistry.h:39
qgsmaplayeractionregistry.h
QgsGui::layerTreeEmbeddedWidgetRegistry
static QgsLayerTreeEmbeddedWidgetRegistry * layerTreeEmbeddedWidgetRegistry()
Returns the global layer tree embedded widget registry, used for registering widgets that may be embe...
Definition: qgsgui.cpp:120
QgsGui::nativePlatformInterface
static QgsNative * nativePlatformInterface()
Returns the global native interface, which offers abstraction to the host OS's underlying public inte...
Definition: qgsgui.cpp:75
QgsProviderSourceWidgetProviderRegistry
This class keeps a list of provider source widget providers.
Definition: qgsprovidersourcewidgetproviderregistry.h:39
QgsGui::optionsChanged
void optionsChanged()
This signal is emitted whenever the application options have been changed.
QgsSourceSelectProviderRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition: qgssourceselectproviderregistry.cpp:55
QgsGui::dataItemGuiProviderRegistry
static QgsDataItemGuiProviderRegistry * dataItemGuiProviderRegistry()
Returns the global data item GUI provider registry, used for tracking providers which affect the brow...
Definition: qgsgui.cpp:160
QgsGui::sourceWidgetProviderRegistry
static QgsProviderSourceWidgetProviderRegistry * sourceWidgetProviderRegistry()
Returns the registry of provider source widget providers.
Definition: qgsgui.cpp:110
QgsGui::mapToolShapeRegistry
static QgsMapToolShapeRegistry * mapToolShapeRegistry()
Returns the registry of shape map tools.
Definition: qgsgui.cpp:95
qgsmaptoolshaperegistry.h
qgsprojectstorageguiregistry.h
qgseditorwidgetregistry.h
QgsGui::annotationItemGuiRegistry
static QgsAnnotationItemGuiRegistry * annotationItemGuiRegistry()
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation ...
Definition: qgsgui.cpp:135
QgsGui::instance
static QgsGui * instance()
Returns a pointer to the singleton instance.
Definition: qgsgui.cpp:69
QgsGui::relationWidgetRegistry
static QgsRelationWidgetRegistry * relationWidgetRegistry()
Returns the global relation widget registry, used for managing all known relation widget factories.
Definition: qgsgui.cpp:90
QgsProcessingGuiRegistry
The QgsProcessingGuiRegistry is a home for widgets for processing configuration widgets.
Definition: qgsprocessingguiregistry.h:44
qgssettings.h
QgsProjectStorageGuiRegistry::initializeFromProviderGuiRegistry
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
Definition: qgsprojectstorageguiregistry.cpp:61
qgsprocessingrecentalgorithmlog.h
qgssettingsregistrygui.h
QgsGui::shortcutsManager
static QgsShortcutsManager * shortcutsManager()
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
Definition: qgsgui.cpp:115
QgsGui::historyProviderRegistry
static QgsHistoryProviderRegistry * historyProviderRegistry()
Returns the global history provider registry, used for tracking history providers.
Definition: qgsgui.cpp:175
QgsSettingsRegistryGui
QgsSettingsRegistryGui is used for settings introspection and collects all QgsSettingsEntry instances...
Definition: qgssettingsregistrygui.h:33
QgsSettings::enumValue
T enumValue(const QString &key, const T &defaultValue, const Section section=NoSection)
Returns the setting value for a setting based on an enum.
Definition: qgssettings.h:282
qgslogger.h
qgsprocessingguiregistry.h
qgscodeeditorcolorschemeregistry.h
QgsNumericFormatGuiRegistry
The QgsNumericFormatGuiRegistry is a home for widgets for configuring QgsNumericFormat objects.
Definition: qgsnumericformatguiregistry.h:55
qgslayoutitemregistry.h
QgsProjectStorageGuiRegistry
A registry / canonical manager of GUI parts of project storage backends.
Definition: qgsprojectstorageguiregistry.h:44
qgswindowmanagerinterface.h
QgsGui::layoutItemGuiRegistry
static QgsLayoutItemGuiRegistry * layoutItemGuiRegistry()
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items.
Definition: qgsgui.cpp:130
qgshistoryproviderregistry.h
QgsEditorWidgetRegistry
This class manages all known edit widget factories.
Definition: qgseditorwidgetregistry.h:44
QgsAnnotationItemGuiRegistry::addDefaultItems
void addDefaultItems()
Populates the registry with default items.
Definition: qgsannotationitemguiregistry.cpp:179
QgsGui::numericFormatGuiRegistry
static QgsNumericFormatGuiRegistry * numericFormatGuiRegistry()
Returns the global numeric format gui registry, used for registering the GUI widgets associated with ...
Definition: qgsgui.cpp:145
QgsMessageBar::pushMessage
void pushMessage(const QString &text, Qgis::MessageLevel level=Qgis::MessageLevel::Info, int duration=-1)
A convenience method for pushing a message with the specified text to the bar.
Definition: qgsmessagebar.cpp:405
QgsWidgetStateHelper::registerWidget
void registerWidget(QWidget *widget, const QString &key=QString())
Register a widget to have it geometry state automatically saved and restored.
Definition: qgswidgetstatehelper_p.cpp:72
QgsApplication::pluginPath
static QString pluginPath()
Returns the path to the application plugin directory.
Definition: qgsapplication.cpp:640
QgsGui::sourceSelectProviderRegistry
static QgsSourceSelectProviderRegistry * sourceSelectProviderRegistry()
Returns the global source select provider registry, used for managing all known source select widget ...
Definition: qgsgui.cpp:100
QgsGui::processingRecentAlgorithmLog
static QgsProcessingRecentAlgorithmLog * processingRecentAlgorithmLog()
Returns the global processing recent algorithm log, used for tracking recently used processing algori...
Definition: qgsgui.cpp:155
QgsGui
QgsGui is a singleton class containing various registry and other global members related to GUI class...
Definition: qgsgui.h:57
QgsLayoutItemGuiRegistry
Registry of available layout item GUI behavior.
Definition: qgslayoutitemguiregistry.h:360