QGIS API Documentation 3.99.0-Master (8e76e220402)
Loading...
Searching...
No Matches
qgssettingsregistrycore.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgssettingsregistrycore.cpp
3 --------------------------------------
4 Date : February 2021
5 Copyright : (C) 2021 by Damiano Lombardi
6 Email : damiano at opengis dot ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
16
17#include "pal.h"
18#include "qgis.h"
20#include "qgsgpsdetector.h"
21#include "qgslayout.h"
22#include "qgslocator.h"
24#include "qgsowsconnection.h"
25#include "qgsprocessing.h"
26#include "qgsrasterlayer.h"
27#include "qgssettings.h"
30#include "qgssettingsproxy.h"
31#include "qgsvectorlayer.h"
33
34#include <QString>
35#include <QThread>
36
37using namespace Qt::StringLiterals;
38
40
42
44
46
48
50
52
54
56
58
60
62
64
66
68
70
72
74
76
78
80
82
84
86
88
90
91
93
95
97
99
101
103
105
107
109
111
113
115
116const QgsSettingsEntryBool *QgsSettingsRegistryCore::settingsLayerTreeShowFeatureCountForNewLayers = new QgsSettingsEntryBool( u"show-feature-count-for-new-layers"_s, QgsSettingsTree::sTreeLayerTree, false, u"If true, feature counts will be shown in the layer tree for all newly added layers."_s );
117
118const QgsSettingsEntryBool *QgsSettingsRegistryCore::settingsEnableWMSTilePrefetching = new QgsSettingsEntryBool( u"enable_wms_tile_prefetch"_s, QgsSettingsTree::sTreeWms, false, u"Whether to include WMS layers when rendering tiles adjacent to the visible map area"_s );
119
121
122const QgsSettingsEntryInteger *QgsSettingsRegistryCore::settingsLayerParallelLoadingMaxCount = new QgsSettingsEntryInteger( u"provider-parallel-loading-max-count"_s, QgsSettingsTree::sTreeCore, QThread::idealThreadCount(), u"Maximum thread used to load layers in parallel"_s, Qgis::SettingsOption(), 1 );
123
124const QgsSettingsEntryBool *QgsSettingsRegistryCore::settingsLayerParallelLoading = new QgsSettingsEntryBool( u"provider-parallel-loading"_s, QgsSettingsTree::sTreeCore, true, u"Load layers in parallel (only available for some providers (GDAL and PostgreSQL)"_s, Qgis::SettingsOption() );
125
127
128const QgsSettingsEntryInteger64 *QgsSettingsRegistryCore::settingsNetworkCacheSize = new QgsSettingsEntryInteger64( u"size-bytes"_s, QgsSettingsTree::sTreeNetworkCache, 0, u"Network disk cache size in bytes (0 = automatic size)"_s );
129
131
133
134const QgsSettingsEntryStringList *QgsSettingsRegistryCore::settingsCodeExecutionTrustedProjectsFolders = new QgsSettingsEntryStringList( u"code-execution-trusted-projects-folders"_s, QgsSettingsTree::sTreeCore, QStringList(), u"Projects and folders that are trusted and allowed execution of embedded scripts"_s );
135
136const QgsSettingsEntryStringList *QgsSettingsRegistryCore::settingsCodeExecutionUntrustedProjectsFolders = new QgsSettingsEntryStringList( u"code-execution-denied-projects-folders"_s, QgsSettingsTree::sTreeCore, QStringList(), u"Projects and folders that are untrusted and denied execution of embedded scripts"_s );
137
142
146
147void QgsSettingsRegistryCore::migrateOldSettings()
148{
149 // This method triggers a ton of QgsSettings constructions and destructions, which is very expensive
150 // as it involves writing new values to the underlying ini files.
151 // Accordingly we place a hold on constructing new QgsSettings objects for the duration of the method,
152 // so that only a single QgsSettings object is created and destroyed at the end of this method.
154
155 auto settings = QgsSettings::get();
156
157 // copy values from old keys to new keys and delete the old ones
158 // for backward compatibility, old keys are recreated when the registry gets deleted
159
160 // single settings - added in 3.30
161 QgsLayout::settingsSearchPathForTemplates->copyValueFromKey( u"core/Layout/searchPathsForTemplates"_s );
162
163 QgsProcessing::settingsPreferFilenameAsLayerName->copyValueFromKey( u"Processing/Configuration/PREFER_FILENAME_AS_LAYER_NAME"_s );
164 QgsProcessing::settingsTempPath->copyValueFromKey( u"Processing/Configuration/TEMP_PATH2"_s );
165
166 QgsNetworkAccessManager::settingsNetworkTimeout->copyValueFromKey( u"qgis/networkAndProxy/networkTimeout"_s );
167
168 settingsLayerTreeShowFeatureCountForNewLayers->copyValueFromKey( u"core/layer-tree/show_feature_count_for_new_layers"_s );
169
170#if defined( HAVE_QTSERIALPORT )
171 QgsGpsDetector::settingsGpsStopBits->copyValueFromKey( u"core/gps/stop_bits"_s );
172 QgsGpsDetector::settingsGpsFlowControl->copyValueFromKey( u"core/gps/flow_control"_s );
173 QgsGpsDetector::settingsGpsDataBits->copyValueFromKey( u"core/gps/data_bits"_s );
174 QgsGpsDetector::settingsGpsParity->copyValueFromKey( u"core/gps/parity"_s );
175#endif
176
177 QgsRasterLayer::settingsRasterDefaultOversampling->copyValueFromKey( u"Raster/defaultOversampling"_s, true );
178 QgsRasterLayer::settingsRasterDefaultEarlyResampling->copyValueFromKey( u"Raster/defaultEarlyResampling"_s, true );
179
180 pal::Pal::settingsRenderingLabelCandidatesLimitPoints->copyValueFromKey( u"core/rendering/label_candidates_limit_points"_s, true );
181 pal::Pal::settingsRenderingLabelCandidatesLimitLines->copyValueFromKey( u"core/rendering/label_candidates_limit_lines"_s, true );
182 pal::Pal::settingsRenderingLabelCandidatesLimitPolygons->copyValueFromKey( u"core/rendering/label_candidates_limit_polygons"_s, true );
183
184 // handle bad migration - Fix profiles for old QGIS versions (restore the Map/scales key on windows)
185 // TODO: Remove this from QGIS 3.36
186 // PR Link: https://github.com/qgis/QGIS/pull/52580
187 if ( settings->contains( u"Map/scales"_s ) )
188 {
189 const QStringList oldScales = settings->value( u"Map/scales"_s ).toStringList();
190 if ( ! oldScales.isEmpty() && !oldScales.at( 0 ).isEmpty() )
191 settings->setValue( u"Map/scales"_s, oldScales.join( ',' ) );
192 else
193 settings->setValue( u"Map/scales"_s, Qgis::defaultProjectScales() );
194 }
195
196 // migrate only one way for map scales
197 if ( !settingsMapScales->exists() )
198 {
199 // Handle bad migration. Prefer map/scales over Map/scales
200 // TODO: Discard this part starting from QGIS 3.36
201 const QStringList oldScales = settings->value( u"map/scales"_s ).toStringList();
202 if ( ! oldScales.isEmpty() && !oldScales.at( 0 ).isEmpty() )
203 {
204 // If migration has failed before (QGIS < 3.30.2), all scales might be
205 // concatenated in the first element of the list
206 QStringList actualScales;
207 for ( const QString &element : oldScales )
208 {
209 actualScales << element.split( "," );
210 }
211 settingsMapScales->setValue( actualScales );
212 }
213 // TODO: keep only this part of the migration starting from QGIS 3.36
214 else if ( settings->contains( u"Map/scales"_s ) )
215 {
216 settingsMapScales->setValue( settings->value( u"Map/scales"_s ).toString().split( ',' ) );
217 }
218 }
219
220 // digitizing settings - added in 3.30
221 {
222 settingsDigitizingLineColor->copyValueFromKeys( u"qgis/digitizing/line_color_red"_s, u"qgis/digitizing/line_color_green"_s, u"qgis/digitizing/line_color_blue"_s, u"qgis/digitizing/line_color_alpha"_s );
223 settingsDigitizingFillColor->copyValueFromKeys( u"qgis/digitizing/fill_color_red"_s, u"qgis/digitizing/fill_color_green"_s, u"qgis/digitizing/fill_color_blue"_s, u"qgis/digitizing/fill_color_alpha"_s );
224
225 const QList<const QgsSettingsEntryBase *> settings = QgsSettingsTree::sTreeDigitizing->childrenSettings();
226 for ( const QgsSettingsEntryBase *setting : settings )
227 {
228 QString name = setting->name();
229 if (
230 name == settingsDigitizingStreamTolerance->name() ||
231 name == settingsDigitizingLineColor->name() ||
232 name == settingsDigitizingFillColor->name()
233 )
234 continue;
235 if ( name == settingsDigitizingReuseLastValues->name() )
236 {
237 name = u"reuseLastValues"_s;
238 }
239 else
240 {
241 name.replace( '-', '_' );
242 }
243 setting->copyValueFromKey( QString( "qgis/digitizing/%1" ).arg( name ) );
244 }
245 }
246
247 // locator filters - added in 3.30
248 {
249 settings->beginGroup( u"gui/locator_filters"_s );
250 const QStringList childKeys = settings->childKeys();
251 settings->endGroup();
252 for ( const QString &childKey : childKeys )
253 {
254 if ( childKey.startsWith( "enabled"_L1 ) )
255 {
256 QString filter = childKey;
257 filter.remove( u"enabled_"_s );
258 QgsLocator::settingsLocatorFilterEnabled->copyValueFromKey( u"gui/locator_filters/enabled_%1"_s, {filter}, true );
259 QgsLocator::settingsLocatorFilterDefault->copyValueFromKey( u"gui/locator_filters/default_%1"_s, {filter}, true );
260 QgsLocator::settingsLocatorFilterPrefix->copyValueFromKey( u"gui/locator_filters/prefix_%1"_s, {filter}, true );
261 }
262 }
263 }
264
265 // connections settings - added in 3.30
266 const QStringList services = {u"WMS"_s, u"WFS"_s, u"WCS"_s};
267 for ( const QString &service : services )
268 {
269 QgsSettings settings;
270 settings.beginGroup( u"qgis/connections-%1"_s.arg( service.toLower() ) );
271 const QStringList connections = settings.childGroups();
272 if ( connections.count() == 0 )
273 continue;
274 for ( const QString &connection : connections )
275 {
276 if ( settings.value( u"%1/url"_s.arg( connection ) ).toString().isEmpty() )
277 continue;
278
279 QgsOwsConnection::settingsUrl->copyValueFromKey( u"qgis/connections-%1/%2/url"_s, {service.toLower(), connection}, true );
280 QgsOwsConnection::settingsVersion->copyValueFromKey( u"qgis/connections-%1/%2/version"_s, {service.toLower(), connection}, true );
281 QgsOwsConnection::settingsIgnoreGetMapURI->copyValueFromKey( u"qgis/connections-%1/%2/ignoreGetMapURI"_s, {service.toLower(), connection}, true );
282 QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->copyValueFromKey( u"qgis/connections-%1/%2/ignoreGetFeatureInfoURI"_s, {service.toLower(), connection}, true );
283 QgsOwsConnection::settingsSmoothPixmapTransform->copyValueFromKey( u"qgis/connections-%1/%2/smoothPixmapTransform"_s, {service.toLower(), connection}, true );
284 QgsOwsConnection::settingsReportedLayerExtents->copyValueFromKey( u"qgis/connections-%1/%2/reportedLayerExtents"_s, {service.toLower(), connection}, true );
285 QgsOwsConnection::settingsDpiMode->copyValueFromKey( u"qgis/connections-%1/%2/dpiMode"_s, {service.toLower(), connection}, true );
286 QgsOwsConnection::settingsTilePixelRatio->copyValueFromKey( u"qgis/connections-%1/%2/tilePixelRatio"_s, {service.toLower(), connection}, true );
287 QgsOwsConnection::settingsMaxNumFeatures->copyValueFromKey( u"qgis/connections-%1/%2/maxnumfeatures"_s, {service.toLower(), connection}, true );
288 QgsOwsConnection::settingsPagesize->copyValueFromKey( u"qgis/connections-%1/%2/pagesize"_s, {service.toLower(), connection}, true );
289 QgsOwsConnection::settingsPagingEnabled->copyValueFromKey( u"qgis/connections-%1/%2/pagingenabled"_s, {service.toLower(), connection}, true );
290 QgsOwsConnection::settingsPreferCoordinatesForWfsT11->copyValueFromKey( u"qgis/connections-%1/%2/preferCoordinatesForWfsT11"_s, {service.toLower(), connection}, true );
291 QgsOwsConnection::settingsIgnoreAxisOrientation->copyValueFromKey( u"qgis/connections-%1/%2/ignoreAxisOrientation"_s, {service.toLower(), connection}, true );
292 QgsOwsConnection::settingsInvertAxisOrientation->copyValueFromKey( u"qgis/connections-%1/%2/invertAxisOrientation"_s, {service.toLower(), connection}, true );
293
295 settings.beginGroup( connection );
296 QgsOwsConnection::settingsHeaders->setValue( QgsHttpHeaders( settings ).headers(), {service.toLower(), connection} );
297 settings.remove( u"http-header"_s );
298 settings.endGroup();
300
301 QgsOwsConnection::settingsUsername->copyValueFromKey( u"qgis/connections/%1/%2/username"_s.arg( service, connection ), {service.toLower(), connection}, true );
302 QgsOwsConnection::settingsPassword->copyValueFromKey( u"qgis/connections/%1/%2/password"_s.arg( service, connection ), {service.toLower(), connection}, true );
303 QgsOwsConnection::settingsAuthCfg->copyValueFromKey( u"qgis/connections/%1/%2/authcfg"_s.arg( service, connection ), {service.toLower(), connection}, true );
304 }
305 if ( settings.contains( u"selected"_s ) )
306 QgsOwsConnection::sTreeOwsConnections->setSelectedItem( settings.value( u"selected"_s ).toString(), {service.toLower()} );
307 }
308
309 // Vector tile - added in 3.30
310 {
311 QgsSettings settings;
312 settings.beginGroup( u"qgis/connections-vector-tile"_s );
313 const QStringList connections = settings.childGroups();
314 for ( const QString &connection : connections )
315 {
316 if ( settings.value( u"%1/url"_s.arg( connection ) ).toString().isEmpty() )
317 continue;
318
319 QgsVectorTileProviderConnection::settingsUrl->copyValueFromKey( u"qgis/connections-vector-tile/%1/url"_s, {connection}, true );
320 QgsVectorTileProviderConnection::settingsZmin->copyValueFromKey( u"qgis/connections-vector-tile/%1/zmin"_s, {connection}, true );
321 QgsVectorTileProviderConnection::settingsZmax->copyValueFromKey( u"qgis/connections-vector-tile/%1/zmax"_s, {connection}, true );
322 QgsVectorTileProviderConnection::settingsAuthcfg->copyValueFromKey( u"qgis/connections-vector-tile/%1/authcfg"_s, {connection}, true );
323 QgsVectorTileProviderConnection::settingsUsername->copyValueFromKey( u"qgis/connections-vector-tile/%1/username"_s, {connection}, true );
324 QgsVectorTileProviderConnection::settingsPassword->copyValueFromKey( u"qgis/connections-vector-tile/%1/password"_s, {connection}, true );
325 QgsVectorTileProviderConnection::settingsStyleUrl->copyValueFromKey( u"qgis/connections-vector-tile/%1/styleUrl"_s, {connection}, true );
326 QgsVectorTileProviderConnection::settingsServiceType->copyValueFromKey( u"qgis/connections-vector-tile/%1/serviceType"_s, {connection}, true );
328 settings.beginGroup( connection );
329 QgsVectorTileProviderConnection::settingsHeaders->setValue( QgsHttpHeaders( settings ).headers(), connection );
330 settings.remove( u"http-header"_s );
331 settings.endGroup();
333 }
334 }
335
336 // xyz - added in 3.30
337 {
338 QgsSettings settings;
339 settings.beginGroup( u"qgis/connections-xyz"_s );
340 const QStringList connections = settings.childGroups();
341 for ( const QString &connection : connections )
342 {
343 if ( settings.value( u"%1/url"_s.arg( connection ) ).toString().isEmpty() )
344 continue;
345
346 QgsXyzConnectionSettings::settingsUrl->copyValueFromKey( u"qgis/connections-xyz/%1/url"_s, {connection}, true );
347 QgsXyzConnectionSettings::settingsZmin->copyValueFromKey( u"qgis/connections-xyz/%1/zmin"_s, {connection}, true );
348 QgsXyzConnectionSettings::settingsZmax->copyValueFromKey( u"qgis/connections-xyz/%1/zmax"_s, {connection}, true );
349 QgsXyzConnectionSettings::settingsAuthcfg->copyValueFromKey( u"qgis/connections-xyz/%1/authcfg"_s, {connection}, true );
350 QgsXyzConnectionSettings::settingsUsername->copyValueFromKey( u"qgis/connections-xyz/%1/username"_s, {connection}, true );
351 QgsXyzConnectionSettings::settingsPassword->copyValueFromKey( u"qgis/connections-xyz/%1/password"_s, {connection}, true );
352 QgsXyzConnectionSettings::settingsTilePixelRatio->copyValueFromKey( u"qgis/connections-xyz/%1/tilePixelRatio"_s, {connection}, true );
353 QgsXyzConnectionSettings::settingsHidden->copyValueFromKey( u"qgis/connections-xyz/%1/hidden"_s, {connection}, true );
354 QgsXyzConnectionSettings::settingsInterpretation->copyValueFromKey( u"qgis/connections-xyz/%1/interpretation"_s, {connection}, true );
356 settings.beginGroup( connection );
357 QgsXyzConnectionSettings::settingsHeaders->setValue( QgsHttpHeaders( settings ).headers(), connection );
358 settings.remove( u"http-header"_s );
359 settings.endGroup();
361 }
362 }
363
364 // arcgis - added in 3.30
365 {
366 // arcgismapserver entries are not used anymore (even in 3.28, only arcgisfeature server is used)
367 const QStringList serviceKeys = {u"qgis/connections-arcgisfeatureserver"_s, u"qgis/connections-arcgismapserver"_s};
368 QgsSettings settings;
369 for ( const QString &serviceKey : serviceKeys )
370 {
371 settings.beginGroup( serviceKey );
372 const QStringList connections = settings.childGroups();
373 for ( const QString &connection : connections )
374 {
375 QgsArcGisConnectionSettings::settingsUrl->copyValueFromKey( u"qgis/connections-arcgisfeatureserver/%1/url"_s, {connection}, true );
376 QgsArcGisConnectionSettings::settingsAuthcfg->copyValueFromKey( u"qgis/ARCGISFEATURESERVER/%1/authcfg"_s, {connection}, true );
377 QgsArcGisConnectionSettings::settingsUsername->copyValueFromKey( u"qgis/ARCGISFEATURESERVER/%1/username"_s, {connection}, true );
378 QgsArcGisConnectionSettings::settingsPassword->copyValueFromKey( u"qgis/ARCGISFEATURESERVER/%1/password"_s, {connection}, true );
379 QgsArcGisConnectionSettings::settingsContentEndpoint->copyValueFromKey( u"qgis/connections-arcgisfeatureserver/%1/content_endpoint"_s, {connection}, true );
380 QgsArcGisConnectionSettings::settingsCommunityEndpoint->copyValueFromKey( u"qgis/connections-arcgisfeatureserver/%1/community_endpoint"_s, {connection}, true );
382 settings.beginGroup( connection );
383 QgsArcGisConnectionSettings::settingsHeaders->setValue( QgsHttpHeaders( settings ).headers(), connection );
384 settings.remove( u"http-header"_s );
385 settings.endGroup();
387 }
388 settings.remove( serviceKey );
389 }
390 }
391
392 // babel devices settings - added in 3.30
393 {
394 if ( QgsBabelFormatRegistry::sTreeBabelDevices->items().count() == 0 )
395 {
396 const QStringList deviceNames = settings->value( u"/Plugin-GPS/devices/deviceList"_s ).toStringList();
397
398 for ( const QString &device : deviceNames )
399 {
400 QgsBabelFormatRegistry::settingsBabelWptDownload->copyValueFromKey( u"/Plugin-GPS/devices/%1/wptdownload"_s, {device}, true );
401 QgsBabelFormatRegistry::settingsBabelWptUpload->copyValueFromKey( u"/Plugin-GPS/devices/%1/wptupload"_s, {device}, true );
402 QgsBabelFormatRegistry::settingsBabelRteDownload->copyValueFromKey( u"/Plugin-GPS/devices/%1/rtedownload"_s, {device}, true );
403 QgsBabelFormatRegistry::settingsBabelRteUpload->copyValueFromKey( u"/Plugin-GPS/devices/%1/rteupload"_s, {device}, true );
404 QgsBabelFormatRegistry::settingsBabelTrkDownload->copyValueFromKey( u"/Plugin-GPS/devices/%1/trkdownload"_s, {device}, true );
405 QgsBabelFormatRegistry::settingsBabelTrkUpload->copyValueFromKey( u"/Plugin-GPS/devices/%1/trkupload"_s, {device}, true );
406 }
407 }
408 }
409
411}
412
413// TODO QGIS 5.0: Remove
414void QgsSettingsRegistryCore::backwardCompatibility()
415{
416 // This method triggers a ton of QgsSettings constructions and destructions, which is very expensive
417 // as it involves writing new values to the underlying ini files.
418 // Accordingly we place a hold on constructing new QgsSettings objects for the duration of the method,
419 // so that only a single QgsSettings object is created and destroyed at the end of this method.
421 auto settings = QgsSettings::get();
422
423 // CAREFUL! There's a mix of copyValueToKeyIfChanged and copyValueToKey used here.
424 // copyValueToKeyIfChanged should be used if copyValueFromKey did NOT have the removeSettingAtKey argument set to True
425 // in migrateOldSettings
426
427 // single settings - added in 3.30
428 QgsLayout::settingsSearchPathForTemplates->copyValueToKeyIfChanged( u"core/Layout/searchPathsForTemplates"_s );
429
430 QgsProcessing::settingsPreferFilenameAsLayerName->copyValueToKeyIfChanged( u"Processing/Configuration/PREFER_FILENAME_AS_LAYER_NAME"_s );
431 QgsProcessing::settingsTempPath->copyValueToKeyIfChanged( u"Processing/Configuration/TEMP_PATH2"_s );
432
433 QgsNetworkAccessManager::settingsNetworkTimeout->copyValueToKeyIfChanged( u"qgis/networkAndProxy/networkTimeout"_s );
434
435 settingsLayerTreeShowFeatureCountForNewLayers->copyValueToKeyIfChanged( u"core/layer-tree/show_feature_count_for_new_layers"_s );
436
437#if defined( HAVE_QTSERIALPORT )
438 QgsGpsDetector::settingsGpsStopBits->copyValueToKeyIfChanged( u"core/gps/stop_bits"_s );
439 QgsGpsDetector::settingsGpsFlowControl->copyValueToKeyIfChanged( u"core/gps/flow_control"_s );
440 QgsGpsDetector::settingsGpsDataBits->copyValueToKeyIfChanged( u"core/gps/data_bits"_s );
441 QgsGpsDetector::settingsGpsParity->copyValueToKeyIfChanged( u"core/gps/parity"_s );
442#endif
443
444 QgsRasterLayer::settingsRasterDefaultOversampling->copyValueToKey( u"Raster/defaultOversampling"_s );
445 QgsRasterLayer::settingsRasterDefaultEarlyResampling->copyValueToKey( u"Raster/defaultEarlyResampling"_s );
446
447 pal::Pal::settingsRenderingLabelCandidatesLimitPoints->copyValueToKey( u"core/rendering/label_candidates_limit_points"_s );
448 pal::Pal::settingsRenderingLabelCandidatesLimitLines->copyValueToKey( u"core/rendering/label_candidates_limit_lines"_s );
449 pal::Pal::settingsRenderingLabelCandidatesLimitPolygons->copyValueToKey( u"core/rendering/label_candidates_limit_polygons"_s );
450
451 // digitizing settings - added in 3.30
452 {
453 if ( settingsDigitizingLineColor->hasChanged() )
454 settingsDigitizingLineColor->copyValueToKeys( u"qgis/digitizing/line_color_red"_s, u"qgis/digitizing/line_color_green"_s, u"qgis/digitizing/line_color_blue"_s, u"qgis/digitizing/line_color_alpha"_s );
455 if ( settingsDigitizingFillColor->hasChanged() )
456 settingsDigitizingFillColor->copyValueToKeys( u"qgis/digitizing/fill_color_red"_s, u"qgis/digitizing/fill_color_green"_s, u"qgis/digitizing/fill_color_blue"_s, u"qgis/digitizing/fill_color_alpha"_s );
457
458 const QList<const QgsSettingsEntryBase *> settings = QgsSettingsTree::sTreeDigitizing->childrenSettings();
459 for ( const QgsSettingsEntryBase *setting : settings )
460 {
461 QString name = setting->name();
462 if (
463 name == settingsDigitizingLineColor->name() ||
464 name == settingsDigitizingFillColor->name()
465 )
466 continue;
467 if ( name == settingsDigitizingReuseLastValues->name() )
468 {
469 name = u"reuseLastValues"_s;
470 }
471 else
472 {
473 name.replace( '-', '_' );
474 }
475 setting->copyValueToKeyIfChanged( QString( "qgis/digitizing/%1" ).arg( name ) );
476 }
477 }
478
479 // locator filters - added in 3.30
480 {
481 const QStringList filters = QgsLocator::sTreeLocatorFilters->items();
482 for ( const QString &filter : filters )
483 {
484 QgsLocator::settingsLocatorFilterEnabled->copyValueToKey( u"gui/locator_filters/enabled_%1"_s, {filter} );
485 QgsLocator::settingsLocatorFilterDefault->copyValueToKey( u"gui/locator_filters/default_%1"_s, {filter} );
486 QgsLocator::settingsLocatorFilterPrefix->copyValueToKey( u"gui/locator_filters/prefix_%1"_s, {filter} );
487 }
488 }
489
490 // OWS connections settings - added in 3.30
491 {
492 const QStringList services = {u"WMS"_s, u"WFS"_s, u"WCS"_s};
493 for ( const QString &service : services )
494 {
495 const QStringList connections = QgsOwsConnection::sTreeOwsConnections->items( {service.toLower()} );
496 if ( connections.count() == 0 )
497 continue;
498
499 for ( const QString &connection : connections )
500 {
501 QgsOwsConnection::settingsUrl->copyValueToKey( u"qgis/connections-%1/%2/url"_s, {service.toLower(), connection} );
502 QgsOwsConnection::settingsVersion->copyValueToKey( u"qgis/connections-%1/%2/version"_s, {service.toLower(), connection} );
503 QgsOwsConnection::settingsIgnoreGetMapURI->copyValueToKey( u"qgis/connections-%1/%2/ignoreGetMapURI"_s, {service.toLower(), connection} );
504 QgsOwsConnection::settingsIgnoreGetFeatureInfoURI->copyValueToKey( u"qgis/connections-%1/%2/ignoreGetFeatureInfoURI"_s, {service.toLower(), connection} );
505 QgsOwsConnection::settingsSmoothPixmapTransform->copyValueToKey( u"qgis/connections-%1/%2/smoothPixmapTransform"_s, {service.toLower(), connection} );
506 QgsOwsConnection::settingsReportedLayerExtents->copyValueToKey( u"qgis/connections-%1/%2/reportedLayerExtents"_s, {service.toLower(), connection} );
507 QgsOwsConnection::settingsDpiMode->copyValueToKey( u"qgis/connections-%1/%2/dpiMode"_s, {service.toLower(), connection} );
508 QgsOwsConnection::settingsTilePixelRatio->copyValueToKey( u"qgis/connections-%1/%2/tilePixelRatio"_s, {service.toLower(), connection} );
509 QgsOwsConnection::settingsMaxNumFeatures->copyValueToKey( u"qgis/connections-%1/%2/maxnumfeatures"_s, {service.toLower(), connection} );
510 QgsOwsConnection::settingsPagesize->copyValueToKey( u"qgis/connections-%1/%2/pagesize"_s, {service.toLower(), connection} );
511 QgsOwsConnection::settingsPagingEnabled->copyValueToKey( u"qgis/connections-%1/%2/pagingenabled"_s, {service.toLower(), connection} );
512 QgsOwsConnection::settingsPreferCoordinatesForWfsT11->copyValueToKey( u"qgis/connections-%1/%2/preferCoordinatesForWfsT11"_s, {service.toLower(), connection} );
513 QgsOwsConnection::settingsIgnoreAxisOrientation->copyValueToKey( u"qgis/connections-%1/%2/ignoreAxisOrientation"_s, {service.toLower(), connection} );
514 QgsOwsConnection::settingsInvertAxisOrientation->copyValueToKey( u"qgis/connections-%1/%2/invertAxisOrientation"_s, {service.toLower(), connection} );
515
516 if ( QgsOwsConnection::settingsHeaders->exists( {service.toLower(), connection} ) )
517 {
519 const QgsHttpHeaders headers = QgsHttpHeaders( QgsOwsConnection::settingsHeaders->value( {service.toLower(), connection} ) );
520 settings->beginGroup( u"qgis/connections-%1/%2"_s.arg( service.toLower(), connection ) );
521 headers.updateSettings( *settings );
522 settings->endGroup();
524 }
525
526 QgsOwsConnection::settingsUsername->copyValueToKey( u"qgis/connections/%1/%2/username"_s.arg( service, connection ), {service.toLower(), connection} );
527 QgsOwsConnection::settingsPassword->copyValueToKey( u"qgis/connections/%1/%2/password"_s.arg( service, connection ), {service.toLower(), connection} );
528 QgsOwsConnection::settingsAuthCfg->copyValueToKey( u"qgis/connections/%1/%2/authcfg"_s.arg( service, connection ), {service.toLower(), connection} );
529 }
530 }
531 }
532
533// Vector tile - added in 3.30
534 {
535 const QStringList connections = QgsVectorTileProviderConnection::sTreeConnectionVectorTile->items();
536
537 for ( const QString &connection : connections )
538 {
539 // do not overwrite already set setting
540 QgsVectorTileProviderConnection::settingsUrl->copyValueToKey( u"qgis/connections-vector-tile/%1/url"_s, {connection} );
541 QgsVectorTileProviderConnection::settingsZmin->copyValueToKey( u"qgis/connections-vector-tile/%1/zmin"_s, {connection} );
542 QgsVectorTileProviderConnection::settingsZmax->copyValueToKey( u"qgis/connections-vector-tile/%1/zmax"_s, {connection} );
543 QgsVectorTileProviderConnection::settingsAuthcfg->copyValueToKey( u"qgis/connections-vector-tile/%1/authcfg"_s, {connection} );
544 QgsVectorTileProviderConnection::settingsUsername->copyValueToKey( u"qgis/connections-vector-tile/%1/username"_s, {connection} );
545 QgsVectorTileProviderConnection::settingsPassword->copyValueToKey( u"qgis/connections-vector-tile/%1/password"_s, {connection} );
546 QgsVectorTileProviderConnection::settingsStyleUrl->copyValueToKey( u"qgis/connections-vector-tile/%1/styleUrl"_s, {connection} );
547 QgsVectorTileProviderConnection::settingsServiceType->copyValueToKey( u"qgis/connections-vector-tile/%1/serviceType"_s, {connection} );
548
549 if ( QgsVectorTileProviderConnection::settingsHeaders->exists( connection ) )
550 {
551 Q_NOWARN_DEPRECATED_PUSH const QgsHttpHeaders headers = QgsHttpHeaders( QgsVectorTileProviderConnection::settingsHeaders->value( connection ) );
552 settings->beginGroup( u"qgis/connections-vector-tile/%1"_s.arg( connection ) );
553 headers.updateSettings( *settings );
554 settings->endGroup();
556 }
557 }
558 }
559
560 // xyz - added in 3.30
561 {
562 const QStringList connections = QgsXyzConnectionSettings::sTreeXyzConnections->items();
563 for ( const QString &connection : connections )
564 {
565 QgsXyzConnectionSettings::settingsUrl->copyValueToKey( u"qgis/connections-xyz/%1/url"_s, {connection} );
566 QgsXyzConnectionSettings::settingsZmin->copyValueToKey( u"qgis/connections-xyz/%1/zmin"_s, {connection} );
567 QgsXyzConnectionSettings::settingsZmax->copyValueToKey( u"qgis/connections-xyz/%1/zmax"_s, {connection} );
568 QgsXyzConnectionSettings::settingsAuthcfg->copyValueToKey( u"qgis/connections-xyz/%1/authcfg"_s, {connection} );
569 QgsXyzConnectionSettings::settingsUsername->copyValueToKey( u"qgis/connections-xyz/%1/username"_s, {connection} );
570 QgsXyzConnectionSettings::settingsPassword->copyValueToKey( u"qgis/connections-xyz/%1/password"_s, {connection} );
571 QgsXyzConnectionSettings::settingsTilePixelRatio->copyValueToKey( u"qgis/connections-xyz/%1/tilePixelRatio"_s, {connection} );
572 QgsXyzConnectionSettings::settingsHidden->copyValueToKey( u"qgis/connections-xyz/%1/hidden"_s, {connection} );
573 QgsXyzConnectionSettings::settingsInterpretation->copyValueToKey( u"qgis/connections-xyz/%1/interpretation"_s, {connection} );
574
575 if ( QgsXyzConnectionSettings::settingsHeaders->exists( connection ) )
576 {
578 const QgsHttpHeaders headers = QgsHttpHeaders( QgsXyzConnectionSettings::settingsHeaders->value( connection ) );
579 settings->beginGroup( u"qgis/connections-xyz/%1"_s.arg( connection ) );
580 headers.updateSettings( *settings );
581 settings->endGroup();
583 }
584 }
585 }
586
587 // Arcgis - added in 3.30
588 {
589 const QStringList connections = QgsArcGisConnectionSettings::sTreeConnectionArcgis->items();
590 for ( const QString &connection : connections )
591 {
592 // do not overwrite already set setting
593 QgsArcGisConnectionSettings::settingsUrl->copyValueToKey( u"qgis/connections-arcgisfeatureserver/%1/url"_s, {connection} );
594 QgsArcGisConnectionSettings::settingsAuthcfg->copyValueToKey( u"qgis/ARCGISFEATURESERVER/%1/authcfg"_s, {connection} );
595 QgsArcGisConnectionSettings::settingsUsername->copyValueToKey( u"qgis/ARCGISFEATURESERVER/%1/username"_s, {connection} );
596 QgsArcGisConnectionSettings::settingsPassword->copyValueToKey( u"qgis/ARCGISFEATURESERVER/%1/password"_s, {connection} );
597 QgsArcGisConnectionSettings::settingsContentEndpoint->copyValueToKey( u"qgis/connections-arcgisfeatureserver/%1/content_endpoint"_s, {connection} );
598 QgsArcGisConnectionSettings::settingsCommunityEndpoint->copyValueToKey( u"qgis/connections-arcgisfeatureserver/%1/community_endpoint"_s, {connection} );
599 if ( QgsArcGisConnectionSettings::settingsHeaders->exists( connection ) )
600 {
601 if ( QgsArcGisConnectionSettings::settingsHeaders->exists( connection ) )
602 {
604 const QgsHttpHeaders headers = QgsHttpHeaders( QgsArcGisConnectionSettings::settingsHeaders->value( connection ) );
605 settings->beginGroup( u"qgis/connections-arcgisfeatureserver/%1"_s.arg( connection ) );
606 headers.updateSettings( *settings );
607 settings->endGroup();
609 }
610 }
611 }
612 }
613
614 // babel devices settings - added in 3.30
615 {
616 const QStringList devices = QgsBabelFormatRegistry::sTreeBabelDevices->items();
617 settings->setValue( u"/Plugin-GPS/devices/deviceList"_s, devices );
618 for ( const QString &device : devices )
619 {
620 QgsBabelFormatRegistry::settingsBabelWptDownload->copyValueToKey( u"/Plugin-GPS/devices/%1/wptdownload"_s, {device} );
621 QgsBabelFormatRegistry::settingsBabelWptUpload->copyValueToKey( u"/Plugin-GPS/devices/%1/wptupload"_s, {device} );
622 QgsBabelFormatRegistry::settingsBabelRteDownload->copyValueToKey( u"/Plugin-GPS/devices/%1/rtedownload"_s, {device} );
623 QgsBabelFormatRegistry::settingsBabelRteUpload->copyValueToKey( u"/Plugin-GPS/devices/%1/rteupload"_s, {device} );
624 QgsBabelFormatRegistry::settingsBabelTrkDownload->copyValueToKey( u"/Plugin-GPS/devices/%1/trkdownload"_s, {device} );
625 QgsBabelFormatRegistry::settingsBabelTrkUpload->copyValueToKey( u"/Plugin-GPS/devices/%1/trkupload"_s, {device} );
626 }
627 }
628
630}
631
SettingsOption
Settings options.
Definition qgis.h:743
static const Qgis::MapToolUnit DEFAULT_SNAP_UNITS
Default snapping distance units.
Definition qgis.h:6544
@ Pixels
Pixels unit of tolerance.
Definition qgis.h:5090
static const double DEFAULT_Z_COORDINATE
Default Z coordinate value.
Definition qgis.h:6521
@ Vertex
On vertices.
Definition qgis.h:770
static const double DEFAULT_SNAP_TOLERANCE
Default snapping distance tolerance.
Definition qgis.h:6539
static const double DEFAULT_M_COORDINATE
Default M coordinate value.
Definition qgis.h:6528
static QString defaultProjectScales()
A string with default project scales.
Definition qgis.cpp:676
@ Round
Use rounded joins.
Definition qgis.h:2180
@ Hidden
Hide measurement.
Definition qgis.h:4162
@ Round
Round cap.
Definition qgis.h:2167
@ ControlPoints
Direct control points mode - the curve is attracted to control points but does not pass through them.
Definition qgis.h:420
@ Ask
User is prompted before running scripts.
Definition qgis.h:445
@ AllLayers
On all vector layers.
Definition qgis.h:758
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryVariantMap * settingsHeaders
static const QgsSettingsEntryString * settingsContentEndpoint
static QgsSettingsTreeNamedListNode * sTreeConnectionArcgis
static const QgsSettingsEntryString * settingsAuthcfg
static const QgsSettingsEntryString * settingsCommunityEndpoint
static const QgsSettingsEntryString * settingsBabelWptDownload
static const QgsSettingsEntryString * settingsBabelRteUpload
static const QgsSettingsEntryString * settingsBabelTrkDownload
static const QgsSettingsEntryString * settingsBabelWptUpload
static const QgsSettingsEntryString * settingsBabelTrkUpload
static QgsSettingsTreeNamedListNode * sTreeBabelDevices
static const QgsSettingsEntryString * settingsBabelRteDownload
static const QgsSettingsEntryStringList * settingsSearchPathForTemplates
Settings entry search path for templates.
Definition qgslayout.h:664
static QgsSettingsTreeNamedListNode * sTreeLocatorFilters
Definition qgslocator.h:163
static const QgsSettingsEntryBool * settingsLocatorFilterDefault
Settings entry locator filter default value.
Definition qgslocator.h:168
static const QgsSettingsEntryBool * settingsLocatorFilterEnabled
Settings entry locator filter enabled.
Definition qgslocator.h:166
static const QgsSettingsEntryString * settingsLocatorFilterPrefix
Settings entry locator filter prefix.
Definition qgslocator.h:170
static const QgsSettingsEntryInteger * settingsNetworkTimeout
Settings entry network timeout.
static const QgsSettingsEntryBool * settingsPreferCoordinatesForWfsT11
static const QgsSettingsEntryString * settingsPagingEnabled
static const QgsSettingsEntryString * settingsMaxNumFeatures
static QgsSettingsTreeNamedListNode * sTreeOwsConnections
static const QgsSettingsEntryBool * settingsIgnoreGetFeatureInfoURI
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryBool * settingsReportedLayerExtents
static const QgsSettingsEntryEnumFlag< Qgis::DpiMode > * settingsDpiMode
static const QgsSettingsEntryBool * settingsIgnoreAxisOrientation
static const QgsSettingsEntryBool * settingsInvertAxisOrientation
static const QgsSettingsEntryString * settingsVersion
static const QgsSettingsEntryString * settingsPagesize
static const QgsSettingsEntryString * settingsAuthCfg
static const QgsSettingsEntryEnumFlag< Qgis::TilePixelRatio > * settingsTilePixelRatio
static const QgsSettingsEntryVariantMap * settingsHeaders
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryBool * settingsSmoothPixmapTransform
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryBool * settingsIgnoreGetMapURI
static const QgsSettingsEntryString * settingsTempPath
Settings entry temp path.
static const QgsSettingsEntryBool * settingsPreferFilenameAsLayerName
Settings entry prefer filename as layer name.
static const QgsSettingsEntryBool * settingsRasterDefaultEarlyResampling
static const QgsSettingsEntryDouble * settingsRasterDefaultOversampling
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
bool copyValueFromKey(const QString &key, bool removeSettingAtKey=false) const
Copies the value from a given key if it exists.
void copyValueToKeyIfChanged(const QString &key, const QStringList &dynamicKeyPartList=QStringList()) const
Copies the settings to the given key, if it has changed during the current QGIS session (see hasChang...
void copyValueToKey(const QString &key, const QStringList &dynamicKeyPartList=QStringList()) const
Copies the settings to the given key.
A boolean settings entry.
A color settings entry.
A double settings entry.
A template class for enum and flag settings entry.
A 64 bits integer (long long) settings entry.
An integer settings entry.
A string list settings entry.
A string settings entry.
static const QgsSettingsEntryDouble * settingsDigitizingSearchRadiusVertexEdit
Settings entry digitizing search radius vertex edit.
static const QgsSettingsEntryBool * settingsDigitizingDefaultSnapEnabled
Settings entry digitizing default snap enabled.
static const QgsSettingsEntryEnumFlag< Qgis::MapToolUnit > * settingsDigitizingDefaultSnappingToleranceUnit
Settings entry digitizing default snapping tolerance unit.
static const QgsSettingsEntryDouble * settingsDigitizingOffsetMiterLimit
Settings entry digitizing offset miter limit.
static const QgsSettingsEntryStringList * settingsCodeExecutionTrustedProjectsFolders
Settings entry for projects and folders that are allowed execution of embedded scripts across session...
static const QgsSettingsEntryEnumFlag< Qgis::JoinStyle > * settingsDigitizingOffsetJoinStyle
Settings entry digitizing offset join style.
static const QgsSettingsEntryDouble * settingsDigitizingMarkerSizeMm
Settings entry digitizing marker size mm.
static const QgsSettingsEntryEnumFlag< Qgis::MapToolUnit > * settingsDigitizingSearchRadiusVertexEditUnit
Settings entry digitizing search radius vertex edit unit.
static const QgsSettingsEntryBool * settingsLayerTreeShowFeatureCountForNewLayers
Settings entry show feature counts for newly added layers by default.
static const QgsSettingsEntryInteger * settingsDigitizingTracingMaxFeatureCount
Settings entry digitizing tracing max feature count.
static const QgsSettingsEntryColor * settingsDigitizingFillColor
Settings entry digitizing fill color.
static const QgsSettingsEntryBool * settingsAutosizeAttributeTable
Settings entry autosize columns by default when opening attribute table.
static const QgsSettingsEntryBool * settingsDigitizingDisableEnterAttributeValuesDialog
Settings entry digitizing disable enter attribute values dialog.
static const QgsSettingsEntryStringList * settingsCodeExecutionUntrustedProjectsFolders
Settings entry for projects and folders that are denied execution of embedded scripts across sessions...
static const QgsSettingsEntryDouble * settingsDigitizingDefaultSnappingTolerance
Settings entry digitizing default snapping tolerance.
static const QgsSettingsEntryInteger * settingsDigitizingLineWidth
Settings entry digitizing line width.
static const QgsSettingsEntryInteger * settingsDigitizingStreamTolerance
Settings entry digitizing stream tolerance.
static const QgsSettingsEntryEnumFlag< Qgis::CadMeasurementDisplayType > * settingsDigitizingStatusBarTotalLengthDisplay
Settings entry digitizing status bar perimeter/total length display.
static const QgsSettingsEntryBool * settingsDigitizingSnapTooltip
Settings entry digitizing snap tooltip.
static const QgsSettingsEntryEnumFlag< Qgis::SnappingMode > * settingsDigitizingDefaultSnapMode
Settings entry digitizing default snap type.
static const QgsSettingsEntryInteger64 * settingsNetworkCacheSize
Settings entry network cache directory.
static const QgsSettingsEntryBool * settingsDigitizingSnapInvisibleFeature
Settings entry digitizing snap invisible feature.
static const QgsSettingsEntryDouble * settingsDigitizingLineColorAlphaScale
Settings entry digitizing line color alpha scale.
static const QgsSettingsEntryDouble * settingsDigitizingDefaultMValue
Settings entry digitizing default m value.
static const QgsSettingsEntryBool * settingsDigitizingLineGhost
Settings entry digitizing line ghost.
static const QgsSettingsEntryBool * settingsDigitizingMarkerOnlyForSelected
Settings entry digitizing marker only for selected.
static const QgsSettingsEntryColor * settingsDigitizingSnapColor
Settings entry digitizing snap color.
static const QgsSettingsEntryInteger * settingsDigitizingNurbsDegree
Settings entry digitizing NURBS curve degree.
static const QgsSettingsEntryDouble * settingsDigitizingConvertToCurveAngleTolerance
Settings entry digitizing convert to curve angle tolerance.
static const QgsSettingsEntryString * settingsGpsBabelPath
Settings entry path to GPSBabel executable.
static const QgsSettingsEntryDouble * settingsDigitizingConvertToCurveDistanceTolerance
Settings entry digitizing convert to curve distance tolerance.
static const QgsSettingsEntryInteger * settingsDigitizingValidateGeometries
Settings entry digitizing validate geometries.
static const QgsSettingsEntryColor * settingsDigitizingLineColor
Settings entry digitizing line color.
static const QgsSettingsEntryInteger * settingsLayerParallelLoadingMaxCount
Settings entry maximum thread count used to load layer in parallel.
static const QgsSettingsEntryBool * settingsDigitizingReuseLastValues
Settings entry digitizing reuseLastValues.
static const QgsSettingsEntryStringList * settingsMapScales
static const QgsSettingsEntryBool * settingsLayerParallelLoading
Settings entry whether layer are loading in parallel.
static const QgsSettingsEntryEnumFlag< Qgis::CadMeasurementDisplayType > * settingsDigitizingStatusBarAreaDisplay
Settings entry digitizing status bar area display.
static const QgsSettingsEntryBool * settingsEnableWMSTilePrefetching
Settings entry enable WMS tile prefetching.
static const QgsSettingsEntryEnumFlag< Qgis::EndCapStyle > * settingsDigitizingOffsetCapStyle
Settings entry digitizing offset cap style.
static const QgsSettingsEntryEnumFlag< Qgis::NurbsMode > * settingsDigitizingNurbsMode
Settings entry digitizing NURBS mode.
static const QgsSettingsEntryEnumFlag< Qgis::SnappingType > * settingsDigitizingDefaultSnapType
Settings entry digitizing default snap type.
static const QgsSettingsEntryBool * settingsDigitizingConvertToCurve
Settings entry digitizing convert to curve.
static const QgsSettingsEntryDouble * settingsDigitizingDefaultZValue
Settings entry digitizing default z value.
static const QgsSettingsEntryString * settingsDigitizingMarkerStyle
Settings entry digitizing marker style.
static const QgsSettingsEntryBool * settingsDigitizingOffsetShowAdvanced
Settings entry digitizing offset show advanced.
static const QgsSettingsEntryInteger * settingsDigitizingOffsetQuadSeg
Settings entry digitizing offset quad seg.
static const QgsSettingsEntryEnumFlag< Qgis::EmbeddedScriptMode > * settingsCodeExecutionBehaviorUndeterminedProjects
Settings entry for behavior handling embedded scripts within projects.
static const QgsSettingsEntryString * settingsNetworkCacheDirectory
Settings entry network cache directory.
friend class QgsSettingsEntryBase
void setSelectedItem(const QString &item, const QStringList &parentsNamedItems=QStringList())
Sets the selected named item from the named list node.
QStringList items(const QStringList &parentsNamedItems=QStringList()) const
Returns the list of items.
QList< const QgsSettingsEntryBase * > childrenSettings() const
Returns the children settings.
static QgsSettingsTreeNode * sTreeDigitizing
static QgsSettingsTreeNode * sTreeWms
static QgsSettingsTreeNode * sTreeLayerTree
static QgsSettingsTreeNode * sTreeNetworkCache
static QgsSettingsTreeNode * sTreeGps
static QgsSettingsTreeNode * sTreeAttributeTable
static QgsSettingsTreeNode * sTreeMap
static QgsSettingsTreeNode * sTreeCore
QStringList childGroups(Qgis::SettingsOrigin origin=Qgis::SettingsOrigin::Any) const
Returns a list of all key top-level groups that contain keys that can be read using the QSettings obj...
void endGroup()
Resets the group to what it was before the corresponding beginGroup() call.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
bool contains(const QString &key, QgsSettings::Section section=QgsSettings::NoSection) const
Returns true if there exists a setting called key; returns false otherwise.
void beginGroup(const QString &prefix, QgsSettings::Section section=QgsSettings::NoSection)
Appends prefix to the current group.
static void releaseFlush()
Releases a previously made hold on flushing QgsSettings objects and writing new values to the underly...
static void holdFlush()
Temporarily places a hold on flushing QgsSettings objects and writing new values to the underlying in...
void remove(const QString &key, QgsSettings::Section section=QgsSettings::NoSection)
Removes the setting key and any sub-settings of key in a section.
static QgsSettingsProxy get()
Returns a proxy for a QgsSettings object.
static QgsSettingsTreeNamedListNode * sTreeXyzConnections
static const QgsSettingsEntryString * settingsPassword
static const QgsSettingsEntryDouble * settingsTilePixelRatio
static const QgsSettingsEntryString * settingsInterpretation
static const QgsSettingsEntryString * settingsUsername
static const QgsSettingsEntryString * settingsAuthcfg
static const QgsSettingsEntryInteger * settingsZmin
static const QgsSettingsEntryBool * settingsHidden
static const QgsSettingsEntryInteger * settingsZmax
static const QgsSettingsEntryString * settingsUrl
static const QgsSettingsEntryVariantMap * settingsHeaders
static const QgsSettingsEntryInteger * settingsRenderingLabelCandidatesLimitLines
Definition pal.h:96
static const QgsSettingsEntryInteger * settingsRenderingLabelCandidatesLimitPoints
Definition pal.h:95
static const QgsSettingsEntryInteger * settingsRenderingLabelCandidatesLimitPolygons
Definition pal.h:97
#define Q_NOWARN_DEPRECATED_POP
Definition qgis.h:7486
#define Q_NOWARN_DEPRECATED_PUSH
Definition qgis.h:7485