[Qgis-developer] Housekeeping in the (Qgs)Settings

Alessandro Pasotti apasotti at gmail.com
Mon Mar 6 02:05:15 PST 2017


Hi,

the current keys naming for the settings is not very consistent, what do
you guys think about cleaning it a bit?

I was thinking at:

1. adding an 'app' section to QgsSettings::Section enum, to store
namespaced settings for the application
2. remove the '/' at the beginning of the keys (it's completely unuseful)
3. enforce namespacing with the use of Sections on all keys used in the
'/src/*' folders

This is a quick grep|sort|uniq of the setting keys:


allowGeometrylessTables
/BetterAttributeTable/geometry
/browser/favourites
/browser/hiddenPaths
cache/directory
cache/size
/colors/palettecolors
/colors/palettelabels
/colors/recent
/ColorWidgets/textWidgetFormat
/Composer/defaultFont
/Composer/defaultSnapGridOffsetX
/Composer/defaultSnapGridOffsetY
/Composer/defaultSnapGridResolution
/Composer/defaultSnapTolerancePixels
/Composer/geometry
composer/searchPathsForTemplates
/ComposerUI/state
CptCity/archiveName
CptCity/baseDir
crs
database
/dataitem/directoryHiddenColumns
/Db2/connections/selected
dboptions
dbworkspace
Digitizing
/digitizing/simplify_tolerance
/digitizing/simplify_tolerance_units
dpiMode
/Error/dialog/detail
estimatedMetadata
/eVis/browser-geometry
/eVis/db-geometry
fontFamily
/fontFamily
fontPointSize
/fontPointSize
geometryColumnsOnly
/gps/lastPort
/GradientEditor/plotAlpha
/GradientEditor/plotHue
/GradientEditor/plotLightness
/GradientEditor/plotSaturation
/GRASS/browser/import/crsTransform
/GRASS/browser/import/external
/GRASS/gidbase/custom
/GRASS/gidbase/customDir
/GRASS/lastDirectOutputDir
/GRASS/lastGisdbase
/GRASS/lastLocation
/GRASS/lastMapset
/GRASS/modules/config/custom
/GRASS/modules/config/customDir
/GRASS/modules/debug
/GRASS/newMapsetWizard/openMapset
/GRASS/region/color
/GRASS/region/on
/GRASS/region/width
/GRASS/showTopoLayers
/GRASS/windows/tools/geometry
groupBoxCustom
help/helpSearchPath
/HelpViewer/geometry
/HistogramWidget/showMean
/HistogramWidget/showStdev
host
iconSize
/IconSize
ignoreAxisOrientation
ignoreGetFeatureInfoURI
ignoreGetMapURI
invertAxisOrientation
lastColorMapDir
locale
locale/overrideFlag
locale/userLocale
/Map/highlight/buffer
/Map/highlight/color
/Map/highlight/colorAlpha
/Map/highlight/minWidth
/Map/identifyMode
/Map/logCanvasRefreshEvent
Map/scales
/Map/searchRadiusMM
/MSSQL/connections/selected
/ogr/connections/selectedtype
/osm/lastDir
password
path
/Plugin-GeoReferencer/lastcompression
/Plugin-GeoReferencer/lastPDFReportDir
/Plugin-GeoReferencer/lastresampling
/Plugin-GeoReferencer/lasttransformation
/Plugin-GeoReferencer/loadinqgis
/Plugin-GeoReferencer/targetsrs
/Plugin-GeoReferencer/TransformSettingsWindow/geometry
/Plugin-Georeferencer/user_specified_resolution
/Plugin-GeoReferencer/user_specified_resx
/Plugin-GeoReferencer/user_specified_resy
/Plugin-Georeferencer/word_file_checkbox
/Plugin-GeoReferencer/zeroastrans
/Plugin-GPS/devicelist
/Plugin-GPS/geometry
/Plugin-GPS/gpsbabelpath
/Plugin-GPS/gpxdirectory
/Plugin-GPS/importdirectory
/Plugin-GPS/lastdldevice
/Plugin-GPS/lastdlport
/Plugin-GPS/lastImportFilter
/Plugin-GPS/lastTab
/Plugin-GPS/lastuldevice
/Plugin-GPS/lastulport
Plugin-OfflineEditing/geometry
Plugin-OfflineEditing/offline_data_path
plugins/searchPathsForPlugins
port
/PostgreSQL/connections/selected
previewImage
/Projections/defaultBehavior
/Projections/layerDefaultCrs
/Projections/otfTransformEnabled
/Projections/projectDefaultCrs
/Projections/showDatumTransformDialog
proxy/proxyEnabled
proxy/proxyExcludedUrls
proxy/proxyHost
proxy/proxyPassword
proxy/proxyPort
proxy/proxyType
proxy/proxyUser
pythonConsole/fontfamilytextEditor
pythonConsole/fontsizeEditor
/qgis/addDb2DC
/qgis/addMSSQLDC
/qgis/addPostgisDC
qgis/askToSaveProjectChanges
/qgis/attributeTableBehavior
/qgis/attributeTableLastView
/qgis/attributeTableRowCache
/qgis/attributeTableView
/qgis/capitalizeLayerName
/qgis/checkVersion
/Qgis/connections-wms/selected
/qgis/copyFeatureFormat
/qgis/copyGeometryAsWKT
/qgis/default_canvas_color_blue
/qgis/default_canvas_color_green
/qgis/default_canvas_color_red
/qgis/default_measure_color_blue
/qgis/default_measure_color_green
/qgis/default_measure_color_red
/qgis/default_selection_color_alpha
/qgis/default_selection_color_blue
/qgis/default_selection_color_green
/qgis/default_selection_color_red
/qgis/digitizing/default_snap_enabled
/qgis/digitizing/default_snap_mode
/qgis/digitizing/default_snapping_tolerance
/qgis/digitizing/default_snapping_tolerance_unit
/qgis/digitizing/disable_enter_attribute_values_dialog
/qgis/digitizing/fill_color_alpha
/qgis/digitizing/fill_color_blue
/qgis/digitizing/fill_color_green
/qgis/digitizing/fill_color_red
/qgis/digitizing/line_color_alpha
/qgis/digitizing/line_color_alpha_scale
/qgis/digitizing/line_color_blue
/qgis/digitizing/line_color_green
/qgis/digitizing/line_color_red
/qgis/digitizing/line_ghost
/qgis/digitizing/line_width
/qgis/digitizing/marker_only_for_selected
/qgis/digitizing/marker_size
/qgis/digitizing/marker_style
/qgis/digitizing/reuseLastValues
/qgis/digitizing/search_radius_vertex_edit
/qgis/digitizing/search_radius_vertex_edit_unit
/qgis/digitizing/validate_geometries
/qgis/dockAttributeTable
/qgis/enableMacros
/qgis/enableMapTips
Qgis/helpQgisHomePageUrl
/qgis/ignoreShapeEncoding
/qgis/legendDoubleClickAction
/qgis/live_color_dialogs
/qgis/magnifier_factor_default
/qgis/measure/angleunits
/qgis/measure/decimalplaces
/qgis/measure/displayunits
/qgis/measure/keepbaseunit
/qgis/messageTimeout
/qgis/native_color_dialogs
/qgis/new_layers_visible
/qgis/newProjectDefault
/qgis/overwriteStyle
/qgis/projectTemplateDir
/qgis/projOpenAtLaunch
/qgis/projOpenAtLaunchPath
/qgis/projOpenedOKAtLaunch
/qgis/promptForRasterSublayers
/qgis/promptForSublayers
Qgis/QgisApiUrl
Qgis/reportaBugUrl
/qgis/scanItemsFastScanUris
/qgis/scanItemsInBrowser2
/qgis/scanZipInBrowser2
/qgis/segmentationTolerance
/qgis/segmentationToleranceType
/qgis/showLegendClassifiers
/qgis/showTips%1
/qgis/simplifyAlgorithm
/qgis/simplifyDrawingHints
/qgis/simplifyDrawingTol
/qgis/simplifyLocal
/qgis/simplifyMaxScale
qgis/stylesheet/groupBoxCustom
Qgis/supportProvidersUrl
/qgis/warnOldProjectVersion
/qgis/wheel_action
/qgis/WMSSearchUrl
/qgis/zoom_factor
/Raster/defaultPalette
/Raster/histogram/drawLines
/Raster/histogram/showMarkers
/Raster/histogram/updateStyleToMinMax
/Raster/histogram/zoomToMinMax
referer
savePassword
saveUsername
service
smoothPixmapTransform
/SpatiaLite/connections/%1/sqlitepath
/SpatiaLite/connections/selected
SpatialQuery/geometry
sslmode
/StatisticalSummaryDock/checked_%1
/StatisticalSummaryDock/checked_missing_values
style/lastStyleDir
svg/searchPathsForSVG
/Themes
title
/UI/annotationTool
UI/autoApplyStyling
/UI/ComposerManager/templatePath
/UI/Customization/enabled
/UI/defaultAddDbLayerAction
/UI/defaultFeatureService
/UI/defaultMapService
/UI/defaultMoveTool
/UI/defaultNewLayer
/UI/defaultPointSymbolAction
/UI/encoding
/UI/geometry
UI/lastAuthImportBundleOpenFileDir
UI/lastAuthImportCertOpenFileDir
UI/lastAuthImportSslOpenFileDir
UI/lastAuthOpenFileDir
/UI/lastComposerTemplateDir
UI/lastComposerTemplateDir
/UI/lastExternalResourceWidgetDefaultPath
UI/lastMatchToSymbolsDir
/UI/lastProjectDir
/UI/lastRasterFileDir
/UI/lastSaveAsImageDir
/UI/lastSaveAsImageFilter
/UI/lastSaveAsSvgFile
/UI/lastSpatiaLiteDir
/UI/lastSVGMarkerDir
/UI/LastUsedDirectory
/UI/lastVectorFileFilterDir
/UI/lastVectorFormat
/UI/measureTool
/UI/missingDirectory
/UI/recentProjections
/UI/recentProjectionsAuthId
/UI/recentProjectionsProj4
/UI/recentProjectsList
/UI/selectTool
/UI/state
/UI/styleUndoMergeTimeout
/UI/tileScaleEnabled
UI/UITheme
url
username
userTablesOnly
/variables/names
/variables/values
wfs/max_feature_count_if_not_provided
/Windows/AttributeSelectionDialog/geometry
/Windows/BetterAttributeTable/geometry
/Windows/Bookmarks/geometry
/Windows/Bookmarks/headerstate
/Windows/Bookmarks/LastUsedDirectory
/Windows/ChangeLabelProps/geometry
/Windows/ColorDialog/activeComponent
/Windows/ColorDialog/activeScheme
/Windows/ColorDialog/activeTab
/Windows/ColorDialog/customColor1
/Windows/ColorDialog/customColor10
/Windows/ColorDialog/customColor11
/Windows/ColorDialog/customColor12
/Windows/ColorDialog/customColor13
/Windows/ColorDialog/customColor14
/Windows/ColorDialog/customColor15
/Windows/ColorDialog/customColor16
/Windows/ColorDialog/customColor2
/Windows/ColorDialog/customColor3
/Windows/ColorDialog/customColor4
/Windows/ColorDialog/customColor5
/Windows/ColorDialog/customColor6
/Windows/ColorDialog/customColor7
/Windows/ColorDialog/customColor8
/Windows/ColorDialog/customColor9
/Windows/ColorDialog/geometry
/Windows/ColorDialog/sampleRadius
/Windows/ComposerImageExportOptionsDialog/geometry
/Windows/ComposerManager/geometry
/Windows/ComposerTableBackgroundColorsDialog/geometry
/Windows/CptCityColorRampV2Dialog/geometry
/Windows/CptCityColorRampV2Dialog/splitter
/Windows/CustomProjection/geometry
/Windows/DatumTransformDialog/columnWidths/%1
/Windows/DatumTransformDialog/geometry
/Windows/DatumTransformDialog/hideDeprecated
/Windows/DatumTransformDialog/rememberSelection
/Windows/Db2SourceSelect/columnWidths/%1
/Windows/Db2SourceSelect/geometry
/Windows/Db2SourceSelect/HoldDialogOpen
/Windows/DecorationCopyright/geometry
/Windows/DecorationNorthArrow/geometry
/Windows/DecorationScaleBar/geometry
/Windows/Diagrams/OptionsSplitState
/Windows/Diagrams/Tab
/Windows/EmbedLayer/geometry
/Windows/ExpressionBuilderDialog/geometry
/Windows/ExpressionSelectionDialog/geometry
/Windows/GradientEditor/geometry
/Windows/Labeling/FontPreviewSplitState
/Windows/Labeling/OptionsSplitState
/Windows/Labeling/Tab
/Windows/loadStyleFromDb/geometry
/Windows/Measure/geometry
/Windows/Measure/h
/Windows/Measure/hNoTable
/Windows/MergeAttributes/geometry
/Windows/MessageViewer/geometry
/Windows/MSSQLSourceSelect/columnWidths/%1
/Windows/MSSQLSourceSelect/geometry
/Windows/MSSQLSourceSelect/HoldDialogOpen
/Windows/NewGeoPackageLayer/geometry
/Windows/NewMemoryLayer/geometry
/Windows/NewSpatiaLiteLayer/geometry
/Windows/NewVectorLayer/geometry
/Windows/OGRDatabaseConnection/geometry
/Windows/OpenVectorLayer/geometry
/Windows/PgSourceSelect/columnWidths/%1
/Windows/PgSourceSelect/geometry
/Windows/PgSourceSelect/HoldDialogOpen
/Windows/PluginManager/secondSplitterState
/Windows/ProjectionSelector/geometry
/Windows/QgsAttributeTypeDialog/geometry
/Windows/QgsDelAttrDialog/geometry
/Windows/QgsExpressionBuilderWidget/editorsplitter
/Windows/QgsExpressionBuilderWidget/functionsplitter
/Windows/QgsExpressionBuilderWidget/splitter
/Windows/QgsFieldCalculator/geometry
/Windows/QgsGrassNewMapset/geometry
/Windows/QgsOrganizeTableColumnsDialog/geometry
/Windows/QgsRendererRulePropsDialog/geometry
/Windows/QueryBuilder/geometry
/Windows/RasterCalc/geometry
/Windows/saveStyleToDb/geometry
/Windows/SelectByForm/geometry
/Windows/ShortcutsDialog/geometry
/Windows/SourceSelectDialog/geometry
/Windows/SourceSelectDialog/UseTitleLayerName
/Windows/SpatiaLiteSourceSelect/geometry
/Windows/SpatiaLiteSourceSelect/HoldDialogOpen
/Windows/StyleV2Manager/geometry
/Windows/StyleV2Manager/splitter
/Windows/SvgSelectorDialog/geometry
/Windows/SvgSelectorWidget/RelativePath
/Windows/symbolLevelsDlg/geometry
/Windows/SymbolSelectorWidget/geometry
/Windows/TextFormatDialog/geometry
/Windows/VectorLayerSaveAs/geometry
/Windows/WFSSourceSelect/FeatureCurrentViewExtent
/Windows/WFSSourceSelect/geometry
/Windows/WFSSourceSelect/HoldDialogOpen
/Windows/WFSSourceSelect/UseTitleLayerName
/Windows/WMSSourceSelect/geometry
/Windows/WMTSDimensions/geometry
zmax
zmin

-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170306/16bd331b/attachment-0001.html>


More information about the Qgis-developer mailing list