QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
Loading...
Searching...
No Matches
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 "qgsgui.h"
20
24#include "qgscalloutsregistry.h"
30
31#include <QMessageBox>
32#include <QScreen>
33#include <QString>
34
35#include "moc_qgsgui.cpp"
36
37using namespace Qt::StringLiterals;
38
39#ifdef Q_OS_MACOS
40#include "qgsmacnative.h"
41#elif defined( Q_OS_WIN )
42#ifndef __MINGW32__
43#include "qgswinnative.h"
44#else
45#include "qgsnative.h"
46#endif
47#elif defined( Q_OS_LINUX )
48#include "qgslinuxnative.h"
49#else
50#include "qgsnative.h"
51#endif
53#include "qgsshortcutsmanager.h"
55#include "qgslogger.h"
59#include "qgssettings.h"
62#include "qgsproject.h"
65#include "qgsprojectutils.h"
66#include "qgsmessagebar.h"
67#include "qgsmessagebaritem.h"
79#include "qgshistoryentry.h"
80#include "qgsstacsourceselectprovider.h"
86#include "qgsplotregistry.h"
87#include "qgsplotwidget.h"
88
89#include <QFileInfo>
90#include <QPushButton>
91#include <QToolButton>
92
94{
95 static QgsGui *sInstance( new QgsGui() );
96 return sInstance;
97}
98
100{
101 return instance()->mNative.get();
102}
103
105{
106 return instance()->mSettingsRegistryGui.get();
107}
108
110{
111 return instance()->mEditorWidgetRegistry.get();
112}
113
115{
116 return instance()->mRelationEditorRegistry.get();
117}
118
120{
121 return instance()->mShapeMapToolRegistry.get();
122}
123
125{
126 return instance()->mSourceSelectProviderRegistry.get();
127}
128
130{
131 return instance()->mSubsetStringEditorProviderRegistry.get();
132}
133
135{
136 return instance()->mProviderSourceWidgetProviderRegistry.get();
137}
138
140{
141 return instance()->mShortcutsManager.get();
142}
143
145{
146 return instance()->mLayerTreeEmbeddedWidgetRegistry.get();
147}
148
150{
151 return instance()->mMapLayerActionRegistry.get();
152}
153
155{
156 return instance()->mLayoutItemGuiRegistry.get();
157}
158
160{
161 return instance()->mAnnotationItemGuiRegistry.get();
162}
163
165{
166 return instance()->mAdvancedDigitizingToolsRegistry.get();
167}
168
170{
171 return instance()->mProcessingGuiRegistry.get();
172}
173
175{
176 return instance()->mNumericFormatGuiRegistry.get();
177}
178
180{
181 return instance()->mCodeEditorColorSchemeRegistry.get();
182}
183
184QgsProcessingFavoriteAlgorithmManager *QgsGui::processingFavoriteAlgorithmManager()
185{
186 return instance()->mProcessingFavoriteAlgorithmManager.get();
187}
188
189QgsProcessingRecentAlgorithmLog *QgsGui::processingRecentAlgorithmLog()
190{
191 return instance()->mProcessingRecentAlgorithmLog.get();
192}
193
195{
196 return instance()->mDataItemGuiProviderRegistry.get();
197}
198
200{
201 return instance()->mProjectStorageGuiRegistry.get();
202}
203
205{
206 return instance()->mProviderGuiRegistry.get();
207}
208
210{
211 return instance()->mSensorGuiRegistry.get();
212}
213
215{
216 return instance()->mHistoryProviderRegistry.get();
217}
218
220{
221 return instance()->mSettingsEditorRegistry.get();
222}
223
224void QgsGui::enableAutoGeometryRestore( QWidget *widget, const QString &key )
225{
226 if ( widget->objectName().isEmpty() )
227 {
228 QgsDebugError( u"WARNING: No object name set. Best for it to be set objectName when using QgsGui::enableAutoGeometryRestore"_s );
229 }
230 instance()->mWidgetStateHelper->registerWidget( widget, key );
231}
232
233QgsWindowManagerInterface *QgsGui::windowManager()
234{
235 return instance()->mWindowManager.get();
236}
237
239{
240 return instance()->mInputControllerManager.get();
241}
242
244{
245 return instance()->mStoredQueryManager.get();
246}
247
248void QgsGui::setWindowManager( QgsWindowManagerInterface *manager )
249{
250 instance()->mWindowManager.reset( manager );
251}
252
254{
255 if ( QgsApplication::settingsLocaleUserLocale->value().startsWith( "en"_L1 ) )
256 {
258 }
259 else
260 {
261 return QgsGui::HigFlags();
262 }
263}
264
266{
267 // we reset explicit registry because order matters
268 mProcessingGuiRegistry.reset();
269 mDataItemGuiProviderRegistry.reset();
270 mProcessingFavoriteAlgorithmManager.reset();
271 mProcessingRecentAlgorithmLog.reset();
272 mLayoutItemGuiRegistry.reset();
273 mAnnotationItemGuiRegistry.reset();
274 mAdvancedDigitizingToolsRegistry.reset();
275 mLayerTreeEmbeddedWidgetRegistry.reset();
276 mEditorWidgetRegistry.reset();
277 mMapLayerActionRegistry.reset();
278 mSourceSelectProviderRegistry.reset();
279 mHistoryProviderRegistry.reset();
280 mShortcutsManager.reset();
281 mNative.reset();
282 mNumericFormatGuiRegistry.reset();
283 mWidgetStateHelper.reset();
284 mProjectStorageGuiRegistry.reset();
285 mProviderGuiRegistry.reset();
286 mCodeEditorColorSchemeRegistry.reset();
287 mSubsetStringEditorProviderRegistry.reset();
288 mProviderSourceWidgetProviderRegistry.reset();
289 mShapeMapToolRegistry.reset();
290 mRelationEditorRegistry.reset();
291 mInputControllerManager.reset();
292 mSettingsRegistryGui.reset();
293 mSensorGuiRegistry.reset();
294 mStoredQueryManager.reset();
295 mSettingsEditorRegistry.reset();
296}
297
298QColor QgsGui::sampleColor( QPoint point )
299{
300 QScreen *screen = findScreenAt( point );
301 if ( !screen )
302 {
303 return QColor();
304 }
305
306 const int x = point.x() - screen->geometry().left();
307 const int y = point.y() - screen->geometry().top();
308 const QPixmap snappedPixmap = screen->grabWindow( 0, x, y, 1, 1 );
309 const QImage snappedImage = snappedPixmap.toImage();
310 return snappedImage.pixel( 0, 0 );
311}
312
313QScreen *QgsGui::findScreenAt( QPoint point )
314{
315 const QList<QScreen *> screens = QGuiApplication::screens();
316 for ( QScreen *screen : screens )
317 {
318 if ( screen->geometry().contains( point ) )
319 {
320 return screen;
321 }
322 }
323 return nullptr;
324}
325
327{
328#ifdef Q_OS_MAC
329 auto macNative = std::make_unique<QgsMacNative>();
330 macNative->setIconPath( QgsApplication::iconsPath() + u"qgis-icon-macos.png"_s );
331 mNative = std::move( macNative );
332#elif defined( Q_OS_WIN )
333#ifndef __MINGW32__
334 mNative = std::make_unique<QgsWinNative>();
335#else
336 mNative = std::make_unique<QgsNative>();
337#endif
338#elif defined( Q_OS_LINUX )
339 mNative = std::make_unique<QgsLinuxNative>();
340#else
341 mNative = std::make_unique<QgsNative>();
342#endif
343
344 mSettingsRegistryGui = std::make_unique<QgsSettingsRegistryGui>();
345
346 mSettingsEditorRegistry = std::make_unique<QgsSettingsEditorWidgetRegistry>();
347
348 mStoredQueryManager = std::make_unique<QgsStoredQueryManager>();
349 mCodeEditorColorSchemeRegistry = std::make_unique<QgsCodeEditorColorSchemeRegistry>();
350
351 // provider gui registry initialize QgsProviderRegistry too
352 mSensorGuiRegistry = std::make_unique<QgsSensorGuiRegistry>();
353 mSensorGuiRegistry->populate();
354
355 mHistoryProviderRegistry = std::make_unique<QgsHistoryProviderRegistry>();
356 mHistoryProviderRegistry->addDefaultProviders();
357
358 mInputControllerManager = std::make_unique<QgsInputControllerManager>();
359
360 mProviderGuiRegistry = std::make_unique<QgsProviderGuiRegistry>( QgsApplication::pluginPath() );
361 mProjectStorageGuiRegistry = std::make_unique<QgsProjectStorageGuiRegistry>();
362 mDataItemGuiProviderRegistry = std::make_unique<QgsDataItemGuiProviderRegistry>();
363 mSourceSelectProviderRegistry = std::make_unique<QgsSourceSelectProviderRegistry>();
364 mNumericFormatGuiRegistry = std::make_unique<QgsNumericFormatGuiRegistry>();
365 mSubsetStringEditorProviderRegistry = std::make_unique<QgsSubsetStringEditorProviderRegistry>();
366 mProviderSourceWidgetProviderRegistry = std::make_unique<QgsProviderSourceWidgetProviderRegistry>();
367
368 mProjectStorageGuiRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry.get() );
369 mDataItemGuiProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry.get() );
370 mSourceSelectProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry.get() );
371 mSourceSelectProviderRegistry->addProvider( new QgsLayerMetadataSourceSelectProvider() );
372 mSourceSelectProviderRegistry->addProvider( new QgsStacSourceSelectProvider() );
373 mSubsetStringEditorProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry.get() );
374 mProviderSourceWidgetProviderRegistry->initializeFromProviderGuiRegistry( mProviderGuiRegistry.get() );
375
376 mEditorWidgetRegistry = std::make_unique<QgsEditorWidgetRegistry>();
377 mRelationEditorRegistry = std::make_unique<QgsRelationWidgetRegistry>();
378 mShapeMapToolRegistry = std::make_unique<QgsMapToolShapeRegistry>();
379 mShortcutsManager = std::make_unique<QgsShortcutsManager>();
380 mLayerTreeEmbeddedWidgetRegistry = std::make_unique<QgsLayerTreeEmbeddedWidgetRegistry>();
381 mMapLayerActionRegistry = std::make_unique<QgsMapLayerActionRegistry>();
382 mLayoutItemGuiRegistry = std::make_unique<QgsLayoutItemGuiRegistry>();
383
384 mAnnotationItemGuiRegistry = std::make_unique<QgsAnnotationItemGuiRegistry>();
385 mAnnotationItemGuiRegistry->addDefaultItems();
386
387 mAdvancedDigitizingToolsRegistry = std::make_unique<QgsAdvancedDigitizingToolsRegistry>();
388 mAdvancedDigitizingToolsRegistry->addDefaultTools();
389
390 mWidgetStateHelper = std::make_unique<QgsWidgetStateHelper>();
391 mProcessingFavoriteAlgorithmManager = std::make_unique<QgsProcessingFavoriteAlgorithmManager>();
392 mProcessingRecentAlgorithmLog = std::make_unique<QgsProcessingRecentAlgorithmLog>();
393 mProcessingGuiRegistry = std::make_unique<QgsProcessingGuiRegistry>();
394
395 qRegisterMetaType<QgsHistoryEntry>( "QgsHistoryEntry" );
396}
397
399{
402 if ( trustStatus == Qgis::ProjectTrustStatus::Undetermined && embeddedScriptMode == Qgis::EmbeddedScriptMode::Ask )
403 {
404 QgsProjectTrustDialog dialog( project );
405 dialog.exec();
406 trustStatus = QgsProjectUtils::checkUserTrust( project );
407 }
408
409 if ( messageBar )
410 {
411 if ( trustStatus == Qgis::ProjectTrustStatus::Trusted )
412 {
413 messageBar
414 ->pushMessage( tr( "Security warning" ), tr( "The loaded project contains embedded scripts which have been allowed execution." ), embeddedScriptMode == Qgis::EmbeddedScriptMode::Always ? Qgis::MessageLevel::Warning : Qgis::MessageLevel::Info );
415 }
416 else
417 {
418 messageBar
419 ->pushMessage( tr( "Security warning" ), tr( "The loaded project contains embedded scripts which have been denied execution." ), embeddedScriptMode == Qgis::EmbeddedScriptMode::Never ? Qgis::MessageLevel::Warning : Qgis::MessageLevel::Info );
420 }
421 }
422
423 return trustStatus == Qgis::ProjectTrustStatus::Trusted;
424}
425
427{
428 static std::once_flag initialized;
429 std::call_once( initialized, []() {
430 auto _initCalloutWidgetFunction = []( const QString &name, QgsCalloutWidgetFunc f ) {
432
433 QgsCalloutAbstractMetadata *abstractMetadata = registry->calloutMetadata( name );
434 if ( !abstractMetadata )
435 {
436 QgsDebugError( u"Failed to find callout entry in registry: %1"_s.arg( name ) );
437 }
438 QgsCalloutMetadata *metadata = dynamic_cast<QgsCalloutMetadata *>( abstractMetadata );
439 if ( !metadata )
440 {
441 QgsDebugError( u"Failed to cast callout's metadata: "_s.arg( name ) );
442 }
443 else
444 {
445 metadata->setWidgetFunction( f );
446 }
447 };
448
449 _initCalloutWidgetFunction( u"simple"_s, QgsSimpleLineCalloutWidget::create );
450 _initCalloutWidgetFunction( u"manhattan"_s, QgsManhattanLineCalloutWidget::create );
451 _initCalloutWidgetFunction( u"curved"_s, QgsCurvedLineCalloutWidget::create );
452 _initCalloutWidgetFunction( u"balloon"_s, QgsBalloonCalloutWidget::create );
453 } );
454}
455
457{
458 static std::once_flag initialized;
459 std::call_once( initialized, []() {
460 auto _initPlotWidgetFunction = []( const QString &name, QgsPlotWidgetCreateFunc f ) {
462
463 QgsPlotAbstractMetadata *abstractMetadata = registry->plotMetadata( name );
464 if ( !abstractMetadata )
465 {
466 QgsDebugError( u"Failed to find plot entry in registry: %1"_s.arg( name ) );
467 }
468 QgsPlotMetadata *metadata = dynamic_cast<QgsPlotMetadata *>( abstractMetadata );
469 if ( !metadata )
470 {
471 QgsDebugError( u"Failed to cast plot's metadata: "_s.arg( name ) );
472 }
473 else
474 {
475 metadata->setWidgetCreateFunction( std::move( f ) );
476 }
477 };
478
479 _initPlotWidgetFunction( u"bar"_s, QgsBarChartPlotWidget::create );
480 _initPlotWidgetFunction( u"line"_s, QgsLineChartPlotWidget::create );
481 _initPlotWidgetFunction( u"pie"_s, QgsPieChartPlotWidget::create );
482 } );
483}
484
486{
487#ifdef HAVE_WEBENGINE
488 return true;
489#else
490 return false;
491#endif
492}
493
495void QgsGui::emitOptionsChanged()
496{
497 emit optionsChanged();
498}
ProjectTrustStatus
Project trust status.
Definition qgis.h:476
@ Trusted
The project trust has not yet been determined by the user.
Definition qgis.h:478
@ Warning
Warning message.
Definition qgis.h:162
@ Info
Information message.
Definition qgis.h:161
EmbeddedScriptMode
Authorisation to run script embedded in projects.
Definition qgis.h:448
@ Always
Embedded scripts are always run.
Definition qgis.h:452
@ Never
Embedded scripts never run.
Definition qgis.h:449
@ Ask
User is prompted before running scripts.
Definition qgis.h:450
Registry of available advanced digitizing tools.
Registry of available annotation item GUI behavior.
static QString pluginPath()
Returns the path to the application plugin directory.
static const QgsSettingsEntryString * settingsLocaleUserLocale
Settings entry locale user locale.
static QgsCalloutRegistry * calloutRegistry()
Returns the application's callout registry, used for managing callout types.
static QString iconsPath()
Returns the path to the icons image directory.
static QgsPlotRegistry * plotRegistry()
Returns the application's plot registry, used for plot types.
static QgsPlotWidget * create(QWidget *parent)
Creates a new bar chart plot configuration widget.
Stores metadata about one callout renderer class.
Convenience metadata class that uses static functions to create callouts and their widgets.
void setWidgetFunction(QgsCalloutWidgetFunc f)
Registry of available callout classes.
QgsCalloutAbstractMetadata * calloutMetadata(const QString &type) const
Returns the metadata for specified the specified callout type.
A registry of color schemes for use in QgsCodeEditor widgets.
A registry for data item GUI providers that may affect how QgsDataItems behave within the application...
A registry that manages all known edit widget factories.
static QgsMapToolShapeRegistry * mapToolShapeRegistry()
Returns the registry of shape map tools.
Definition qgsgui.cpp:119
static QgsEditorWidgetRegistry * editorWidgetRegistry()
Returns the global editor widget registry, used for managing all known edit widget factories.
Definition qgsgui.cpp:109
static QgsProviderSourceWidgetProviderRegistry * sourceWidgetProviderRegistry()
Returns the registry of provider source widget providers.
Definition qgsgui.cpp:134
static QgsProcessingGuiRegistry * processingGuiRegistry()
Returns the global processing gui registry, used for registering the GUI behavior of processing algor...
Definition qgsgui.cpp:169
static QgsShortcutsManager * shortcutsManager()
Returns the global shortcuts manager, used for managing a QAction and QShortcut sequences.
Definition qgsgui.cpp:139
static void setWindowManager(QgsWindowManagerInterface *manager)
Sets the global window manager.
Definition qgsgui.cpp:248
void optionsChanged()
This signal is emitted whenever the application options have been changed.
static QgsInputControllerManager * inputControllerManager()
Returns the global input controller manager.
Definition qgsgui.cpp:238
static QgsProcessingFavoriteAlgorithmManager * processingFavoriteAlgorithmManager()
Returns the global Processing favorite algorithm manager, used for tracking favorite Processing algor...
Definition qgsgui.cpp:184
static QgsLayerTreeEmbeddedWidgetRegistry * layerTreeEmbeddedWidgetRegistry()
Returns the global layer tree embedded widget registry, used for registering widgets that may be embe...
Definition qgsgui.cpp:144
static QScreen * findScreenAt(QPoint point)
Returns the screen at the given global point (pixel).
Definition qgsgui.cpp:313
static QgsAnnotationItemGuiRegistry * annotationItemGuiRegistry()
Returns the global annotation item GUI registry, used for registering the GUI behavior of annotation ...
Definition qgsgui.cpp:159
static QgsMapLayerActionRegistry * mapLayerActionRegistry()
Returns the global map layer action registry, used for registering map layer actions.
Definition qgsgui.cpp:149
static QgsGui * instance()
Returns a pointer to the singleton instance.
Definition qgsgui.cpp:93
static QgsProviderGuiRegistry * providerGuiRegistry()
Returns the registry of GUI-related components of data providers.
Definition qgsgui.cpp:204
static QgsRelationWidgetRegistry * relationWidgetRegistry()
Returns the global relation widget registry, used for managing all known relation widget factories.
Definition qgsgui.cpp:114
static QgsSensorGuiRegistry * sensorGuiRegistry()
Returns the registry of GUI-related components for sensors.
Definition qgsgui.cpp:209
static QgsAdvancedDigitizingToolsRegistry * advancedDigitizingToolsRegistry()
Returns the global advanced digitizing tools registry, used for registering advanced digitizing tools...
Definition qgsgui.cpp:164
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:224
static QgsHistoryProviderRegistry * historyProviderRegistry()
Returns the global history provider registry, used for tracking history providers.
Definition qgsgui.cpp:214
static bool allowExecutionOfEmbeddedScripts(QgsProject *project, QgsMessageBar *messageBar=nullptr)
Returns true if python embedded in a project is currently allowed to be loaded.
Definition qgsgui.cpp:398
@ HigMenuTextIsTitleCase
Menu action texts should be title case.
Definition qgsgui.h:283
@ HigDialogTitleIsTitleCase
Dialog titles should be title case.
Definition qgsgui.h:284
static QgsStoredQueryManager * storedQueryManager()
Returns the global stored SQL query manager.
Definition qgsgui.cpp:243
static QgsNative * nativePlatformInterface()
Returns the global native interface, which offers abstraction to the host OS's underlying public inte...
Definition qgsgui.cpp:99
static bool hasWebEngine()
Checks whether QWebEngineView is available to display HTML content.
Definition qgsgui.cpp:485
QgsGui(const QgsGui &other)=delete
static QgsWindowManagerInterface * windowManager()
Returns the global window manager, if set.
Definition qgsgui.cpp:233
static QgsDataItemGuiProviderRegistry * dataItemGuiProviderRegistry()
Returns the global data item GUI provider registry, used for tracking providers which affect the brow...
Definition qgsgui.cpp:194
~QgsGui() override
Definition qgsgui.cpp:265
static QgsProcessingRecentAlgorithmLog * processingRecentAlgorithmLog()
Returns the global processing recent algorithm log, used for tracking recently used processing algori...
Definition qgsgui.cpp:189
QFlags< HigFlag > HigFlags
Definition qgsgui.h:286
static QgsSubsetStringEditorProviderRegistry * subsetStringEditorProviderRegistry()
Returns the registry of subset string editors of data providers.
Definition qgsgui.cpp:129
static QgsProjectStorageGuiRegistry * projectStorageGuiRegistry()
Returns the global GUI-related project storage registry.
Definition qgsgui.cpp:199
static QgsGui::HigFlags higFlags()
Returns the platform's HIG flags.
Definition qgsgui.cpp:253
static QgsLayoutItemGuiRegistry * layoutItemGuiRegistry()
Returns the global layout item GUI registry, used for registering the GUI behavior of layout items.
Definition qgsgui.cpp:154
static void initPlotWidgets()
Initializes plot widgets.
Definition qgsgui.cpp:456
static void initCalloutWidgets()
Initializes callout widgets.
Definition qgsgui.cpp:426
static QgsSettingsRegistryGui * settingsRegistryGui()
Returns the gui's settings registry, used for managing gui settings.
Definition qgsgui.cpp:104
static QgsSourceSelectProviderRegistry * sourceSelectProviderRegistry()
Returns the global source select provider registry, used for managing all known source select widget ...
Definition qgsgui.cpp:124
static QgsCodeEditorColorSchemeRegistry * codeEditorColorSchemeRegistry()
Returns the global code editor color scheme registry, used for registering the color schemes for QgsC...
Definition qgsgui.cpp:179
static QgsNumericFormatGuiRegistry * numericFormatGuiRegistry()
Returns the global numeric format gui registry, used for registering the GUI widgets associated with ...
Definition qgsgui.cpp:174
static QgsSettingsEditorWidgetRegistry * settingsEditorWidgetRegistry()
Returns the registry of settings editors.
Definition qgsgui.cpp:219
static QColor sampleColor(QPoint point)
Samples the color on screen at the specified global point (pixel).
Definition qgsgui.cpp:298
A registry for objects which track user history (i.e.
Manages input control devices.
Source select provider for layer metadata.
Registry of widgets that may be embedded into layer tree view.
Registry of available layout item GUI behavior.
static QgsPlotWidget * create(QWidget *parent)
Creates a new line chart plot configuration widget.
A registry which tracks map layer actions.
Keeps track of the registered shape map tools.
A bar for displaying non-blocking messages to the user.
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.
A registry for widgets which configure QgsNumericFormat objects.
static QgsPlotWidget * create(QWidget *parent)
Creates a new line chart plot configuration widget.
Stores metadata about a plot class.
Convenience metadata class that uses static functions to create plots.
void setWidgetCreateFunction(QgsPlotWidgetCreateFunc function)
Sets the classes' plot widget creation function.
Registry of available plot types.
QgsPlotAbstractMetadata * plotMetadata(const QString &type) const
Returns the metadata for the specified plot type.
A registry for widgets for use with the Processing framework.
A registry / canonical manager of GUI parts of project storage backends.
A dialog to handle granting of trust to projects containing embedded script.
static Qgis::ProjectTrustStatus checkUserTrust(QgsProject *project)
Returns the current trust status of the specified project.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:113
A registry / canonical manager of GUI parts of data providers.
A registry that keeps a list of provider source widget providers.
Keeps track of the registered relations widgets.
Registry of available sensor GUI behavior.
A registry that manages editor widgets for settings.
static const QgsSettingsEntryEnumFlag< Qgis::EmbeddedScriptMode > * settingsCodeExecutionBehaviorUndeterminedProjects
Settings entry for behavior handling embedded scripts within projects.
Used for settings introspection and collects all QgsSettingsEntry instances of GUI.
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
A registry for QgsSourceSelectProvider source select providers.
A manager for stored SQL queries.
A registry for subset string editor providers.
QgsCalloutWidget *(* QgsCalloutWidgetFunc)(QgsMapLayer *)
#define QgsDebugError(str)
Definition qgslogger.h:59
std::function< QgsPlotWidget *(QWidget *parent)> QgsPlotWidgetCreateFunc