QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgssettingsregistrycore.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssettingsregistrycore.h
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  ***************************************************************************/
15 
16 
17 #ifndef QGSSETTINGSREGISTRYCORE_H
18 #define QGSSETTINGSREGISTRYCORE_H
19 
20 #include "qgis_core.h"
21 #include "qgis_sip.h"
22 #include "qgssettingsregistry.h"
23 #include "qgssettingsentry.h"
24 #include "qgssettingsentryimpl.h"
26 
27 #include "qgis.h"
28 #include "qgsgeometry.h"
29 #include "qgsmaplayerproxymodel.h"
30 
39 class CORE_EXPORT QgsSettingsRegistryCore : public QgsSettingsRegistry
40 {
41  public:
42 
47 
51  virtual ~QgsSettingsRegistryCore();
52 
53 #ifndef SIP_RUN
54  static const inline QgsSettingsEntryInteger settingsDigitizingStreamTolerance = QgsSettingsEntryInteger( QStringLiteral( "stream_tolerance" ), QgsSettings::Prefix::QGIS_DIGITIZING, 2 );
56 
58  static const inline QgsSettingsEntryInteger settingsDigitizingLineWidth = QgsSettingsEntryInteger( QStringLiteral( "line_width" ), QgsSettings::Prefix::QGIS_DIGITIZING, 1 );
59 
61  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorRed = QgsSettingsEntryInteger( QStringLiteral( "line_color_red" ), QgsSettings::Prefix::QGIS_DIGITIZING, 255 );
62 
64  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorGreen = QgsSettingsEntryInteger( QStringLiteral( "line_color_green" ), QgsSettings::Prefix::QGIS_DIGITIZING, 0 );
65 
67  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorBlue = QgsSettingsEntryInteger( QStringLiteral( "line_color_blue" ), QgsSettings::Prefix::QGIS_DIGITIZING, 0 );
68 
70  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorAlpha = QgsSettingsEntryInteger( QStringLiteral( "line_color_alpha" ), QgsSettings::Prefix::QGIS_DIGITIZING, 200 );
71 
73  static const inline QgsSettingsEntryDouble settingsDigitizingLineColorAlphaScale = QgsSettingsEntryDouble( QStringLiteral( "line_color_alpha_scale" ), QgsSettings::Prefix::QGIS_DIGITIZING, 0.75 );
74 
76  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorRed = QgsSettingsEntryInteger( QStringLiteral( "fill_color_red" ), QgsSettings::Prefix::QGIS_DIGITIZING, 255 );
77 
79  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorGreen = QgsSettingsEntryInteger( QStringLiteral( "fill_color_green" ), QgsSettings::Prefix::QGIS_DIGITIZING, 0 );
80 
82  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorBlue = QgsSettingsEntryInteger( QStringLiteral( "fill_color_blue" ), QgsSettings::Prefix::QGIS_DIGITIZING, 0 );
83 
85  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorAlpha = QgsSettingsEntryInteger( QStringLiteral( "fill_color_alpha" ), QgsSettings::Prefix::QGIS_DIGITIZING, 30 );
86 
88  static const inline QgsSettingsEntryBool settingsDigitizingLineGhost = QgsSettingsEntryBool( QStringLiteral( "line_ghost" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
89 
91  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultZValue = QgsSettingsEntryDouble( QStringLiteral( "default_z_value" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::DEFAULT_Z_COORDINATE );
92 
94  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultMValue = QgsSettingsEntryDouble( QStringLiteral( "default_m_value" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::DEFAULT_M_COORDINATE );
95 
97  static const inline QgsSettingsEntryBool settingsDigitizingDefaultSnapEnabled = QgsSettingsEntryBool( QStringLiteral( "default_snap_enabled" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
98 
100  static const inline QgsSettingsEntryEnumFlag<Qgis::SnappingMode> settingsDigitizingDefaultSnapMode = QgsSettingsEntryEnumFlag<Qgis::SnappingMode>( QStringLiteral( "default_snap_mode" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::SnappingMode::AllLayers );
101 
103  static const inline QgsSettingsEntryEnumFlag<Qgis::SnappingType> settingsDigitizingDefaultSnapType = QgsSettingsEntryEnumFlag<Qgis::SnappingType>( QStringLiteral( "default_snap_type" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::SnappingType::Vertex );
104 
106  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultSnappingTolerance = QgsSettingsEntryDouble( QStringLiteral( "default_snapping_tolerance" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::DEFAULT_SNAP_TOLERANCE );
107 
109  static const inline QgsSettingsEntryEnumFlag<QgsTolerance::UnitType> settingsDigitizingDefaultSnappingToleranceUnit = QgsSettingsEntryEnumFlag<QgsTolerance::UnitType>( QStringLiteral( "default_snapping_tolerance_unit" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::DEFAULT_SNAP_UNITS );
110 
112  static const inline QgsSettingsEntryDouble settingsDigitizingSearchRadiusVertexEdit = QgsSettingsEntryDouble( QStringLiteral( "search_radius_vertex_edit" ), QgsSettings::Prefix::QGIS_DIGITIZING, 10 );
113 
115  static const inline QgsSettingsEntryEnumFlag<QgsTolerance::UnitType> settingsDigitizingSearchRadiusVertexEditUnit = QgsSettingsEntryEnumFlag<QgsTolerance::UnitType>( QStringLiteral( "search_radius_vertex_edit_unit" ), QgsSettings::Prefix::QGIS_DIGITIZING, QgsTolerance::Pixels );
116 
118  static const inline QgsSettingsEntryColor settingsDigitizingSnapColor = QgsSettingsEntryColor( QStringLiteral( "snap_color" ), QgsSettings::Prefix::QGIS_DIGITIZING, QColor( Qt::magenta ) );
119 
121  static const inline QgsSettingsEntryBool settingsDigitizingSnapTooltip = QgsSettingsEntryBool( QStringLiteral( "snap_tooltip" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
122 
124  static const inline QgsSettingsEntryBool settingsDigitizingSnapInvisibleFeature = QgsSettingsEntryBool( QStringLiteral( "snap_invisible_feature" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
125 
127  static const inline QgsSettingsEntryBool settingsDigitizingMarkerOnlyForSelected = QgsSettingsEntryBool( QStringLiteral( "marker_only_for_selected" ), QgsSettings::Prefix::QGIS_DIGITIZING, true );
128 
130  static const inline QgsSettingsEntryString settingsDigitizingMarkerStyle = QgsSettingsEntryString( QStringLiteral( "marker_style" ), QgsSettings::Prefix::QGIS_DIGITIZING, "Cross" );
131 
133  static const inline QgsSettingsEntryDouble settingsDigitizingMarkerSizeMm = QgsSettingsEntryDouble( QStringLiteral( "marker_size_mm" ), QgsSettings::Prefix::QGIS_DIGITIZING, 2.0 );
134 
136  static const inline QgsSettingsEntryBool settingsDigitizingReuseLastValues = QgsSettingsEntryBool( QStringLiteral( "reuseLastValues" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
137 
139  static const inline QgsSettingsEntryBool settingsDigitizingDisableEnterAttributeValuesDialog = QgsSettingsEntryBool( QStringLiteral( "disable_enter_attribute_values_dialog" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
140 
142  static const inline QgsSettingsEntryInteger settingsDigitizingValidateGeometries = QgsSettingsEntryInteger( QStringLiteral( "validate_geometries" ), QgsSettings::Prefix::QGIS_DIGITIZING, 1 );
143 
145  static const inline QgsSettingsEntryEnumFlag<Qgis::JoinStyle> settingsDigitizingOffsetJoinStyle = QgsSettingsEntryEnumFlag<Qgis::JoinStyle>( QStringLiteral( "offset_join_style" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::JoinStyle::Round );
146 
148  static const inline QgsSettingsEntryInteger settingsDigitizingOffsetQuadSeg = QgsSettingsEntryInteger( QStringLiteral( "offset_quad_seg" ), QgsSettings::Prefix::QGIS_DIGITIZING, 8 );
149 
151  static const inline QgsSettingsEntryDouble settingsDigitizingOffsetMiterLimit = QgsSettingsEntryDouble( QStringLiteral( "offset_miter_limit" ), QgsSettings::Prefix::QGIS_DIGITIZING, 5.0 );
152 
154  static const inline QgsSettingsEntryBool settingsDigitizingConvertToCurve = QgsSettingsEntryBool( QStringLiteral( "convert_to_curve" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
155 
157  static const inline QgsSettingsEntryDouble settingsDigitizingConvertToCurveAngleTolerance = QgsSettingsEntryDouble( QStringLiteral( "convert_to_curve_angle_tolerance" ), QgsSettings::Prefix::QGIS_DIGITIZING, 1e-6 );
158 
160  static const inline QgsSettingsEntryDouble settingsDigitizingConvertToCurveDistanceTolerance = QgsSettingsEntryDouble( QStringLiteral( "convert_to_curve_distance_tolerance" ), QgsSettings::Prefix::QGIS_DIGITIZING, 1e-6 );
161 
163  static const inline QgsSettingsEntryEnumFlag<Qgis::EndCapStyle> settingsDigitizingOffsetCapStyle = QgsSettingsEntryEnumFlag<Qgis::EndCapStyle>( QStringLiteral( "offset_cap_style" ), QgsSettings::Prefix::QGIS_DIGITIZING, Qgis::EndCapStyle::Round );
164 
166  static const inline QgsSettingsEntryBool settingsDigitizingOffsetShowAdvanced = QgsSettingsEntryBool( QStringLiteral( "offset_show_advanced" ), QgsSettings::Prefix::QGIS_DIGITIZING, false );
167 
169  static const inline QgsSettingsEntryInteger settingsDigitizingTracingMaxFeatureCount = QgsSettingsEntryInteger( QStringLiteral( "tracing_max_feature_count" ), QgsSettings::Prefix::QGIS_DIGITIZING, 10000 );
170 
172  static const inline QgsSettingsEntryString settingsGpsBabelPath = QgsSettingsEntryString( QStringLiteral( "gpsbabelPath" ), QgsSettings::Prefix::GPS, QStringLiteral( "gpsbabel" ) );
173 
175  static const inline QgsSettingsEntryBool settingsLayerTreeShowFeatureCountForNewLayers = QgsSettingsEntryBool( QStringLiteral( "show_feature_count_for_new_layers" ), QgsSettings::Prefix::CORE_LAYERTREE, false, QStringLiteral( "If true, feature counts will be shown in the layer tree for all newly added layers." ) );
176 #endif
177 
178 };
179 
180 #endif // QGSSETTINGSREGISTRYCORE_H
Qgis::DEFAULT_SNAP_TOLERANCE
static const double DEFAULT_SNAP_TOLERANCE
Default snapping distance tolerance.
Definition: qgis.h:2049
QgsSettingsEntryString
A string settings entry.
Definition: qgssettingsentryimpl.h:87
qgis.h
QgsSettingsEntryInteger
An integer settings entry.
Definition: qgssettingsentryimpl.h:299
QgsSettingsRegistry
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...
Definition: qgssettingsregistry.h:34
qgssettingsentry.h
QgsTolerance::Pixels
@ Pixels
Pixels unit of tolerance.
Definition: qgstolerance.h:46
qgis_sip.h
qgssettingsentryimpl.h
Qgis::DEFAULT_Z_COORDINATE
static const double DEFAULT_Z_COORDINATE
Default Z coordinate value.
Definition: qgis.h:2029
Qgis::DEFAULT_M_COORDINATE
static const double DEFAULT_M_COORDINATE
Default M coordinate value.
Definition: qgis.h:2036
Qgis::SnappingMode::AllLayers
@ AllLayers
On all vector layers.
QgsSettingsEntryDouble
A double settings entry.
Definition: qgssettingsentryimpl.h:394
QgsSettingsRegistryCore
QgsSettingsRegistryCore is used for settings introspection and collects all QgsSettingsEntry instance...
Definition: qgssettingsregistrycore.h:39
QgsSettingsEntryColor
A color settings entry.
Definition: qgssettingsentryimpl.h:511
qgsgeometry.h
qgssettingsentryenumflag.h
qgsmaplayerproxymodel.h
QgsSettings::Prefix::GPS
static const char * GPS
Definition: qgssettings.h:94
QgsSettings::Prefix::QGIS_DIGITIZING
static const char * QGIS_DIGITIZING
Definition: qgssettings.h:102
qgssettingsregistry.h
Qgis::DEFAULT_SNAP_UNITS
static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS
Default snapping distance units.
Definition: qgis.h:2055
QgsSettingsEntryEnumFlag< Qgis::SnappingMode >
QgsSettings::Prefix::CORE_LAYERTREE
static const char * CORE_LAYERTREE
Definition: qgssettings.h:107
QgsSettingsEntryBool
A boolean settings entry.
Definition: qgssettingsentryimpl.h:241