QGIS API Documentation  3.24.2-Tisler (13c1a02865)
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 
25 #include "qgis.h"
26 #include "qgssnappingconfig.h"
27 #include "qgsgeometry.h"
28 #include "qgsmaplayerproxymodel.h"
29 
30 #ifdef _MSC_VER
31 #include "qgsunittypes.h"
32 
35 template class CORE_EXPORT QgsSettingsEntryEnumFlag<Qgis::JoinStyle> SIP_SKIP;
36 template class CORE_EXPORT QgsSettingsEntryEnumFlag<Qgis::EndCapStyle> SIP_SKIP;
39 #endif
40 
49 class CORE_EXPORT QgsSettingsRegistryCore : public QgsSettingsRegistry
50 {
51  public:
52 
57 
61  virtual ~QgsSettingsRegistryCore();
62 
63 #ifndef SIP_RUN
65  static const inline QgsSettingsEntryInteger settingsDigitizingStreamTolerance = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/stream_tolerance" ), QgsSettings::NoSection, 2 );
66 
68  static const inline QgsSettingsEntryInteger settingsDigitizingLineWidth = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/line_width" ), QgsSettings::NoSection, 1 );
69 
71  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorRed = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/line_color_red" ), QgsSettings::NoSection, 255 );
72 
74  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorGreen = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/line_color_green" ), QgsSettings::NoSection, 0 );
75 
77  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorBlue = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/line_color_blue" ), QgsSettings::NoSection, 0 );
78 
80  static const inline QgsSettingsEntryInteger settingsDigitizingLineColorAlpha = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/line_color_alpha" ), QgsSettings::NoSection, 200 );
81 
83  static const inline QgsSettingsEntryDouble settingsDigitizingLineColorAlphaScale = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/line_color_alpha_scale" ), QgsSettings::NoSection, 0.75 );
84 
86  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorRed = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/fill_color_red" ), QgsSettings::NoSection, 255 );
87 
89  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorGreen = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/fill_color_green" ), QgsSettings::NoSection, 0 );
90 
92  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorBlue = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/fill_color_blue" ), QgsSettings::NoSection, 0 );
93 
95  static const inline QgsSettingsEntryInteger settingsDigitizingFillColorAlpha = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/fill_color_alpha" ), QgsSettings::NoSection, 30 );
96 
98  static const inline QgsSettingsEntryBool settingsDigitizingLineGhost = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/line_ghost" ), QgsSettings::NoSection, false );
99 
101  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultZValue = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/default_z_value" ), QgsSettings::NoSection, Qgis::DEFAULT_Z_COORDINATE );
102 
104  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultMValue = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/default_m_value" ), QgsSettings::NoSection, Qgis::DEFAULT_M_COORDINATE );
105 
107  static const inline QgsSettingsEntryBool settingsDigitizingDefaultSnapEnabled = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/default_snap_enabled" ), QgsSettings::NoSection, false );
108 
110  static const inline QgsSettingsEntryEnumFlag<QgsSnappingConfig::SnappingTypes> settingsDigitizingDefaultSnapType = QgsSettingsEntryEnumFlag<QgsSnappingConfig::SnappingTypes>( QStringLiteral( "/qgis/digitizing/default_snap_type" ), QgsSettings::NoSection, QgsSnappingConfig::VertexFlag );
111 
113  static const inline QgsSettingsEntryDouble settingsDigitizingDefaultSnappingTolerance = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/default_snapping_tolerance" ), QgsSettings::NoSection, Qgis::DEFAULT_SNAP_TOLERANCE );
114 
116  static const inline QgsSettingsEntryEnumFlag<QgsTolerance::UnitType> settingsDigitizingDefaultSnappingToleranceUnit = QgsSettingsEntryEnumFlag<QgsTolerance::UnitType>( QStringLiteral( "/qgis/digitizing/default_snapping_tolerance_unit" ), QgsSettings::NoSection, Qgis::DEFAULT_SNAP_UNITS );
117 
119  static const inline QgsSettingsEntryDouble settingsDigitizingSearchRadiusVertexEdit = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/search_radius_vertex_edit" ), QgsSettings::NoSection, 10 );
120 
122  static const inline QgsSettingsEntryEnumFlag<QgsTolerance::UnitType> settingsDigitizingSearchRadiusVertexEditUnit = QgsSettingsEntryEnumFlag<QgsTolerance::UnitType>( QStringLiteral( "/qgis/digitizing/search_radius_vertex_edit_unit" ), QgsSettings::NoSection, QgsTolerance::Pixels );
123 
125  static const inline QgsSettingsEntryColor settingsDigitizingSnapColor = QgsSettingsEntryColor( QStringLiteral( "/qgis/digitizing/snap_color" ), QgsSettings::NoSection, QColor( Qt::magenta ) );
126 
128  static const inline QgsSettingsEntryBool settingsDigitizingSnapTooltip = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/snap_tooltip" ), QgsSettings::NoSection, false );
129 
131  static const inline QgsSettingsEntryBool settingsDigitizingSnapInvisibleFeature = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/snap_invisible_feature" ), QgsSettings::NoSection, false );
132 
134  static const inline QgsSettingsEntryBool settingsDigitizingMarkerOnlyForSelected = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/marker_only_for_selected" ), QgsSettings::NoSection, true );
135 
137  static const inline QgsSettingsEntryString settingsDigitizingMarkerStyle = QgsSettingsEntryString( QStringLiteral( "/qgis/digitizing/marker_style" ), QgsSettings::NoSection, "Cross" );
138 
140  static const inline QgsSettingsEntryDouble settingsDigitizingMarkerSizeMm = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/marker_size_mm" ), QgsSettings::NoSection, 2.0 );
141 
143  static const inline QgsSettingsEntryBool settingsDigitizingReuseLastValues = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/reuseLastValues" ), QgsSettings::NoSection, false );
144 
146  static const inline QgsSettingsEntryBool settingsDigitizingDisableEnterAttributeValuesDialog = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/disable_enter_attribute_values_dialog" ), QgsSettings::NoSection, false );
147 
149  static const inline QgsSettingsEntryInteger settingsDigitizingValidateGeometries = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/validate_geometries" ), QgsSettings::NoSection, 1 );
150 
152  static const inline QgsSettingsEntryEnumFlag<Qgis::JoinStyle> settingsDigitizingOffsetJoinStyle = QgsSettingsEntryEnumFlag<Qgis::JoinStyle>( QStringLiteral( "/qgis/digitizing/offset_join_style" ), QgsSettings::NoSection, Qgis::JoinStyle::Round );
153 
155  static const inline QgsSettingsEntryInteger settingsDigitizingOffsetQuadSeg = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/offset_quad_seg" ), QgsSettings::NoSection, 8 );
156 
158  static const inline QgsSettingsEntryDouble settingsDigitizingOffsetMiterLimit = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/offset_miter_limit" ), QgsSettings::NoSection, 5.0 );
159 
161  static const inline QgsSettingsEntryBool settingsDigitizingConvertToCurve = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/convert_to_curve" ), QgsSettings::NoSection, false );
162 
164  static const inline QgsSettingsEntryDouble settingsDigitizingConvertToCurveAngleTolerance = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/convert_to_curve_angle_tolerance" ), QgsSettings::NoSection, 1e-6 );
165 
167  static const inline QgsSettingsEntryDouble settingsDigitizingConvertToCurveDistanceTolerance = QgsSettingsEntryDouble( QStringLiteral( "/qgis/digitizing/convert_to_curve_distance_tolerance" ), QgsSettings::NoSection, 1e-6 );
168 
170  static const inline QgsSettingsEntryEnumFlag<Qgis::EndCapStyle> settingsDigitizingOffsetCapStyle = QgsSettingsEntryEnumFlag<Qgis::EndCapStyle>( QStringLiteral( "/qgis/digitizing/offset_cap_style" ), QgsSettings::NoSection, Qgis::EndCapStyle::Round );
171 
173  static const inline QgsSettingsEntryBool settingsDigitizingOffsetShowAdvanced = QgsSettingsEntryBool( QStringLiteral( "/qgis/digitizing/offset_show_advanced" ), QgsSettings::NoSection, false );
174 
176  static const inline QgsSettingsEntryInteger settingsDigitizingTracingMaxFeatureCount = QgsSettingsEntryInteger( QStringLiteral( "/qgis/digitizing/tracing_max_feature_count" ), QgsSettings::NoSection, 10000 );
177 
179  static const inline QgsSettingsEntryString settingsGpsBabelPath = QgsSettingsEntryString( QStringLiteral( "gpsbabelPath" ), QgsSettings::Gps, QStringLiteral( "gpsbabel" ) );
180 #endif
181 
182 };
183 
184 #endif // QGSSETTINGSREGISTRYCORE_H
static const double DEFAULT_Z_COORDINATE
Default Z coordinate value.
Definition: qgis.h:1366
static const double DEFAULT_SNAP_TOLERANCE
Default snapping distance tolerance.
Definition: qgis.h:1386
static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS
Default snapping distance units.
Definition: qgis.h:1392
static const double DEFAULT_M_COORDINATE
Default M coordinate value.
Definition: qgis.h:1373
A boolean settings entry.
A color settings entry.
A double settings entry.
An integer settings entry.
A string settings entry.
QgsSettingsRegistryCore is used for settings introspection and collects all QgsSettingsEntry instance...
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...
@ Gps
GPS section, since QGIS 3.22.
Definition: qgssettings.h:79
@ VertexFlag
On vertices.
@ Pixels
Pixels unit of tolerance.
Definition: qgstolerance.h:46
#define SIP_SKIP
Definition: qgis_sip.h:126