QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgis.h
Go to the documentation of this file.
1/***************************************************************************
2 qgis.h - QGIS namespace
3 -------------------
4 begin : Sat Jun 30 2002
5 copyright : (C) 2002 by Gary E.Sherman
6 email : sherman at mrcc.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#ifndef QGIS_H
19#define QGIS_H
20
21
22#include <QMetaEnum>
23#include <cfloat>
24#include <memory>
25#include <cmath>
26
27#include "qgstolerance.h"
28#include "qgis_core.h"
29#include "qgis_sip.h"
30
31#ifdef SIP_RUN
32% ModuleHeaderCode
33#include <qgis.h>
34% End
35
36% ModuleCode
37int QgisEvent = QEvent::User + 1;
38% End
39#endif
40
41#ifndef SIP_RUN
42// qHash implementation for scoped enum type
43// https://gitlab.com/frostasm/programming-knowledge-base/-/snippets/20120
44#define QHASH_FOR_CLASS_ENUM(T) \
45 inline uint qHash(const T &t, uint seed) { \
46 return ::qHash(static_cast<typename std::underlying_type<T>::type>(t), seed); \
47 }
48#endif
49
54class CORE_EXPORT Qgis
55{
56 Q_GADGET
57 Q_CLASSINFO( "RegisterEnumClassesUnscoped", "false" )
58
59 public:
60
66 static QString version();
67
73 static int versionInt();
74
80 static QString releaseName();
81
83 static const char *QGIS_DEV_VERSION;
84
90 static QString devVersion();
91
92 // Enumerations
93 //
94
100 {
101 Info = 0,
102 Warning = 1,
103 Critical = 2,
104 Success = 3,
105 NoLevel = 4,
106 };
107 Q_ENUM( MessageLevel )
108
109
115 {
116 Vector SIP_MONKEYPATCH_COMPAT_NAME( VectorLayer ),
117 Raster SIP_MONKEYPATCH_COMPAT_NAME( RasterLayer ),
118 Plugin SIP_MONKEYPATCH_COMPAT_NAME( PluginLayer ),
119 Mesh SIP_MONKEYPATCH_COMPAT_NAME( MeshLayer ),
120 VectorTile SIP_MONKEYPATCH_COMPAT_NAME( VectorTileLayer ),
121 Annotation SIP_MONKEYPATCH_COMPAT_NAME( AnnotationLayer ),
122 PointCloud SIP_MONKEYPATCH_COMPAT_NAME( PointCloudLayer ),
123 Group SIP_MONKEYPATCH_COMPAT_NAME( GroupLayer ),
124 };
125 Q_ENUM( LayerType )
126
127
155 {
156 Unknown = 0,
157 Point = 1,
158 LineString = 2,
159 Polygon = 3,
160 Triangle = 17,
161 MultiPoint = 4,
162 MultiLineString = 5,
163 MultiPolygon = 6,
164 GeometryCollection = 7,
165 CircularString = 8,
166 CompoundCurve = 9,
167 CurvePolygon = 10,
168 MultiCurve = 11,
169 MultiSurface = 12,
170 NoGeometry = 100,
171 PointZ = 1001,
172 LineStringZ = 1002,
173 PolygonZ = 1003,
174 TriangleZ = 1017,
175 MultiPointZ = 1004,
176 MultiLineStringZ = 1005,
177 MultiPolygonZ = 1006,
178 GeometryCollectionZ = 1007,
179 CircularStringZ = 1008,
180 CompoundCurveZ = 1009,
181 CurvePolygonZ = 1010,
182 MultiCurveZ = 1011,
183 MultiSurfaceZ = 1012,
184 PointM = 2001,
185 LineStringM = 2002,
186 PolygonM = 2003,
187 TriangleM = 2017,
188 MultiPointM = 2004,
189 MultiLineStringM = 2005,
190 MultiPolygonM = 2006,
191 GeometryCollectionM = 2007,
192 CircularStringM = 2008,
193 CompoundCurveM = 2009,
194 CurvePolygonM = 2010,
195 MultiCurveM = 2011,
196 MultiSurfaceM = 2012,
197 PointZM = 3001,
198 LineStringZM = 3002,
199 PolygonZM = 3003,
200 MultiPointZM = 3004,
201 MultiLineStringZM = 3005,
202 MultiPolygonZM = 3006,
203 GeometryCollectionZM = 3007,
204 CircularStringZM = 3008,
205 CompoundCurveZM = 3009,
206 CurvePolygonZM = 3010,
207 MultiCurveZM = 3011,
208 MultiSurfaceZM = 3012,
209 TriangleZM = 3017,
210 Point25D = 0x80000001,
211 LineString25D,
212 Polygon25D,
213 MultiPoint25D,
214 MultiLineString25D,
215 MultiPolygon25D
216 };
217 Q_ENUM( WkbType )
218
219
228 {
229 Point SIP_MONKEYPATCH_COMPAT_NAME( PointGeometry ),
230 Line SIP_MONKEYPATCH_COMPAT_NAME( LineGeometry ),
231 Polygon SIP_MONKEYPATCH_COMPAT_NAME( PolygonGeometry ),
232 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownGeometry ),
233 Null SIP_MONKEYPATCH_COMPAT_NAME( NullGeometry ),
234 };
235 Q_ENUM( GeometryType )
236
237
242 {
243 UnknownDataType = 0,
244 Byte = 1,
245 Int8 = 14,
246 UInt16 = 2,
247 Int16 = 3,
248 UInt32 = 4,
249 Int32 = 5,
250 Float32 = 6,
251 Float64 = 7,
252 CInt16 = 8,
253 CInt32 = 9,
254 CFloat32 = 10,
255 CFloat64 = 11,
256 ARGB32 = 12,
257 ARGB32_Premultiplied = 13
258 };
259 Q_ENUM( DataType )
260
261
266 enum class CaptureTechnique : int
267 {
268 StraightSegments,
269 CircularString,
270 Streaming,
271 Shape,
272 };
273 Q_ENUM( CaptureTechnique )
274
275
280 enum class VectorLayerTypeFlag : int
281 {
282 SqlQuery = 1 << 0
283 };
284 Q_ENUM( VectorLayerTypeFlag )
286 Q_DECLARE_FLAGS( VectorLayerTypeFlags, VectorLayerTypeFlag )
287 Q_FLAG( VectorLayerTypeFlags )
288
289
294 {
295 Never = 0,
296 Ask = 1,
297 SessionOnly = 2,
298 Always = 3,
299 NotForThisSession,
300 };
301 Q_ENUM( PythonMacroMode )
302
303
309 {
310 Uncounted = -2,
311 UnknownCount = -1,
312 };
313 Q_ENUM( FeatureCountState )
314
315
320 {
321 Marker,
322 Line,
323 Fill,
324 Hybrid
325 };
326 Q_ENUM( SymbolType )
327
328
334 {
335 ScaleArea,
336 ScaleDiameter
337 };
338 Q_ENUM( ScaleMethod )
339
340
345 {
346 Custom,
347 Variant,
348 String,
349 StringList,
350 VariantMap,
351 Bool,
352 Integer,
353 Double,
354 EnumFlag,
355 Color
356 };
357 Q_ENUM( SettingsType )
358
359
364 {
365 Root,
366 Standard,
367 NamedList,
368 };
369 Q_ENUM( SettingsTreeNodeType )
370
371
375 enum class SettingsTreeNodeOption : int
376 {
377 NamedListSelectedItemSetting = 1 << 0,
378 };
379
380 Q_ENUM( SettingsTreeNodeOption )
381 Q_DECLARE_FLAGS( SettingsTreeNodeOptions, SettingsTreeNodeOption )
382 Q_FLAG( SettingsTreeNodeOptions )
383
384
389 enum class SldExportOption : int
390 {
391 NoOptions = 0,
392 Svg = 1 << 0,
393 Png = 1 << 1,
394 };
395 Q_ENUM( SldExportOption )
396 Q_DECLARE_FLAGS( SldExportOptions, SldExportOption )
397 Q_FLAG( SldExportOptions )
398
399
405 {
406 NoVendorExtension = 0,
407 GeoServerVendorExtension = 1 << 1,
408 DeegreeVendorExtension = 1 << 2,
409 };
410 Q_ENUM( SldExportVendorExtension )
411
412
413
417 enum class SettingsOption : int
418 {
419 SaveFormerValue = 1 << 1, //<! Save the former value of the settings
420 SaveEnumFlagAsInt = 1 << 2,
421 };
422 Q_ENUM( SettingsOption )
423 Q_DECLARE_FLAGS( SettingsOptions, SettingsOption )
424 Q_FLAG( SettingsOptions )
425
426
431 {
432 ActiveLayer = 1,
433 AllLayers = 2,
434 AdvancedConfiguration = 3,
435 };
436 Q_ENUM( SnappingMode )
437
438
443 {
444 NoSnap SIP_MONKEYPATCH_COMPAT_NAME( NoSnapFlag ) = 0,
445 Vertex SIP_MONKEYPATCH_COMPAT_NAME( VertexFlag ) = 1 << 0,
446 Segment SIP_MONKEYPATCH_COMPAT_NAME( SegmentFlag ) = 1 << 1,
447 Area SIP_MONKEYPATCH_COMPAT_NAME( AreaFlag ) = 1 << 2,
448 Centroid SIP_MONKEYPATCH_COMPAT_NAME( CentroidFlag ) = 1 << 3,
449 MiddleOfSegment SIP_MONKEYPATCH_COMPAT_NAME( MiddleOfSegmentFlag ) = 1 << 4,
450 LineEndpoint SIP_MONKEYPATCH_COMPAT_NAME( LineEndpointFlag ) = 1 << 5,
451 };
452 Q_ENUM( SnappingType )
454 Q_DECLARE_FLAGS( SnappingTypes, SnappingType ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSnappingConfig, SnappingTypeFlag )
455 Q_FLAG( SnappingTypes )
456
463 {
464 DynamicRotation = 2,
465 };
466 Q_ENUM( SymbolRenderHint )
468 Q_DECLARE_FLAGS( SymbolRenderHints, SymbolRenderHint ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSymbol, RenderHints )
469 Q_FLAG( SymbolRenderHints )
470
476 enum class SymbolFlag : int
477 {
478 RendererShouldUseSymbolLevels = 1 << 0,
479 };
480 Q_ENUM( SymbolFlag )
482 Q_DECLARE_FLAGS( SymbolFlags, SymbolFlag )
483 Q_FLAG( SymbolFlags )
484
485
491 {
492 FlagIncludeCrosshairsForMarkerSymbols = 1 << 0,
493 };
494 Q_ENUM( SymbolPreviewFlag )
496 Q_DECLARE_FLAGS( SymbolPreviewFlags, SymbolPreviewFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSymbol, SymbolPreviewFlags )
497 Q_FLAG( SymbolPreviewFlags )
498
504 enum class SymbolLayerFlag : int
505 {
506 DisableFeatureClipping = 1 << 0,
507 };
508 Q_ENUM( SymbolLayerFlag )
510 Q_DECLARE_FLAGS( SymbolLayerFlags, SymbolLayerFlag )
511 Q_FLAG( SymbolLayerFlags )
512
513
519 {
520 Collection,
521 Directory,
522 Layer,
523 Error,
524 Favorites,
525 Project,
526 Custom,
527 Fields,
528 Field,
529 };
530 Q_ENUM( BrowserItemType )
531
532
538 {
539 NotPopulated,
540 Populating,
541 Populated,
542 };
543 Q_ENUM( BrowserItemState )
544
545
551 {
552 NoCapabilities = 0,
553 SetCrs = 1 << 0,
554 Fertile = 1 << 1,
555 Fast = 1 << 2,
556 Collapse = 1 << 3,
557 Rename = 1 << 4,
558 Delete = 1 << 5,
559 ItemRepresentsFile = 1 << 6,
560 RefreshChildrenWhenItemIsRefreshed = 1 << 7,
561 };
562 Q_ENUM( BrowserItemCapability )
564 Q_DECLARE_FLAGS( BrowserItemCapabilities, BrowserItemCapability ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsDataItem, Capabilities )
565 Q_FLAG( BrowserItemCapabilities )
566
573 {
574 NoType,
575 Vector,
576 Raster,
577 Point,
578 Line,
579 Polygon,
580 TableLayer,
581 Database,
582 Table,
583 Plugin,
584 Mesh,
585 VectorTile,
586 PointCloud
587 };
588 Q_ENUM( BrowserLayerType )
589
590
596 {
597 Default,
598 NeverMonitor,
599 AlwaysMonitor,
600 };
601 Q_ENUM( BrowserDirectoryMonitoring )
602
603
607 enum class HttpMethod : int
608 {
609 Get = 0,
610 Post = 1
611 };
612 Q_ENUM( HttpMethod )
613
614
620 {
621 Success SIP_MONKEYPATCH_COMPAT_NAME( NoError ) = 0,
622 ErrorCreatingDataSource SIP_MONKEYPATCH_COMPAT_NAME( ErrCreateDataSource ),
623 ErrorCreatingLayer SIP_MONKEYPATCH_COMPAT_NAME( ErrCreateLayer ),
624 ErrorAttributeTypeUnsupported SIP_MONKEYPATCH_COMPAT_NAME( ErrAttributeTypeUnsupported ),
625 ErrorAttributeCreationFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrAttributeCreationFailed ),
626 ErrorProjectingFeatures SIP_MONKEYPATCH_COMPAT_NAME( ErrProjection ),
627 ErrorFeatureWriteFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrFeatureWriteFailed ),
628 ErrorInvalidLayer SIP_MONKEYPATCH_COMPAT_NAME( ErrInvalidLayer ),
629 ErrorInvalidProvider SIP_MONKEYPATCH_COMPAT_NAME( ErrInvalidProvider ),
630 ErrorProviderUnsupportedFeature SIP_MONKEYPATCH_COMPAT_NAME( ErrProviderUnsupportedFeature ),
631 ErrorConnectionFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrConnectionFailed ),
632 UserCanceled SIP_MONKEYPATCH_COMPAT_NAME( ErrUserCanceled ),
633 };
634 Q_ENUM( VectorExportResult )
635
636
641 {
642 SubsetStringFilter = 1 << 1,
643 GeometryColumn = 1 << 2,
644 PrimaryKeys = 1 << 3,
645 UnstableFeatureIds = 1 << 4
646 };
647 Q_ENUM( SqlLayerDefinitionCapability )
649 Q_DECLARE_FLAGS( SqlLayerDefinitionCapabilities, SqlLayerDefinitionCapability )
650 Q_FLAG( SqlLayerDefinitionCapabilities )
651
652
657 enum class SqlKeywordCategory : int
658 {
659 Keyword,
660 Constant,
661 Function,
662 Geospatial,
663 Operator,
664 Math,
665 Aggregate,
666 String,
667 Identifier
668 };
669 Q_ENUM( SqlKeywordCategory )
670
671
675 enum class DriveType : int
676 {
677 Unknown,
678 Invalid,
679 Removable,
680 Fixed,
681 Remote,
682 CdRom,
683 RamDisk,
684 };
685 Q_ENUM( DriveType )
686
687
692 {
693 Deferred SIP_MONKEYPATCH_COMPAT_NAME( DownloadLater ),
694 Immediate SIP_MONKEYPATCH_COMPAT_NAME( DownloadImmediately ),
695 };
696 Q_ENUM( ActionStart )
697
698
703 enum class UnplacedLabelVisibility : int
704 {
705 FollowEngineSetting,
706 NeverShow,
707 };
708 Q_ENUM( UnplacedLabelVisibility )
709
710
715 enum class LabelOverlapHandling : int
716 {
717 PreventOverlap,
718 AllowOverlapIfRequired,
719 AllowOverlapAtNoCost,
720 };
721 Q_ENUM( LabelOverlapHandling )
722
723
731 {
732 AroundPoint,
733 OverPoint,
734 Line,
735 Curved,
736 Horizontal,
737 Free,
738 OrderedPositionsAroundPoint,
739 PerimeterCurved,
740 OutsidePolygons,
741 };
742 Q_ENUM( LabelPlacement )
743
744
745
753 {
754 TopLeft,
755 TopSlightlyLeft,
756 TopMiddle,
757 TopSlightlyRight,
758 TopRight,
759 MiddleLeft,
760 MiddleRight,
761 BottomLeft,
762 BottomSlightlyLeft,
763 BottomMiddle,
764 BottomSlightlyRight,
765 BottomRight,
766 };
767 Q_ENUM( LabelPredefinedPointPosition )
768
769
778 {
779 FromPoint,
780 FromSymbolBounds,
781 };
782 Q_ENUM( LabelOffsetType )
783
784
792 {
793 AboveLeft SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAboveLeft ),
794 Above SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAbove ),
795 AboveRight SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAboveRight ),
796 Left SIP_MONKEYPATCH_COMPAT_NAME( QuadrantLeft ),
797 Over SIP_MONKEYPATCH_COMPAT_NAME( QuadrantOver ),
798 Right SIP_MONKEYPATCH_COMPAT_NAME( QuadrantRight ),
799 BelowLeft SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelowLeft ),
800 Below SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelow ),
801 BelowRight SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelowRight ),
802 };
803 Q_ENUM( LabelQuadrantPosition )
804
805
813 {
814 FlipUpsideDownLabels SIP_MONKEYPATCH_COMPAT_NAME( Upright ),
815 AllowUpsideDownWhenRotationIsDefined SIP_MONKEYPATCH_COMPAT_NAME( ShowDefined ),
816 AlwaysAllowUpsideDown SIP_MONKEYPATCH_COMPAT_NAME( ShowAll )
817 };
818 Q_ENUM( UpsideDownLabelHandling )
819
820
828 {
829 Left SIP_MONKEYPATCH_COMPAT_NAME( MultiLeft ) = 0,
830 Center SIP_MONKEYPATCH_COMPAT_NAME( MultiCenter ),
831 Right SIP_MONKEYPATCH_COMPAT_NAME( MultiRight ),
832 FollowPlacement SIP_MONKEYPATCH_COMPAT_NAME( MultiFollowPlacement ),
833 Justify SIP_MONKEYPATCH_COMPAT_NAME( MultiJustify ),
834 };
835 Q_ENUM( LabelMultiLineAlignment )
836
837
842 enum class SublayerQueryFlag : int
843 {
844 FastScan = 1 << 0,
845 ResolveGeometryType = 1 << 1,
846 CountFeatures = 1 << 2,
847 IncludeSystemTables = 1 << 3,
848 };
850 Q_DECLARE_FLAGS( SublayerQueryFlags, SublayerQueryFlag )
851 Q_ENUM( SublayerQueryFlag )
852 Q_FLAG( SublayerQueryFlags )
853
854
859 enum class SublayerFlag : int
860 {
861 SystemTable = 1 << 0,
862 };
864 Q_DECLARE_FLAGS( SublayerFlags, SublayerFlag )
865 Q_ENUM( SublayerFlag )
866 Q_FLAG( SublayerFlags )
867
868
874 {
875 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownRole ) = 0,
876 Provider SIP_MONKEYPATCH_COMPAT_NAME( ProviderRole ) = 1,
877 Renderer SIP_MONKEYPATCH_COMPAT_NAME( RendererRole ) = 2,
878 Brightness SIP_MONKEYPATCH_COMPAT_NAME( BrightnessRole ) = 3,
879 Resampler SIP_MONKEYPATCH_COMPAT_NAME( ResamplerRole ) = 4,
880 Projector SIP_MONKEYPATCH_COMPAT_NAME( ProjectorRole ) = 5,
881 Nuller SIP_MONKEYPATCH_COMPAT_NAME( NullerRole ) = 6,
882 HueSaturation SIP_MONKEYPATCH_COMPAT_NAME( HueSaturationRole ) = 7,
883 };
884 Q_ENUM( RasterPipeInterfaceRole )
885
886
891 {
893 ResampleFilter,
895 Provider
896 };
897 Q_ENUM( RasterResamplingStage )
898
899
904 enum class RasterRendererFlag : int
905 {
906 InternalLayerOpacityHandling = 1 << 0,
907 };
908
914 Q_DECLARE_FLAGS( RasterRendererFlags, RasterRendererFlag )
915
916 Q_ENUM( RasterRendererFlag )
917 Q_FLAG( RasterRendererFlags )
918
919
925 {
926 Generic = 0,
927 PixelCount = 1,
928 Name = 2,
929 Min = 3,
930 Max = 4,
931 MinMax = 5,
932 Red = 6,
933 Green = 7,
934 Blue = 8,
935 Alpha = 9,
936 RedMin = 10,
937 GreenMin = 11,
938 BlueMin = 12,
939 AlphaMin = 13,
940 RedMax = 14,
941 GreenMax = 15,
942 BlueMax = 16,
943 AlphaMax = 17,
944 MaxCount
945 };
946 Q_ENUM( RasterAttributeTableFieldUsage )
947
948
954 {
955 Thematic = 0,
956 Athematic = 1
957 };
958 Q_ENUM( RasterAttributeTableType )
959
960
965 enum class MeshEditingErrorType : int
966 {
967 NoError,
968 InvalidFace,
969 TooManyVerticesInFace,
970 FlatFace,
971 UniqueSharedVertex,
972 InvalidVertex,
973 ManifoldFace,
974 };
975 Q_ENUM( MeshEditingErrorType )
976
977
982 enum class FilePathType : int
983 {
984 Absolute,
985 Relative,
986 };
987 Q_ENUM( FilePathType )
988
989
994 enum class SublayerPromptMode : int
995 {
996 AlwaysAsk,
997 AskExcludingRasterBands,
998 NeverAskSkip,
999 NeverAskLoadAll,
1000 };
1001 Q_ENUM( SublayerPromptMode )
1002
1003
1009 {
1010 SetSelection,
1011 AddToSelection,
1012 IntersectSelection,
1013 RemoveFromSelection,
1014 };
1015 Q_ENUM( SelectBehavior )
1016
1017
1023 {
1024 Intersect,
1025 Within,
1026 };
1027 Q_ENUM( SelectGeometryRelationship )
1028
1029
1034 enum class SelectionFlag : int
1035 {
1036 SingleFeatureSelection = 1 << 0,
1037 ToggleSelection = 1 << 1,
1038 };
1039
1045 Q_DECLARE_FLAGS( SelectionFlags, SelectionFlag )
1046
1047 Q_ENUM( SelectionFlag )
1048 Q_FLAG( SelectionFlags )
1049
1050
1056 {
1057 Success = 0,
1058 EmptyGeometry = 1,
1059 EditFailed = 2,
1060 FetchFeatureFailed = 3,
1061 InvalidLayer = 4,
1062 };
1063 Q_ENUM( VectorEditResult )
1064
1065
1071 {
1072 SemiTransparentCircle,
1073 Cross,
1074 NoMarker,
1075 };
1076 Q_ENUM( VertexMarkerType )
1077
1078
1082 enum class ContentStatus : int
1083 {
1084 NotStarted,
1085 Running,
1086 Finished,
1087 Failed,
1088 Canceled,
1089 };
1090 Q_ENUM( ContentStatus )
1091
1092
1097 enum class GpsConnectionType : int
1098 {
1099 Automatic,
1100 Internal,
1101 Serial,
1102 Gpsd,
1103 };
1104 Q_ENUM( GpsConnectionType )
1105
1106
1111 enum class GpsConnectionStatus : int
1112 {
1113 Disconnected,
1114 Connecting,
1115 Connected,
1116 };
1117 Q_ENUM( GpsConnectionStatus )
1118
1119
1127 {
1128 NoData,
1129 NoFix,
1130 Fix2D,
1131 Fix3D
1132 };
1134
1135
1142 {
1143 Unknown,
1144 Gps,
1145 Glonass,
1146 Galileo,
1147 BeiDou,
1148 Qzss,
1149 Navic,
1150 Sbas,
1151 };
1153
1160 {
1161 Unknown = -1,
1162 Invalid,
1163 GPS,
1164 DGPS,
1165 PPS,
1166 RTK,
1167 FloatRTK,
1168 Estimated,
1169 Manual,
1170 Simulation,
1171 };
1172 Q_ENUM( GpsQualityIndicator )
1173
1174
1180 {
1181 Location = 1 << 0,
1182 Altitude = 1 << 1,
1183 GroundSpeed = 1 << 2,
1184 Bearing = 1 << 3,
1185 TotalTrackLength = 1 << 4,
1186 TrackDistanceFromStart = 1 << 5,
1187 Pdop = 1 << 6,
1188 Hdop = 1 << 7,
1189 Vdop = 1 << 8,
1190 HorizontalAccuracy = 1 << 9,
1191 VerticalAccuracy = 1 << 10,
1192 HvAccuracy = 1 << 11,
1193 SatellitesUsed = 1 << 12,
1194 Timestamp = 1 << 13,
1195 TrackStartTime = 1 << 14,
1196 TrackEndTime = 1 << 15,
1197 TrackDistanceSinceLastPoint = 1 << 16,
1198 TrackTimeSinceLastPoint = 1 << 17,
1199 GeoidalSeparation = 1 << 18,
1200 EllipsoidAltitude = 1 << 19,
1201 };
1202
1208 Q_DECLARE_FLAGS( GpsInformationComponents, GpsInformationComponent )
1209 Q_ENUM( GpsInformationComponent )
1210 Q_FLAG( GpsInformationComponents )
1211
1212
1217 enum class BabelFormatCapability : int
1218 {
1219 Import = 1 << 0,
1220 Export = 1 << 1,
1221 Waypoints = 1 << 2,
1222 Routes = 1 << 3,
1223 Tracks = 1 << 4,
1224 };
1226 Q_DECLARE_FLAGS( BabelFormatCapabilities, BabelFormatCapability )
1227 Q_ENUM( BabelFormatCapability )
1228 Q_FLAG( BabelFormatCapabilities )
1229
1230
1236 enum class BabelCommandFlag : int
1237 {
1238 QuoteFilePaths = 1 << 0,
1239 };
1241 Q_DECLARE_FLAGS( BabelCommandFlags, BabelCommandFlag )
1242 Q_ENUM( BabelCommandFlag )
1243 Q_FLAG( BabelCommandFlags )
1244
1245
1250 enum class GpsFeatureType : int
1251 {
1252 Waypoint,
1253 Route,
1254 Track,
1255 };
1256 Q_ENUM( GpsFeatureType )
1257
1258
1266 {
1267 Success = 0,
1268 NothingHappened = 1000,
1269 InvalidBaseGeometry,
1270 InvalidInputGeometryType,
1271 SelectionIsEmpty,
1272 SelectionIsGreaterThanOne,
1273 GeometryEngineError,
1274 LayerNotEditable,
1275 // Add part issues
1276 AddPartSelectedGeometryNotFound,
1277 AddPartNotMultiGeometry,
1278 // Add ring issues
1279 AddRingNotClosed,
1280 AddRingNotValid,
1281 AddRingCrossesExistingRings,
1282 AddRingNotInExistingFeature,
1283 // Split features
1284 SplitCannotSplitPoint,
1285 };
1286 Q_ENUM( GeometryOperationResult )
1287
1288
1294 {
1295 AllowSelfTouchingHoles SIP_MONKEYPATCH_COMPAT_NAME( FlagAllowSelfTouchingHoles ) = 1 << 0,
1296 };
1299 Q_ENUM( GeometryValidityFlag )
1300 Q_FLAG( GeometryValidityFlags )
1301
1302
1307 {
1308 QgisInternal SIP_MONKEYPATCH_COMPAT_NAME( ValidatorQgisInternal ),
1309 Geos SIP_MONKEYPATCH_COMPAT_NAME( ValidatorGeos ),
1310 };
1311 Q_ENUM( GeometryValidationEngine )
1312
1313
1319 {
1320 Left SIP_MONKEYPATCH_COMPAT_NAME( SideLeft ) = 0,
1321 Right SIP_MONKEYPATCH_COMPAT_NAME( SideRight ),
1322 };
1323 Q_ENUM( BufferSide )
1324
1325
1331 {
1332 Round SIP_MONKEYPATCH_COMPAT_NAME( CapRound ) = 1,
1333 Flat SIP_MONKEYPATCH_COMPAT_NAME( CapFlat ),
1334 Square SIP_MONKEYPATCH_COMPAT_NAME( CapSquare ),
1335 };
1336 Q_ENUM( EndCapStyle )
1337
1338
1344 {
1345 Round SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleRound ) = 1,
1346 Miter SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleMiter ),
1347 Bevel SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleBevel ),
1348 };
1349 Q_ENUM( JoinStyle )
1350
1351
1356 enum class MakeValidMethod : int
1357 {
1358 Linework = 0,
1359 Structure = 1,
1360 };
1361 Q_ENUM( MakeValidMethod )
1362
1363
1368 enum class SpatialFilterType : int
1369 {
1370 NoFilter,
1371 BoundingBox,
1372 DistanceWithin,
1373 };
1374 Q_ENUM( SpatialFilterType )
1375
1376
1381 enum class FileOperationFlag : int
1382 {
1383 IncludeMetadataFile = 1 << 0,
1384 IncludeStyleFile = 1 << 1,
1385 };
1387 Q_DECLARE_FLAGS( FileOperationFlags, FileOperationFlag )
1388 Q_ENUM( FileOperationFlag )
1389 Q_FLAG( FileOperationFlags )
1390
1391
1396 enum class MapLayerProperty : int
1397 {
1398 UsersCannotToggleEditing = 1 << 0,
1399 IsBasemapLayer = 1 << 1,
1400 };
1402 Q_DECLARE_FLAGS( MapLayerProperties, MapLayerProperty )
1403 Q_ENUM( MapLayerProperty )
1404 Q_FLAG( MapLayerProperties )
1405
1406
1411 enum class DataProviderFlag : int
1412 {
1413 IsBasemapSource = 1 << 1,
1414 };
1416 Q_DECLARE_FLAGS( DataProviderFlags, DataProviderFlag )
1417 Q_ENUM( DataProviderFlag )
1418 Q_FLAG( DataProviderFlags )
1419
1420
1427 enum class CrsAxisDirection : int
1428 {
1429 North,
1430 NorthNorthEast,
1431 NorthEast,
1432 EastNorthEast,
1433 East,
1434 EastSouthEast,
1435 SouthEast,
1436 SouthSouthEast,
1437 South,
1438 SouthSouthWest,
1439 SouthWest,
1440 WestSouthWest,
1441 West,
1442 WestNorthWest,
1443 NorthWest,
1444 NorthNorthWest,
1445 GeocentricX,
1446 GeocentricY,
1447 GeocentricZ,
1448 Up,
1449 Down,
1450 Forward,
1451 Aft,
1452 Port,
1453 Starboard,
1454 Clockwise,
1455 CounterClockwise,
1456 ColumnPositive,
1457 ColumnNegative,
1458 RowPositive,
1459 RowNegative,
1460 DisplayRight,
1461 DisplayLeft,
1462 DisplayUp,
1463 DisplayDown,
1464 Future,
1465 Past,
1466 Towards,
1467 AwayFrom,
1468 Unspecified,
1469 };
1470 Q_ENUM( CrsAxisDirection )
1471
1472
1477 enum class CoordinateOrder : int
1478 {
1479 Default,
1480 XY,
1481 YX,
1482 };
1483 Q_ENUM( CoordinateOrder )
1484
1485
1490 enum class AnnotationItemFlag : int
1491 {
1492 ScaleDependentBoundingBox = 1 << 0,
1493 };
1495 Q_DECLARE_FLAGS( AnnotationItemFlags, AnnotationItemFlag )
1496 Q_ENUM( AnnotationItemFlag )
1497 Q_FLAG( AnnotationItemFlags )
1498
1499
1504 enum class AnnotationItemGuiFlag : int
1505 {
1506 FlagNoCreationTools = 1 << 0,
1507 };
1509 Q_DECLARE_FLAGS( AnnotationItemGuiFlags, AnnotationItemGuiFlag )
1510 Q_ENUM( AnnotationItemGuiFlag )
1511 Q_FLAG( AnnotationItemGuiFlags )
1512
1513
1518 enum class AnnotationItemNodeType : int
1519 {
1520 VertexHandle,
1521 };
1522 Q_ENUM( AnnotationItemNodeType )
1523
1524
1530 {
1531 Success,
1532 Invalid,
1533 ItemCleared,
1534 };
1535 Q_ENUM( AnnotationItemEditOperationResult )
1536
1537
1543 {
1544 FixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ModeFixedTemporalRange ) = 0,
1545 FeatureDateTimeInstantFromField SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeInstantFromField ),
1546 FeatureDateTimeStartAndEndFromFields SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndEndFromFields ),
1547 FeatureDateTimeStartAndDurationFromFields SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndDurationFromFields ),
1548 FeatureDateTimeStartAndEndFromExpressions SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndEndFromExpressions ),
1549 RedrawLayerOnly SIP_MONKEYPATCH_COMPAT_NAME( ModeRedrawLayerOnly ),
1550 };
1551 Q_ENUM( VectorTemporalMode )
1552
1553
1559 {
1560 IncludeBeginExcludeEnd = 0,
1561 IncludeBeginIncludeEnd,
1562 };
1563 Q_ENUM( VectorTemporalLimitMode )
1564
1565
1571 {
1572 HasFixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ProviderHasFixedTemporalRange ) = 0,
1573 StoresFeatureDateTimeInstantInField SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeInstantInField ),
1574 StoresFeatureDateTimeStartAndEndInSeparateFields SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeStartAndEndInSeparateFields ),
1575 };
1576 Q_ENUM( VectorDataProviderTemporalMode )
1577
1578
1584 {
1585 FixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ModeFixedTemporalRange ) = 0,
1586 TemporalRangeFromDataProvider SIP_MONKEYPATCH_COMPAT_NAME( ModeTemporalRangeFromDataProvider ) = 1,
1587 RedrawLayerOnly SIP_MONKEYPATCH_COMPAT_NAME( ModeRedrawLayerOnly ) = 2,
1588 };
1589 Q_ENUM( RasterTemporalMode )
1590
1591
1597 {
1598 MatchUsingWholeRange,
1599 MatchExactUsingStartOfRange,
1600 MatchExactUsingEndOfRange,
1601 FindClosestMatchToStartOfRange,
1602 FindClosestMatchToEndOfRange
1603 };
1604 Q_ENUM( TemporalIntervalMatchMethod )
1605
1606
1612 {
1613 RequestedTimesMustExactlyMatchAllAvailableTemporalRanges = 1 << 0,
1614 };
1615 Q_ENUM( RasterTemporalCapabilityFlag )
1616
1617
1622 Q_DECLARE_FLAGS( RasterTemporalCapabilityFlags, RasterTemporalCapabilityFlag )
1623 Q_ENUM( RasterTemporalCapabilityFlags )
1624
1625
1631 {
1632 Forward SIP_MONKEYPATCH_COMPAT_NAME( ForwardTransform ),
1633 Reverse SIP_MONKEYPATCH_COMPAT_NAME( ReverseTransform )
1634 };
1635 Q_ENUM( TransformDirection )
1636
1637
1643 {
1644 BallparkTransformsAreAppropriate = 1 << 0,
1645 IgnoreImpossibleTransformations = 1 << 1,
1646 };
1647 Q_ENUM( CoordinateTransformationFlag )
1648
1649
1654 Q_DECLARE_FLAGS( CoordinateTransformationFlags, CoordinateTransformationFlag )
1655 Q_ENUM( CoordinateTransformationFlags )
1656
1657
1663 {
1664 Antialiasing = 0x01,
1665 DrawEditingInfo = 0x02,
1666 ForceVectorOutput = 0x04,
1667 UseAdvancedEffects = 0x08,
1668 DrawLabeling = 0x10,
1669 UseRenderingOptimization = 0x20,
1670 DrawSelection = 0x40,
1671 DrawSymbolBounds = 0x80,
1672 RenderMapTile = 0x100,
1673 RenderPartialOutput = 0x200,
1674 RenderPreviewJob = 0x400,
1675 RenderBlocking = 0x800,
1676 LosslessImageRendering = 0x1000,
1677 Render3DMap = 0x2000,
1678 HighQualityImageTransforms = 0x4000,
1679 SkipSymbolRendering = 0x8000,
1680 ForceRasterMasks = 0x10000,
1681 };
1684 Q_ENUM( MapSettingsFlag )
1685 Q_FLAG( MapSettingsFlags )
1686
1687
1693 {
1694 DrawEditingInfo = 0x01,
1695 ForceVectorOutput = 0x02,
1696 UseAdvancedEffects = 0x04,
1697 UseRenderingOptimization = 0x08,
1698 DrawSelection = 0x10,
1699 DrawSymbolBounds = 0x20,
1700 RenderMapTile = 0x40,
1701 Antialiasing = 0x80,
1702 RenderPartialOutput = 0x100,
1703 RenderPreviewJob = 0x200,
1704 RenderBlocking = 0x400,
1705 RenderSymbolPreview = 0x800,
1706 LosslessImageRendering = 0x1000,
1707 ApplyScalingWorkaroundForTextRendering = 0x2000,
1708 Render3DMap = 0x4000,
1709 ApplyClipAfterReprojection = 0x8000,
1710 RenderingSubSymbol = 0x10000,
1711 HighQualityImageTransforms = 0x20000,
1712 SkipSymbolRendering = 0x40000,
1713 };
1716 Q_ENUM( RenderContextFlag )
1717 Q_FLAG( RenderContextFlags )
1718
1719 // refs for below dox: https://github.com/qgis/QGIS/pull/1286#issuecomment-39806854
1720 // https://github.com/qgis/QGIS/pull/8573#issuecomment-445585826
1721
1722
1727 {
1728 AlwaysOutlines SIP_MONKEYPATCH_COMPAT_NAME( TextFormatAlwaysOutlines ),
1729 AlwaysText SIP_MONKEYPATCH_COMPAT_NAME( TextFormatAlwaysText ),
1730 };
1731 Q_ENUM( TextRenderFormat )
1732
1733
1741 {
1742 UseAllLabels = 1 << 1,
1743 UsePartialCandidates = 1 << 2,
1744 // TODO QGIS 4.0: remove
1745 RenderOutlineLabels = 1 << 3,
1746 DrawLabelRectOnly = 1 << 4,
1747 DrawCandidates = 1 << 5,
1748 DrawUnplacedLabels = 1 << 6,
1749 CollectUnplacedLabels = 1 << 7,
1750 DrawLabelMetrics = 1 << 8,
1751 };
1752 Q_ENUM( LabelingFlag )
1753
1754
1761 Q_DECLARE_FLAGS( LabelingFlags, LabelingFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsLabelingEngineSettings, Flags )
1762 Q_FLAG( LabelingFlags )
1763
1772 {
1773 Version1 SIP_MONKEYPATCH_COMPAT_NAME( PlacementEngineVersion1 ),
1774 Version2 SIP_MONKEYPATCH_COMPAT_NAME( PlacementEngineVersion2 ),
1775 };
1776 Q_ENUM( LabelPlacementEngineVersion )
1777
1778
1786 {
1787 Horizontal SIP_MONKEYPATCH_COMPAT_NAME( HorizontalOrientation ),
1788 Vertical SIP_MONKEYPATCH_COMPAT_NAME( VerticalOrientation ),
1789 RotationBased SIP_MONKEYPATCH_COMPAT_NAME( RotationBasedOrientation ),
1790 };
1791 Q_ENUM( TextOrientation )
1792
1793
1801 {
1802 Rectangle SIP_MONKEYPATCH_COMPAT_NAME( Rect ),
1803 Point,
1804 Labeling SIP_MONKEYPATCH_COMPAT_NAME( Label ),
1805 RectangleCapHeightBased,
1806 RectangleAscentBased,
1807 };
1808 Q_ENUM( TextLayoutMode )
1809
1810
1818 {
1819 Text,
1820 Buffer,
1821 Background,
1822 Shadow,
1823 };
1824 Q_ENUM( TextComponent )
1825
1826
1834 {
1835 Left SIP_MONKEYPATCH_COMPAT_NAME( AlignLeft ),
1836 Center SIP_MONKEYPATCH_COMPAT_NAME( AlignCenter ),
1837 Right SIP_MONKEYPATCH_COMPAT_NAME( AlignRight ),
1838 Justify SIP_MONKEYPATCH_COMPAT_NAME( AlignJustify ),
1839 };
1840 Q_ENUM( TextHorizontalAlignment )
1841
1842
1853 {
1854 Top SIP_MONKEYPATCH_COMPAT_NAME( AlignTop ),
1855 VerticalCenter SIP_MONKEYPATCH_COMPAT_NAME( AlignVCenter ),
1856 Bottom SIP_MONKEYPATCH_COMPAT_NAME( AlignBottom ),
1857 };
1858 Q_ENUM( TextVerticalAlignment )
1859
1860
1869 {
1870 Normal,
1871 SuperScript,
1872 SubScript,
1873 };
1874 Q_ENUM( TextCharacterVerticalAlignment )
1875
1876
1882 {
1883 Generic,
1884 ShadowOffset,
1885 BlurSize,
1886 GlowSpread,
1887 };
1888 Q_ENUM( RenderSubcomponentProperty )
1889
1890
1895 {
1896 Segment SIP_MONKEYPATCH_COMPAT_NAME( SegmentVertex ) = 1,
1897 Curve SIP_MONKEYPATCH_COMPAT_NAME( CurveVertex ) = 2,
1898 };
1899 Q_ENUM( VertexType )
1900
1901
1909 {
1910 Square,
1911 Diamond,
1912 Pentagon,
1913 Hexagon,
1914 Triangle,
1915 EquilateralTriangle,
1916 Star,
1917 Arrow,
1918 Circle,
1919 Cross,
1920 CrossFill,
1921 Cross2,
1922 Line,
1923 ArrowHead,
1924 ArrowHeadFilled,
1925 SemiCircle,
1926 ThirdCircle,
1927 QuarterCircle,
1928 QuarterSquare,
1929 HalfSquare,
1930 DiagonalHalfSquare,
1931 RightHalfTriangle,
1932 LeftHalfTriangle,
1933 Octagon,
1934 SquareWithCorners,
1935 AsteriskFill,
1936 HalfArc,
1937 ThirdArc,
1938 QuarterArc,
1939 ParallelogramRight,
1940 ParallelogramLeft,
1941 Trapezoid,
1942 Shield,
1943 DiamondStar,
1944 Heart,
1945 Decagon,
1946 RoundedSquare,
1947 };
1948 Q_ENUM( MarkerShape )
1949
1950
1958 {
1959 Interval = 1 << 0,
1960 Vertex = 1 << 1,
1961 LastVertex = 1 << 2,
1962 FirstVertex = 1 << 3,
1963 CentralPoint = 1 << 4,
1964 CurvePoint = 1 << 5,
1965 SegmentCenter = 1 << 6,
1966 InnerVertices = 1 << 7,
1967 };
1968 Q_ENUM( MarkerLinePlacement )
1969 Q_DECLARE_FLAGS( MarkerLinePlacements, MarkerLinePlacement )
1970 Q_FLAG( MarkerLinePlacements )
1971
1972
1980 {
1981 SimpleTwoColor,
1982 ColorRamp,
1983 };
1984 Q_ENUM( GradientColorSource )
1985
1986
1994 {
1995 Linear,
1996 Radial,
1997 Conical,
1998 };
1999 Q_ENUM( GradientType )
2000
2001
2009 {
2010 Feature,
2011 Viewport,
2012 };
2013 Q_ENUM( SymbolCoordinateReference )
2014
2015
2024 {
2025 Pad,
2026 Reflect,
2027 Repeat,
2028 };
2029 Q_ENUM( GradientSpread )
2030
2031
2039 {
2040 Absolute SIP_MONKEYPATCH_COMPAT_NAME( AbsoluteCount ),
2041 DensityBased SIP_MONKEYPATCH_COMPAT_NAME( DensityBasedCount ),
2042 };
2043 Q_ENUM( PointCountMethod )
2044
2045
2050 enum class MarkerClipMode : int
2051 {
2052 NoClipping,
2053 Shape,
2054 CentroidWithin,
2055 CompletelyWithin,
2056 };
2057 Q_ENUM( MarkerClipMode )
2058
2059
2064 enum class LineClipMode : int
2065 {
2066 ClipPainterOnly,
2067 ClipToIntersection,
2068 NoClipping,
2069 };
2070 Q_ENUM( LineClipMode )
2071
2072
2078 {
2079 NoRule,
2080 FullDash,
2081 HalfDash,
2082 FullGap,
2083 HalfGap,
2084 };
2085 Q_ENUM( DashPatternLineEndingRule )
2086
2087
2093 {
2094 ScaleBothDashAndGap,
2095 ScaleDashOnly,
2096 ScaleGapOnly,
2097 };
2098 Q_ENUM( DashPatternSizeAdjustment )
2099
2100
2108 {
2109 Color SIP_MONKEYPATCH_COMPAT_NAME( GraduatedColor ),
2110 Size SIP_MONKEYPATCH_COMPAT_NAME( GraduatedSize ),
2111 };
2112 Q_ENUM( GraduatedMethod )
2113
2114
2118 enum class DpiMode
2119 {
2120 All = 7,
2121 Off = 0,
2122 QGIS = 1,
2123 UMN = 2,
2124 GeoServer = 4,
2125 };
2126 Q_ENUM( DpiMode )
2127
2128
2133 {
2134 Undefined = 0,
2135 StandardDpi = 1,
2136 HighDpi = 2,
2137 };
2138 Q_ENUM( TilePixelRatio )
2139
2140 // NOTE -- the hardcoded numbers here must match QFont::Capitalization!
2141
2142
2150 {
2151 MixedCase = 0,
2152 AllUppercase = 1,
2153 AllLowercase = 2,
2154 ForceFirstLetterToCapital = 4,
2155 SmallCaps = 5,
2156 TitleCase = 1004,
2157 UpperCamelCase = 1005,
2158 AllSmallCaps = 1006,
2159 };
2160 Q_ENUM( Capitalization )
2161
2162
2167 enum class TextRendererFlag : int
2168 {
2169 WrapLines = 1 << 0,
2170 };
2171 Q_ENUM( TextRendererFlag )
2172 Q_DECLARE_FLAGS( TextRendererFlags, TextRendererFlag )
2173 Q_FLAG( TextRendererFlags )
2174
2175
2181 {
2182 MapBox,
2183 Esri,
2184 };
2186
2193 {
2194 Clockwise,
2195 CounterClockwise,
2196 };
2197 Q_ENUM( AngularDirection )
2198
2199
2204 enum class RendererUsage : int
2205 {
2206 View,
2207 Export,
2208 Unknown,
2209 };
2210 Q_ENUM( RendererUsage )
2211
2212
2217 enum class ViewSyncModeFlag : int
2218 {
2219 Sync3DTo2D = 1 << 0,
2220 Sync2DTo3D = 1 << 1,
2221 };
2222 Q_ENUM( ViewSyncModeFlag )
2223 Q_DECLARE_FLAGS( ViewSyncModeFlags, ViewSyncModeFlag )
2224
2225
2231 {
2232 Always,
2233 WhenOutsideVisibleExtent,
2234 Never,
2235 };
2236 Q_ENUM( MapRecenteringMode )
2237
2238
2243 enum class HistoryProviderBackend : int
2244 {
2245 LocalProfile = 1 << 0,
2246// Project = 1 << 1, //!< QGIS Project (not yet implemented)
2247 };
2248 Q_ENUM( HistoryProviderBackend )
2249 Q_DECLARE_FLAGS( HistoryProviderBackends, HistoryProviderBackend )
2250 Q_FLAG( HistoryProviderBackends )
2251
2252
2258 {
2259 Wkt SIP_MONKEYPATCH_COMPAT_NAME( FormatWkt ),
2260 Proj SIP_MONKEYPATCH_COMPAT_NAME( FormatProj ),
2261 };
2262 Q_ENUM( CrsDefinitionFormat )
2263
2264
2272 enum class FieldDomainSplitPolicy : int
2273 {
2274 DefaultValue,
2275 Duplicate,
2276 GeometryRatio,
2277 UnsetField,
2278 };
2279 Q_ENUM( FieldDomainSplitPolicy )
2280
2281
2289 enum class FieldDomainMergePolicy : int
2290 {
2291 DefaultValue,
2292 Sum,
2293 GeometryWeighted,
2294 };
2295 Q_ENUM( FieldDomainMergePolicy )
2296
2297
2302 enum class FieldDomainType : int
2303 {
2304 Coded,
2305 Range,
2306 Glob,
2307 };
2308 Q_ENUM( FieldDomainType )
2309
2310
2315 enum class TransactionMode : int
2316 {
2317 Disabled = 0,
2318 AutomaticGroups = 1,
2319 BufferedGroups = 2,
2320 };
2321 Q_ENUM( TransactionMode )
2322
2323
2328 enum class AltitudeClamping : int
2329 {
2330 Absolute,
2331 Relative,
2332 Terrain,
2333 };
2334 Q_ENUM( AltitudeClamping )
2335
2336
2341 enum class AltitudeBinding : int
2342 {
2343 Vertex,
2344 Centroid,
2345 };
2346 Q_ENUM( AltitudeBinding )
2347
2348
2354 {
2355 NoConstraint,
2356 Perpendicular,
2357 Parallel
2358 };
2359 Q_ENUM( BetweenLineConstraint )
2360
2361
2366 enum class LineExtensionSide : int
2367 {
2368 BeforeVertex,
2369 AfterVertex,
2370 NoVertex,
2371 };
2372 Q_ENUM( LineExtensionSide )
2373
2374
2379 enum class ProjectFlag : int
2380 {
2381 EvaluateDefaultValuesOnProviderSide = 1 << 0,
2382 TrustStoredLayerStatistics = 1 << 1,
2383 RememberLayerEditStatusBetweenSessions = 1 << 2,
2384 RememberAttributeTableWindowsBetweenSessions = 1 << 3,
2385 };
2386 Q_ENUM( ProjectFlag )
2387 Q_DECLARE_FLAGS( ProjectFlags, ProjectFlag )
2388 Q_FLAG( ProjectFlags )
2389
2390
2395 enum class PlotToolFlag : int
2396 {
2397 ShowContextMenu = 1 << 0,
2398 };
2399 Q_ENUM( PlotToolFlag )
2400 Q_DECLARE_FLAGS( PlotToolFlags, PlotToolFlag )
2401 Q_FLAG( PlotToolFlags )
2402
2403
2408 enum class LightSourceType : int
2409 {
2410 Point,
2411 Directional,
2412 };
2413 Q_ENUM( LightSourceType )
2414
2415
2420 enum class NavigationMode : int
2421 {
2422 TerrainBased,
2423 Walk
2424 };
2425 Q_ENUM( NavigationMode )
2426
2427
2432 enum class VerticalAxisInversion : int
2433 {
2434 Never,
2435 WhenDragging,
2436 Always,
2437 };
2438 Q_ENUM( VerticalAxisInversion )
2439
2440
2446 {
2447 Line,
2448 FillBelow,
2449 };
2451
2457 enum class VectorProfileType : int
2458 {
2459 IndividualFeatures,
2460 ContinuousSurface,
2461 };
2463
2469 enum class ProfileGeneratorFlag : int
2470 {
2471 RespectsMaximumErrorMapUnit = 1 << 0,
2472 RespectsDistanceRange = 1 << 1,
2473 RespectsElevationRange = 1 << 2,
2474 };
2475 Q_ENUM( ProfileGeneratorFlag )
2476 Q_DECLARE_FLAGS( ProfileGeneratorFlags, ProfileGeneratorFlag )
2477 Q_FLAG( ProfileGeneratorFlags )
2478
2479
2485 {
2486 Square,
2487 Circle,
2488 };
2489 Q_ENUM( PointCloudSymbol )
2490
2491
2497 {
2498 Default,
2499 BottomToTop,
2500 TopToBottom,
2501 };
2502 Q_ENUM( PointCloudDrawOrder )
2503
2504
2512 {
2513 AllowIntersections,
2514 AvoidIntersectionsCurrentLayer,
2515 AvoidIntersectionsLayers,
2516 };
2517 Q_ENUM( AvoidIntersectionsMode )
2518
2519
2527 {
2528 Qgz,
2529 Qgs,
2530 };
2531 Q_ENUM( ProjectFileFormat )
2532
2533
2541 {
2542 DontResolveLayers SIP_MONKEYPATCH_COMPAT_NAME( FlagDontResolveLayers ) = 1 << 0,
2543 DontLoadLayouts SIP_MONKEYPATCH_COMPAT_NAME( FlagDontLoadLayouts ) = 1 << 1,
2544 TrustLayerMetadata SIP_MONKEYPATCH_COMPAT_NAME( FlagTrustLayerMetadata ) = 1 << 2,
2545 DontStoreOriginalStyles SIP_MONKEYPATCH_COMPAT_NAME( FlagDontStoreOriginalStyles ) = 1 << 3,
2546 DontLoad3DViews SIP_MONKEYPATCH_COMPAT_NAME( FlagDontLoad3DViews ) = 1 << 4,
2547 DontLoadProjectStyles = 1 << 5,
2548 ForceReadOnlyLayers = 1 << 6,
2549 };
2550 Q_ENUM( ProjectReadFlag )
2551
2552
2559 Q_DECLARE_FLAGS( ProjectReadFlags, ProjectReadFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsProject, ReadFlags )
2560 Q_FLAG( ProjectReadFlags )
2561
2570 enum class ProjectCapability : int
2571 {
2572 ProjectStyles = 1 << 0,
2573 };
2574 Q_ENUM( ProjectCapability )
2575
2576
2581 Q_DECLARE_FLAGS( ProjectCapabilities, ProjectCapability )
2582 Q_FLAG( ProjectCapabilities )
2583
2584
2590 {
2591 Vector,
2592 Raster,
2593 RasterDem,
2594 GeoJson,
2595 Image,
2596 Video,
2597 Unknown,
2598 };
2599 Q_ENUM( MapBoxGlStyleSourceType )
2600
2601
2609 {
2610 FeatureServer SIP_MONKEYPATCH_COMPAT_NAME( FeatureService ),
2611 MapServer SIP_MONKEYPATCH_COMPAT_NAME( MapService ),
2612 ImageServer SIP_MONKEYPATCH_COMPAT_NAME( ImageService ),
2613 GlobeServer,
2614 GPServer,
2615 GeocodeServer,
2616 Unknown,
2617 };
2618 Q_ENUM( ArcGisRestServiceType )
2619
2620
2628 {
2629 Normal,
2630 Generated,
2631 };
2632 Q_ENUM( RelationshipType )
2633
2634
2642 {
2643 Association,
2644 Composition,
2645 };
2646 Q_ENUM( RelationshipStrength )
2647
2648
2654 {
2655 OneToOne,
2656 OneToMany,
2657 ManyToOne,
2658 ManyToMany,
2659 };
2660 Q_ENUM( RelationshipCardinality )
2661
2662
2667 enum class RelationshipCapability : int
2668 {
2669 MultipleFieldKeys = 1 << 0,
2670 ForwardPathLabel = 1 << 1,
2671 BackwardPathLabel = 1 << 2,
2672 };
2673 Q_ENUM( RelationshipCapability )
2674
2675
2680 Q_DECLARE_FLAGS( RelationshipCapabilities, RelationshipCapability )
2681 Q_FLAG( RelationshipCapabilities )
2682
2683
2688 enum class CoordinateDisplayType : int
2689 {
2690 MapCrs,
2691 MapGeographic,
2692 CustomCrs,
2693 };
2694 Q_ENUM( CoordinateDisplayType )
2695
2696
2701 enum class SettingsOrigin : int
2702 {
2703 Any,
2704 Global,
2705 Local,
2706 };
2707 Q_ENUM( SettingsOrigin )
2708
2709
2714 enum class ScriptLanguage : int
2715 {
2716 Css,
2717 QgisExpression,
2718 Html,
2719 JavaScript,
2720 Json,
2721 Python,
2722 R,
2723 Sql,
2724 Unknown,
2725 };
2726 Q_ENUM( ScriptLanguage )
2727
2728
2734 {
2735 AboveInsertionPoint,
2736 TopOfTree,
2737 OptimalInInsertionGroup,
2738 };
2739 Q_ENUM( LayerTreeInsertionMethod )
2740
2741
2748 enum class ActionType : int
2749 {
2750 Invalid,
2751 MapLayerAction,
2752 AttributeAction
2753 };
2754 Q_ENUM( ActionType )
2755
2756
2763 enum class MapLayerActionTarget : int
2764 {
2765 Layer = 1 << 0,
2766 SingleFeature = 1 << 1,
2767 MultipleFeatures = 1 << 2,
2768 AllActions = Layer | SingleFeature | MultipleFeatures
2769 };
2770 Q_ENUM( MapLayerActionTarget )
2771
2772
2779 Q_DECLARE_FLAGS( MapLayerActionTargets, MapLayerActionTarget )
2780 Q_FLAG( MapLayerActionTargets )
2781
2782
2789 enum class MapLayerActionFlag : int
2790 {
2791 EnabledOnlyWhenEditable = 1 << 1,
2792 };
2793 Q_ENUM( MapLayerActionFlag )
2794
2795
2802 Q_DECLARE_FLAGS( MapLayerActionFlags, MapLayerActionFlag )
2803 Q_FLAG( MapLayerActionFlags )
2804
2805
2813 {
2814 Generic,
2815 GenericPython,
2816 Mac,
2817 Windows,
2818 Unix,
2819 OpenUrl,
2820 SubmitUrlEncoded,
2821 SubmitUrlMultipart,
2822 };
2823 Q_ENUM( AttributeActionType )
2824
2825
2831 {
2832 Created,
2833 Published,
2834 Revised,
2835 Superseded,
2836 };
2837 Q_ENUM( MetadataDateType )
2838
2839
2849 {
2850 Undefined SIP_MONKEYPATCH_COMPAT_NAME( UndefinedColorInterpretation ) = 0,
2851 GrayIndex = 1,
2852 PaletteIndex = 2,
2853 RedBand = 3,
2854 GreenBand = 4,
2855 BlueBand = 5,
2856 AlphaBand = 6,
2857 HueBand = 7,
2858 SaturationBand = 8,
2859 LightnessBand = 9,
2860 CyanBand = 10,
2861 MagentaBand = 11,
2862 YellowBand = 12,
2863 BlackBand = 13,
2864 YCbCr_YBand = 14,
2865 YCbCr_CbBand = 15,
2866 YCbCr_CrBand = 16,
2867 ContinuousPalette = 17
2868 };
2869 Q_ENUM( RasterColorInterpretation )
2870
2871
2879 {
2880 GrayOrUndefined,
2881 Palette,
2882 MultiBand SIP_MONKEYPATCH_COMPAT_NAME( Multiband ),
2883 SingleBandColorData SIP_MONKEYPATCH_COMPAT_NAME( ColorLayer ),
2884 };
2885 Q_ENUM( RasterLayerType )
2886
2887
2895 {
2896 Undefined SIP_MONKEYPATCH_COMPAT_NAME( UndefinedDrawingStyle ),
2897 SingleBandGray,
2898 SingleBandPseudoColor,
2899 PalettedColor,
2900 PalettedSingleBandGray,
2901 PalettedSingleBandPseudoColor,
2902 PalettedMultiBandColor,
2903 MultiBandSingleBandGray,
2904 MultiBandSingleBandPseudoColor,
2905 MultiBandColor,
2906 SingleBandColorData SIP_MONKEYPATCH_COMPAT_NAME( SingleBandColorDataStyle ),
2907 };
2908 Q_ENUM( RasterDrawingStyle )
2909
2910
2917 enum class RasterPyramidFormat SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsRaster, RasterPyramidsFormat ) : int
2918 {
2919 GeoTiff SIP_MONKEYPATCH_COMPAT_NAME( PyramidsGTiff ) = 0,
2920 Internal SIP_MONKEYPATCH_COMPAT_NAME( PyramidsInternal ) = 1,
2921 Erdas SIP_MONKEYPATCH_COMPAT_NAME( PyramidsErdas ) = 2
2922 };
2923 Q_ENUM( RasterPyramidFormat )
2924
2925
2933 {
2934 No SIP_MONKEYPATCH_COMPAT_NAME( PyramidsFlagNo ) = 0,
2935 Yes SIP_MONKEYPATCH_COMPAT_NAME( PyramidsFlagYes ) = 1,
2936 CopyExisting SIP_MONKEYPATCH_COMPAT_NAME( PyramidsCopyExisting ) = 2
2937 };
2938 Q_ENUM( RasterBuildPyramidOption )
2939
2940
2948 {
2949 Undefined SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatUndefined ) = 0,
2950 Value SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatValue ) = 1,
2951 Text SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatText ) = 1 << 1,
2952 Html SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatHtml ) = 1 << 2,
2953 Feature SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatFeature ) = 1 << 3,
2954 };
2955 Q_ENUM( RasterIdentifyFormat )
2956
2957
2963 {
2964 HighestElevation,
2965 NewerElevation,
2966 };
2967 Q_ENUM( ElevationMapCombineMethod )
2968
2969
2978 {
2979 Normal SIP_MONKEYPATCH_COMPAT_NAME( BlendNormal ),
2980 Lighten SIP_MONKEYPATCH_COMPAT_NAME( BlendLighten ),
2981 Screen SIP_MONKEYPATCH_COMPAT_NAME( BlendScreen ),
2982 Dodge SIP_MONKEYPATCH_COMPAT_NAME( BlendDodge ),
2983 Addition SIP_MONKEYPATCH_COMPAT_NAME( BlendAddition ),
2984 Darken SIP_MONKEYPATCH_COMPAT_NAME( BlendDarken ),
2985 Multiply SIP_MONKEYPATCH_COMPAT_NAME( BlendMultiply ),
2986 Burn SIP_MONKEYPATCH_COMPAT_NAME( BlendBurn ),
2987 Overlay SIP_MONKEYPATCH_COMPAT_NAME( BlendOverlay ),
2988 SoftLight SIP_MONKEYPATCH_COMPAT_NAME( BlendSoftLight ),
2989 HardLight SIP_MONKEYPATCH_COMPAT_NAME( BlendHardLight ),
2990 Difference SIP_MONKEYPATCH_COMPAT_NAME( BlendDifference ),
2991 Subtract SIP_MONKEYPATCH_COMPAT_NAME( BlendSubtract ),
2992 Source SIP_MONKEYPATCH_COMPAT_NAME( BlendSource ),
2993 DestinationOver SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationOver ),
2994 Clear SIP_MONKEYPATCH_COMPAT_NAME( BlendClear ),
2995 Destination SIP_MONKEYPATCH_COMPAT_NAME( BlendDestination ),
2996 SourceIn SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceIn ),
2997 DestinationIn SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationIn ),
2998 SourceOut SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceOut ),
2999 DestinationOut SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationOut ),
3000 SourceAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceAtop ),
3001 DestinationAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationAtop ),
3002 Xor SIP_MONKEYPATCH_COMPAT_NAME( BlendXor ),
3003 };
3004 Q_ENUM( BlendMode )
3005
3006
3014 {
3015 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownSystem ) = 0,
3016 Metric SIP_MONKEYPATCH_COMPAT_NAME( MetricSystem ),
3017 Imperial SIP_MONKEYPATCH_COMPAT_NAME( ImperialSystem ),
3018 USCS SIP_MONKEYPATCH_COMPAT_NAME( USCSSystem ),
3019 };
3020 Q_ENUM( SystemOfMeasurement )
3021
3022
3030 {
3031 Distance SIP_MONKEYPATCH_COMPAT_NAME( TypeDistance ) = 0,
3032 Area SIP_MONKEYPATCH_COMPAT_NAME( TypeArea ),
3033 Volume SIP_MONKEYPATCH_COMPAT_NAME( TypeVolume ),
3034 Unknown SIP_MONKEYPATCH_COMPAT_NAME( TypeUnknown ),
3035 Temporal SIP_MONKEYPATCH_COMPAT_NAME( TypeTemporal ),
3036 };
3037 Q_ENUM( UnitType )
3038
3039
3047 {
3048 Meters SIP_MONKEYPATCH_COMPAT_NAME( DistanceMeters ),
3049 Kilometers SIP_MONKEYPATCH_COMPAT_NAME( DistanceKilometers ),
3050 Feet SIP_MONKEYPATCH_COMPAT_NAME( DistanceFeet ),
3051 NauticalMiles SIP_MONKEYPATCH_COMPAT_NAME( DistanceNauticalMiles ),
3052 Yards SIP_MONKEYPATCH_COMPAT_NAME( DistanceYards ),
3053 Miles SIP_MONKEYPATCH_COMPAT_NAME( DistanceMiles ),
3054 Degrees SIP_MONKEYPATCH_COMPAT_NAME( DistanceDegrees ),
3055 Centimeters SIP_MONKEYPATCH_COMPAT_NAME( DistanceCentimeters ),
3056 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( DistanceMillimeters ),
3057 Unknown SIP_MONKEYPATCH_COMPAT_NAME( DistanceUnknownUnit ),
3058 };
3059 Q_ENUM( DistanceUnit )
3060
3061
3069 {
3070 Standard,
3071 Geographic,
3072 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownType ),
3073 };
3074 Q_ENUM( DistanceUnitType )
3075
3076
3084 {
3085 SquareMeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMeters ),
3086 SquareKilometers SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareKilometers ),
3087 SquareFeet SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareFeet ),
3088 SquareYards SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareYards ),
3089 SquareMiles SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMiles ),
3090 Hectares SIP_MONKEYPATCH_COMPAT_NAME( AreaHectares ),
3091 Acres SIP_MONKEYPATCH_COMPAT_NAME( AreaAcres ),
3092 SquareNauticalMiles SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareNauticalMiles ),
3093 SquareDegrees SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareDegrees ),
3094 SquareCentimeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareCentimeters ),
3095 SquareMillimeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMillimeters ),
3096 Unknown SIP_MONKEYPATCH_COMPAT_NAME( AreaUnknownUnit ),
3097 };
3098 Q_ENUM( AreaUnit )
3099
3100
3108 {
3109 CubicMeters SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicMeters ),
3110 CubicFeet SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicFeet ),
3111 CubicYards SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicYards ),
3112 Barrel SIP_MONKEYPATCH_COMPAT_NAME( VolumeBarrel ),
3113 CubicDecimeter SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicDecimeter ),
3114 Liters SIP_MONKEYPATCH_COMPAT_NAME( VolumeLiters ),
3115 GallonUS SIP_MONKEYPATCH_COMPAT_NAME( VolumeGallonUS ),
3116 CubicInch SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicInch ),
3117 CubicCentimeter SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicCentimeter ),
3118 CubicDegrees SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicDegrees ),
3119 Unknown SIP_MONKEYPATCH_COMPAT_NAME( VolumeUnknownUnit ),
3120 };
3121 Q_ENUM( VolumeUnit )
3122
3123
3131 {
3132 Degrees SIP_MONKEYPATCH_COMPAT_NAME( AngleDegrees ),
3133 Radians SIP_MONKEYPATCH_COMPAT_NAME( AngleRadians ),
3134 Gon SIP_MONKEYPATCH_COMPAT_NAME( AngleGon ),
3135 MinutesOfArc SIP_MONKEYPATCH_COMPAT_NAME( AngleMinutesOfArc ),
3136 SecondsOfArc SIP_MONKEYPATCH_COMPAT_NAME( AngleSecondsOfArc ),
3137 Turn SIP_MONKEYPATCH_COMPAT_NAME( AngleTurn ),
3138 MilliradiansSI SIP_MONKEYPATCH_COMPAT_NAME( AngleMilliradiansSI ),
3139 MilNATO SIP_MONKEYPATCH_COMPAT_NAME( AngleMilNATO ),
3140 Unknown SIP_MONKEYPATCH_COMPAT_NAME( AngleUnknownUnit ),
3141 };
3142 Q_ENUM( AngleUnit )
3143
3144
3152 {
3153 Milliseconds SIP_MONKEYPATCH_COMPAT_NAME( TemporalMilliseconds ),
3154 Seconds SIP_MONKEYPATCH_COMPAT_NAME( TemporalSeconds ),
3155 Minutes SIP_MONKEYPATCH_COMPAT_NAME( TemporalMinutes ),
3156 Hours SIP_MONKEYPATCH_COMPAT_NAME( TemporalHours ),
3157 Days SIP_MONKEYPATCH_COMPAT_NAME( TemporalDays ),
3158 Weeks SIP_MONKEYPATCH_COMPAT_NAME( TemporalWeeks ),
3159 Months SIP_MONKEYPATCH_COMPAT_NAME( TemporalMonths ),
3160 Years SIP_MONKEYPATCH_COMPAT_NAME( TemporalYears ),
3161 Decades SIP_MONKEYPATCH_COMPAT_NAME( TemporalDecades ),
3162 Centuries SIP_MONKEYPATCH_COMPAT_NAME( TemporalCenturies ),
3163 IrregularStep SIP_MONKEYPATCH_COMPAT_NAME( TemporalIrregularStep ),
3164 Unknown SIP_MONKEYPATCH_COMPAT_NAME( TemporalUnknownUnit )
3165 };
3166 Q_ENUM( TemporalUnit )
3167
3168
3176 {
3177 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( RenderMillimeters ),
3178 MapUnits SIP_MONKEYPATCH_COMPAT_NAME( RenderMapUnits ),
3179 Pixels SIP_MONKEYPATCH_COMPAT_NAME( RenderPixels ),
3180 Percentage SIP_MONKEYPATCH_COMPAT_NAME( RenderPercentage ),
3181 Points SIP_MONKEYPATCH_COMPAT_NAME( RenderPoints ),
3182 Inches SIP_MONKEYPATCH_COMPAT_NAME( RenderInches ),
3183 Unknown SIP_MONKEYPATCH_COMPAT_NAME( RenderUnknownUnit ),
3184 MetersInMapUnits SIP_MONKEYPATCH_COMPAT_NAME( RenderMetersInMapUnits ),
3185 };
3186 Q_ENUM( RenderUnit )
3187
3188
3196 {
3197 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( LayoutMillimeters ),
3198 Centimeters SIP_MONKEYPATCH_COMPAT_NAME( LayoutCentimeters ),
3199 Meters SIP_MONKEYPATCH_COMPAT_NAME( LayoutMeters ),
3200 Inches SIP_MONKEYPATCH_COMPAT_NAME( LayoutInches ),
3201 Feet SIP_MONKEYPATCH_COMPAT_NAME( LayoutFeet ),
3202 Points SIP_MONKEYPATCH_COMPAT_NAME( LayoutPoints ),
3203 Picas SIP_MONKEYPATCH_COMPAT_NAME( LayoutPicas ),
3204 Pixels SIP_MONKEYPATCH_COMPAT_NAME( LayoutPixels )
3205 };
3206 Q_ENUM( LayoutUnit )
3207
3208
3216 {
3217 PaperUnits SIP_MONKEYPATCH_COMPAT_NAME( LayoutPaperUnits ),
3218 ScreenUnits SIP_MONKEYPATCH_COMPAT_NAME( LayoutScreenUnits )
3219 };
3220 Q_ENUM( LayoutUnitType )
3221
3222
3226 static const double DEFAULT_SEARCH_RADIUS_MM;
3227
3229 static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
3230
3237 static const QColor DEFAULT_HIGHLIGHT_COLOR;
3238
3243 static const double DEFAULT_HIGHLIGHT_BUFFER_MM;
3244
3249 static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
3250
3257 static const double SCALE_PRECISION;
3258
3264 static const double DEFAULT_Z_COORDINATE;
3265
3271 static const double DEFAULT_M_COORDINATE;
3272
3278 static const double UI_SCALE_FACTOR;
3279
3284 static const double DEFAULT_SNAP_TOLERANCE;
3285
3290 static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS;
3291
3297 static QString defaultProjectScales();
3298
3304 static int geosVersionInt();
3305
3311 static int geosVersionMajor();
3312
3318 static int geosVersionMinor();
3319
3325 static int geosVersionPatch();
3326
3332 static QString geosVersion();
3333};
3334
3337
3338Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolRenderHints )
3339Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolFlags )
3340Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolPreviewFlags )
3341Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolLayerFlags )
3342Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BrowserItemCapabilities )
3343Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SublayerQueryFlags )
3344Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SublayerFlags )
3345Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SqlLayerDefinitionCapabilities )
3346Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BabelFormatCapabilities )
3347Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BabelCommandFlags )
3348Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::GeometryValidityFlags )
3349Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::FileOperationFlags )
3350Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::AnnotationItemFlags )
3351Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::AnnotationItemGuiFlags )
3352Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapSettingsFlags )
3353Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RenderContextFlags )
3354Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorLayerTypeFlags )
3355Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MarkerLinePlacements )
3356Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::TextRendererFlags )
3357Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::HistoryProviderBackends )
3358Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerProperties )
3359Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::DataProviderFlags )
3360Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SnappingTypes )
3361Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::PlotToolFlags )
3362Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProfileGeneratorFlags )
3363Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProjectReadFlags )
3364Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProjectCapabilities )
3365Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::CoordinateTransformationFlags )
3366Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RasterTemporalCapabilityFlags )
3367Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SelectionFlags )
3368Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RasterRendererFlags )
3369Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::LabelingFlags )
3370Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::GpsInformationComponents )
3371Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerActionTargets )
3372Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerActionFlags )
3373Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RelationshipCapabilities )
3374Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SettingsTreeNodeOptions )
3375
3376
3377// hack to workaround warnings when casting void pointers
3378// retrieved from QLibrary::resolve to function pointers.
3379// It's assumed that this works on all systems supporting
3380// QLibrary
3381#define cast_to_fptr(f) f
3382
3383
3392// based on Boojum's code from http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
3393template<class Object> class QgsSignalBlocker SIP_SKIP SIP_SKIP // clazy:exclude=rule-of-three
3394{
3395 public:
3396
3401 explicit QgsSignalBlocker( Object * object )
3402 : mObject( object )
3403 , mPreviousState( object->blockSignals( true ) )
3404 {}
3405
3407 {
3408 mObject->blockSignals( mPreviousState );
3409 }
3410
3412 Object *operator->() { return mObject; }
3413
3414 private:
3415
3416 Object *mObject = nullptr;
3417 bool mPreviousState;
3418
3419};
3420
3434// based on Boojum's code from http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
3435template<class Object> inline QgsSignalBlocker<Object> whileBlocking( Object *object ) SIP_SKIP SIP_SKIP
3436{
3437 return QgsSignalBlocker<Object>( object );
3438}
3439
3441CORE_EXPORT uint qHash( const QVariant &variant );
3442
3448inline QString qgsDoubleToString( double a, int precision = 17 )
3449{
3450 QString str;
3451 if ( precision )
3452 {
3453 if ( precision < 0 )
3454 {
3455 const double roundFactor = std::pow( 10, -precision );
3456 str = QString::number( static_cast< long long >( std::round( a / roundFactor ) * roundFactor ) );
3457 }
3458 else
3459 {
3460 str = QString::number( a, 'f', precision );
3461 if ( str.contains( QLatin1Char( '.' ) ) )
3462 {
3463 // remove ending 0s
3464 int idx = str.length() - 1;
3465 while ( str.at( idx ) == '0' && idx > 1 )
3466 {
3467 idx--;
3468 }
3469 if ( idx < str.length() - 1 )
3470 str.truncate( str.at( idx ) == '.' ? idx : idx + 1 );
3471 }
3472 }
3473 }
3474 else
3475 {
3476 str = QString::number( a, 'f', precision );
3477 }
3478 // avoid printing -0
3479 // see https://bugreports.qt.io/browse/QTBUG-71439
3480 if ( str == QLatin1String( "-0" ) )
3481 {
3482 return QLatin1String( "0" );
3483 }
3484 return str;
3485}
3486
3493inline bool qgsNanCompatibleEquals( double a, double b )
3494{
3495 const bool aIsNan = std::isnan( a );
3496 const bool bIsNan = std::isnan( b );
3497 if ( aIsNan || bIsNan )
3498 return aIsNan && bIsNan;
3499
3500 return a == b;
3501}
3502
3509inline bool qgsDoubleNear( double a, double b, double epsilon = 4 * std::numeric_limits<double>::epsilon() )
3510{
3511 const bool aIsNan = std::isnan( a );
3512 const bool bIsNan = std::isnan( b );
3513 if ( aIsNan || bIsNan )
3514 return aIsNan && bIsNan;
3515
3516 const double diff = a - b;
3517 return diff > -epsilon && diff <= epsilon;
3518}
3519
3526inline bool qgsFloatNear( float a, float b, float epsilon = 4 * FLT_EPSILON )
3527{
3528 const bool aIsNan = std::isnan( a );
3529 const bool bIsNan = std::isnan( b );
3530 if ( aIsNan || bIsNan )
3531 return aIsNan && bIsNan;
3532
3533 const float diff = a - b;
3534 return diff > -epsilon && diff <= epsilon;
3535}
3536
3538inline bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 )
3539{
3540 const bool aIsNan = std::isnan( a );
3541 const bool bIsNan = std::isnan( b );
3542 if ( aIsNan || bIsNan )
3543 return aIsNan && bIsNan;
3544
3545 // The most simple would be to print numbers as %.xe and compare as strings
3546 // but that is probably too costly
3547 // Then the fastest would be to set some bits directly, but little/big endian
3548 // has to be considered (maybe TODO)
3549 // Is there a better way?
3550 int aexp, bexp;
3551 const double ar = std::frexp( a, &aexp );
3552 const double br = std::frexp( b, &bexp );
3553
3554 return aexp == bexp &&
3555 std::round( ar * std::pow( 10.0, significantDigits ) ) == std::round( br * std::pow( 10.0, significantDigits ) );
3556}
3557
3563inline double qgsRound( double number, int places )
3564{
3565 const double m = ( number < 0.0 ) ? -1.0 : 1.0;
3566 const double scaleFactor = std::pow( 10.0, places );
3567 return ( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
3568}
3569
3570#ifndef SIP_RUN
3571
3578template<class Key, class Value>
3579QString qgsMapJoinKeys( const QMap<Key, Value> &map, const QString &separator )
3580{
3581 QString result;
3582 for ( auto it = map.constBegin(); it != map.constEnd(); it++ )
3583 result += QString( "%1%2" ).arg( it.key() ).arg( separator );
3584
3585 result.chop( separator.size() );
3586 return result;
3587}
3588
3595template<class Key, class Value>
3596QString qgsMapJoinValues( const QMap<Key, Value> &map, const QString &separator )
3597{
3598 QString result;
3599 for ( auto it = map.constBegin(); it != map.constEnd(); it++ )
3600 result += QString( "%1%2" ).arg( it.value() ).arg( separator );
3601
3602 result.chop( separator.size() );
3603 return result;
3604}
3605
3612template<class T>
3613QString qgsSetJoin( const QSet<T> &set, const QString &separator )
3614{
3615 QString result;
3616 for ( auto it = set.constBegin(); it != set.constEnd(); it++ )
3617 result += QString( "%1%2" ).arg( *it ).arg( separator );
3618
3619 result.chop( separator.size() );
3620 return result;
3621}
3622
3624
3634namespace qgis
3635{
3636
3649 template<typename To, typename From> inline To down_cast( From *f )
3650 {
3651 static_assert(
3652 ( std::is_base_of<From,
3653 typename std::remove_pointer<To>::type>::value ),
3654 "target type not derived from source type" );
3655 Q_ASSERT( f == nullptr || dynamic_cast<To>( f ) != nullptr );
3656 return static_cast<To>( f );
3657 }
3658
3659 template<class T>
3660 QSet<T> listToSet( const QList<T> &list )
3661 {
3662 return QSet<T>( list.begin(), list.end() );
3663 }
3664
3665 template<class T>
3666 QList<T> setToList( const QSet<T> &set )
3667 {
3668 return QList<T>( set.begin(), set.end() );
3669 }
3670}
3671
3673#endif
3674
3679template<class T> const QList<T> qgsEnumList() SIP_SKIP
3680{
3681 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3682 Q_ASSERT( metaEnum.isValid() );
3683 QList<T> enumList;
3684 for ( int idx = 0; idx < metaEnum.keyCount(); ++idx )
3685 {
3686 enumList.append( static_cast<T>( metaEnum.value( idx ) ) );
3687 }
3688 return enumList;
3689}
3690
3696template<class T> const QMap<T, QString> qgsEnumMap() SIP_SKIP
3697{
3698 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3699 Q_ASSERT( metaEnum.isValid() );
3700 QMap<T, QString> enumMap;
3701 for ( int idx = 0; idx < metaEnum.keyCount(); ++idx )
3702 {
3703 enumMap.insert( static_cast<T>( metaEnum.value( idx ) ), QString( metaEnum.key( idx ) ) );
3704 }
3705 return enumMap;
3706}
3707
3713template<class T> QString qgsEnumValueToKey( const T &value, bool *returnOk = nullptr ) SIP_SKIP
3714{
3715 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3716 Q_ASSERT( metaEnum.isValid() );
3717 const char *key = metaEnum.valueToKey( static_cast<int>( value ) );
3718 if ( returnOk )
3719 {
3720 *returnOk = key ? true : false;
3721 }
3722 return QString::fromUtf8( key );
3723}
3724
3732template<class T> T qgsEnumKeyToValue( const QString &key, const T &defaultValue, bool tryValueAsKey = true, bool *returnOk = nullptr ) SIP_SKIP
3733{
3734 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3735 Q_ASSERT( metaEnum.isValid() );
3736 bool ok = false;
3737 T v = static_cast<T>( metaEnum.keyToValue( key.toUtf8().data(), &ok ) );
3738 if ( returnOk )
3739 {
3740 *returnOk = ok;
3741 }
3742 if ( ok )
3743 {
3744 return v;
3745 }
3746 else
3747 {
3748 // if conversion has failed, try with conversion from int value
3749 if ( tryValueAsKey )
3750 {
3751 bool canConvert = false;
3752 const int intValue = key.toInt( &canConvert );
3753 if ( canConvert && metaEnum.valueToKey( intValue ) )
3754 {
3755 if ( returnOk )
3756 {
3757 *returnOk = true;
3758 }
3759 return static_cast<T>( intValue );
3760 }
3761 }
3762 }
3763 return defaultValue;
3764}
3765
3771template<class T> QString qgsFlagValueToKeys( const T &value, bool *returnOk = nullptr ) SIP_SKIP
3772{
3773 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3774 Q_ASSERT( metaEnum.isValid() );
3775 int intValue = static_cast<int>( value );
3776 const QByteArray ba = metaEnum.valueToKeys( intValue );
3777 // check that the int value does correspond to a flag
3778 // see https://stackoverflow.com/a/68495949/1548052
3779 const int intValueCheck = metaEnum.keysToValue( ba );
3780 bool ok = intValue == intValueCheck;
3781 if ( returnOk )
3782 *returnOk = ok;
3783 return ok ? QString::fromUtf8( ba ) : QString();
3784}
3785
3793template<class T> T qgsFlagKeysToValue( const QString &keys, const T &defaultValue, bool tryValueAsKey = true, bool *returnOk = nullptr ) SIP_SKIP
3794{
3795 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3796 Q_ASSERT( metaEnum.isValid() );
3797 bool ok = false;
3798 T v = static_cast<T>( metaEnum.keysToValue( keys.toUtf8().constData(), &ok ) );
3799 if ( returnOk )
3800 {
3801 *returnOk = ok;
3802 }
3803 if ( ok )
3804 {
3805 return v;
3806 }
3807 else
3808 {
3809 // if conversion has failed, try with conversion from int value
3810 if ( tryValueAsKey )
3811 {
3812 bool canConvert = false;
3813 const int intValue = keys.toInt( &canConvert );
3814 if ( canConvert )
3815 {
3816 const QByteArray keys = metaEnum.valueToKeys( intValue );
3817 const int intValueCheck = metaEnum.keysToValue( keys );
3818 if ( intValue == intValueCheck )
3819 {
3820 if ( returnOk )
3821 {
3822 *returnOk = true;
3823 }
3824 return T( intValue );
3825 }
3826 }
3827 }
3828 }
3829 return defaultValue;
3830}
3831
3832
3842CORE_EXPORT double qgsPermissiveToDouble( QString string, bool &ok );
3843
3853CORE_EXPORT int qgsPermissiveToInt( QString string, bool &ok );
3854
3864CORE_EXPORT qlonglong qgsPermissiveToLongLong( QString string, bool &ok );
3865
3875CORE_EXPORT bool qgsVariantLessThan( const QVariant &lhs, const QVariant &rhs );
3876
3885CORE_EXPORT bool qgsVariantEqual( const QVariant &lhs, const QVariant &rhs );
3886
3893CORE_EXPORT bool qgsVariantGreaterThan( const QVariant &lhs, const QVariant &rhs );
3894
3895#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
3896
3903inline bool operator> ( const QVariant &v1, const QVariant &v2 )
3904{
3905 return qgsVariantGreaterThan( v1, v2 );
3906}
3907
3917inline bool operator< ( const QVariant &v1, const QVariant &v2 )
3918{
3919 return qgsVariantLessThan( v1, v2 );
3920}
3921#endif
3922
3923
3924#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
3925
3929template<> CORE_EXPORT bool qMapLessThanKey<QVariantList>( const QVariantList &key1, const QVariantList &key2 ) SIP_SKIP;
3930#endif
3931
3932CORE_EXPORT QString qgsVsiPrefix( const QString &path );
3933
3939void CORE_EXPORT *qgsMalloc( size_t size ) SIP_SKIP;
3940
3945void CORE_EXPORT qgsFree( void *ptr ) SIP_SKIP;
3946
3947#ifndef SIP_RUN
3948
3949#ifdef _MSC_VER
3950#define CONSTLATIN1STRING inline const QLatin1String
3951#else
3952#define CONSTLATIN1STRING constexpr QLatin1String
3953#endif
3954
3956class ScopedIntIncrementor
3957{
3958 public:
3959
3960 ScopedIntIncrementor( int *variable )
3961 : mVariable( variable )
3962 {
3963 ( *mVariable )++;
3964 }
3965
3966 ScopedIntIncrementor( const ScopedIntIncrementor &other ) = delete;
3967 ScopedIntIncrementor &operator=( const ScopedIntIncrementor &other ) = delete;
3968
3969 void release()
3970 {
3971 if ( mVariable )
3972 ( *mVariable )--;
3973
3974 mVariable = nullptr;
3975 }
3976
3977 ~ScopedIntIncrementor()
3978 {
3979 release();
3980 }
3981
3982 private:
3983 int *mVariable = nullptr;
3984};
3986
3992{
3993 return QLatin1String(
3994 R"""(GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]] )"""
3995 );
3996}
3997
4000{
4001 return QLatin1String( "+proj=longlat +datum=WGS84 +no_defs" );
4002}
4003
4006{
4007 return QLatin1String( "EPSG:4326" );
4008}
4009
4012{
4013 return QLatin1String( "NONE" );
4014}
4015
4017
4019const int PREVIEW_JOB_DELAY_MS = 250;
4020
4022const int MAXIMUM_LAYER_PREVIEW_TIME_MS = 250;
4023
4025
4026#endif
4027
4029const long GEOSRID = 4326;
4030
4032const long GEOCRS_ID = 3452;
4033
4035const long GEO_EPSG_CRS_ID = 4326;
4036
4041const int USER_CRS_START_ID = 100000;
4042
4043//
4044// Constants for point symbols
4045//
4046
4048const double DEFAULT_POINT_SIZE = 2.0;
4049const double DEFAULT_LINE_WIDTH = 0.26;
4050
4052const double DEFAULT_SEGMENT_EPSILON = 1e-8;
4053
4054typedef QMap<QString, QString> QgsStringMap SIP_SKIP;
4055
4064typedef unsigned long long qgssize;
4065
4066#ifndef SIP_RUN
4067#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
4068
4069#define Q_NOWARN_DEPRECATED_PUSH \
4070 _Pragma("GCC diagnostic push") \
4071 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
4072#define Q_NOWARN_DEPRECATED_POP \
4073 _Pragma("GCC diagnostic pop");
4074#define Q_NOWARN_UNREACHABLE_PUSH
4075#define Q_NOWARN_UNREACHABLE_POP
4076
4077#elif defined(_MSC_VER)
4078
4079#define Q_NOWARN_DEPRECATED_PUSH \
4080 __pragma(warning(push)) \
4081 __pragma(warning(disable:4996))
4082#define Q_NOWARN_DEPRECATED_POP \
4083 __pragma(warning(pop))
4084#define Q_NOWARN_UNREACHABLE_PUSH \
4085 __pragma(warning(push)) \
4086 __pragma(warning(disable:4702))
4087#define Q_NOWARN_UNREACHABLE_POP \
4088 __pragma(warning(pop))
4089
4090#else
4091
4092#define Q_NOWARN_DEPRECATED_PUSH
4093#define Q_NOWARN_DEPRECATED_POP
4094#define Q_NOWARN_UNREACHABLE_PUSH
4095#define Q_NOWARN_UNREACHABLE_POP
4096
4097#endif
4098#endif
4099
4100#ifndef QGISEXTERN
4101#ifdef Q_OS_WIN
4102# define QGISEXTERN extern "C" __declspec( dllexport )
4103#else
4104# if defined(__GNUC__) || defined(__clang__)
4105# define QGISEXTERN extern "C" __attribute__ ((visibility ("default")))
4106# else
4107# define QGISEXTERN extern "C"
4108# endif
4109#endif
4110#endif
4111#endif
4112
4113#if __cplusplus >= 201500
4114#define FALLTHROUGH [[fallthrough]];
4115#elif defined(__clang__)
4116#define FALLTHROUGH [[clang::fallthrough]];
4117#elif defined(__GNUC__) && __GNUC__ >= 7
4118#define FALLTHROUGH [[gnu::fallthrough]];
4119#else
4120#define FALLTHROUGH
4121#endif
4122
4123// see https://infektor.net/posts/2017-01-19-using-cpp17-attributes-today.html#using-the-nodiscard-attribute
4124#if __cplusplus >= 201703L
4125#define NODISCARD [[nodiscard]]
4126#elif defined(__clang__)
4127#define NODISCARD [[nodiscard]]
4128#elif defined(_MSC_VER)
4129#define NODISCARD // no support
4130#elif defined(__has_cpp_attribute)
4131#if __has_cpp_attribute(nodiscard)
4132#define NODISCARD [[nodiscard]]
4133#elif __has_cpp_attribute(gnu::warn_unused_result)
4134#define NODISCARD [[gnu::warn_unused_result]]
4135#else
4136#define NODISCARD Q_REQUIRED_RESULT
4137#endif
4138#else
4139#define NODISCARD Q_REQUIRED_RESULT
4140#endif
4141
4142#if __cplusplus >= 201703L
4143#define MAYBE_UNUSED [[maybe_unused]]
4144#elif defined(__clang__)
4145#define MAYBE_UNUSED [[maybe_unused]]
4146#elif defined(_MSC_VER)
4147#define MAYBE_UNUSED // no support
4148#elif defined(__has_cpp_attribute)
4149#if __has_cpp_attribute(gnu::unused)
4150#define MAYBE_UNUSED [[gnu::unused]]
4151#else
4152#define MAYBE_UNUSED
4153#endif
4154#else
4155#define MAYBE_UNUSED
4156#endif
4157
4158#ifndef FINAL
4159#define FINAL final
4160#endif
4161
4162#ifndef SIP_RUN
4163#ifdef _MSC_VER
4164#define BUILTIN_UNREACHABLE \
4165 __assume(false);
4166#elif defined(__GNUC__) && !defined(__clang__)
4167// Workaround a GCC bug where a -Wreturn-type warning is emitted in constructs
4168// like:
4169// switch( mVariableThatCanOnlyBeXorY )
4170// {
4171// case X:
4172// return "foo";
4173// case Y:
4174// return "foo";
4175// }
4176// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87951
4177#define BUILTIN_UNREACHABLE \
4178 __builtin_unreachable();
4179#else
4180#define BUILTIN_UNREACHABLE
4181#endif
4182#endif // SIP_RUN
4183
4184#ifdef SIP_RUN
4185
4190QString CORE_EXPORT geoWkt();
4191
4193QString CORE_EXPORT geoProj4();
4194
4196QString CORE_EXPORT geoEpsgCrsAuthId();
4197
4199QString CORE_EXPORT geoNone();
4200
4201#endif
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:55
DistanceUnitType
Types of distance units.
Definition: qgis.h:3069
GnssConstellation
GNSS constellation.
Definition: qgis.h:1142
SettingsOption
Settings options.
Definition: qgis.h:418
ProfileGeneratorFlag
Flags that control the way the QgsAbstractProfileGenerator operate.
Definition: qgis.h:2470
GpsQualityIndicator
GPS signal quality indicator.
Definition: qgis.h:1160
ProjectReadFlag
Flags which control project read behavior.
Definition: qgis.h:2541
PointCloudSymbol
Rendering symbols for point cloud points.
Definition: qgis.h:2485
GeometryValidityFlag
Geometry validity check flags.
Definition: qgis.h:1294
MapLayerActionFlag
Map layer action targets.
Definition: qgis.h:2790
MapLayerProperty
File operation flags.
Definition: qgis.h:1397
BufferSide
Side of line to buffer.
Definition: qgis.h:1319
RasterResamplingStage
Stage at which raster resampling occurs.
Definition: qgis.h:891
AltitudeClamping
Altitude clamping.
Definition: qgis.h:2329
VectorTemporalMode
Vector layer temporal feature modes.
Definition: qgis.h:1543
SublayerFlag
Sublayer query flags.
Definition: qgis.h:860
CoordinateDisplayType
Relationship capabilities.
Definition: qgis.h:2689
DashPatternSizeAdjustment
Dash pattern size adjustment options.
Definition: qgis.h:2093
GpsFixStatus
GPS fix status.
Definition: qgis.h:1127
AnnotationItemNodeType
Annotation item GUI flags.
Definition: qgis.h:1519
static const char * QGIS_DEV_VERSION
The development version.
Definition: qgis.h:83
AngularDirection
Angular directions.
Definition: qgis.h:2193
DriveType
Drive types.
Definition: qgis.h:676
UnitType
Unit types.
Definition: qgis.h:3030
ContentStatus
Status for fetched or stored content.
Definition: qgis.h:1083
SnappingType
SnappingTypeFlag defines on what object the snapping is performed.
Definition: qgis.h:443
LayoutUnit
Layout measurement units.
Definition: qgis.h:3196
Q_ENUM(GpsFixStatus)
RelationshipStrength
Relationship strength.
Definition: qgis.h:2642
Q_ENUM(GnssConstellation)
MarkerLinePlacement
Defines how/where the symbols should be placed on a line.
Definition: qgis.h:1958
GeometryOperationResult
Success or failure of a geometry operation.
Definition: qgis.h:1266
BrowserItemState
Browser item states.
Definition: qgis.h:538
MarkerClipMode
Marker clipping modes.
Definition: qgis.h:2051
AnnotationItemFlag
Flags for annotation items.
Definition: qgis.h:1491
RenderSubcomponentProperty
Rendering subcomponent properties.
Definition: qgis.h:1882
SymbolRenderHint
Flags controlling behavior of symbols during rendering.
Definition: qgis.h:463
AngleUnit
Units of angles.
Definition: qgis.h:3131
CaptureTechnique
Capture technique.
Definition: qgis.h:267
BrowserItemCapability
Browser item capabilities.
Definition: qgis.h:551
LayerTreeInsertionMethod
Layer tree insertion methods.
Definition: qgis.h:2734
LineClipMode
Line clipping modes.
Definition: qgis.h:2065
BrowserDirectoryMonitoring
Browser directory item monitoring switches.
Definition: qgis.h:596
SettingsTreeNodeType
Type of tree node.
Definition: qgis.h:364
TilePixelRatio
DpiMode enum.
Definition: qgis.h:2133
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition: qgis.h:778
GradientColorSource
Gradient color sources.
Definition: qgis.h:1980
LabelPlacement
Placement modes which determine how label candidates are generated for a feature.
Definition: qgis.h:731
RasterLayerType
Raster layer types.
Definition: qgis.h:2879
RasterPyramidFormat
Raster pyramid formats.
Definition: qgis.h:2918
VectorExportResult
Vector layer export result codes.
Definition: qgis.h:620
DistanceUnit
Units of distance.
Definition: qgis.h:3047
RasterTemporalCapabilityFlag
Flags for raster layer temporal capabilities.
Definition: qgis.h:1612
SymbolLayerFlag
Flags controlling behavior of symbol layers.
Definition: qgis.h:505
GradientSpread
Gradient spread options, which control how gradients are rendered outside of their start and end poin...
Definition: qgis.h:2024
ScaleMethod
Scale methods.
Definition: qgis.h:334
SldExportOption
SLD export options.
Definition: qgis.h:390
FilePathType
File path types.
Definition: qgis.h:983
PointCountMethod
Methods which define the number of points randomly filling a polygon.
Definition: qgis.h:2039
SldExportVendorExtension
SLD export vendor extensions, allow the use of vendor extensions when exporting to SLD.
Definition: qgis.h:405
VertexType
Types of vertex.
Definition: qgis.h:1895
DataProviderFlag
Map layer properties.
Definition: qgis.h:1412
GeometryValidationEngine
Available engines for validating geometries.
Definition: qgis.h:1307
TransactionMode
Transaction mode.
Definition: qgis.h:2316
Q_ENUM(ScaleToTileZoomLevelMethod)
ElevationMapCombineMethod
Methods used to select the elevation when two elevation maps are combined.
Definition: qgis.h:2963
RasterDrawingStyle
Raster drawing styles.
Definition: qgis.h:2895
GpsInformationComponent
GPS information component.
Definition: qgis.h:1180
ViewSyncModeFlag
Synchronization of 2D map canvas and 3D view.
Definition: qgis.h:2218
FileOperationFlag
File operation flags.
Definition: qgis.h:1382
ProjectCapability
Flags which control project capabilities.
Definition: qgis.h:2571
Q_ENUM(VectorProfileType)
AttributeActionType
Map layer action flags.
Definition: qgis.h:2813
AreaUnit
Units of area.
Definition: qgis.h:3084
FieldDomainMergePolicy
Merge policy for field domains.
Definition: qgis.h:2290
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition: qgis.h:100
SqlKeywordCategory
SQL layer definition capabilities.
Definition: qgis.h:658
GraduatedMethod
Methods for modifying symbols by range in a graduated symbol renderer.
Definition: qgis.h:2108
TextLayoutMode
Text layout modes.
Definition: qgis.h:1801
RasterRendererFlag
Flags which control behavior of raster renderers.
Definition: qgis.h:905
MeshEditingErrorType
Type of error that can occur during mesh frame editing.
Definition: qgis.h:966
FieldDomainSplitPolicy
Split policy for field domains.
Definition: qgis.h:2273
ArcGisRestServiceType
Available ArcGIS REST service types.
Definition: qgis.h:2609
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
Definition: qgis.h:1530
MapRecenteringMode
Modes for recentering map canvases.
Definition: qgis.h:2231
ActionType
Action types.
Definition: qgis.h:2749
ActionStart
Enum to determine when an operation would begin.
Definition: qgis.h:692
AvoidIntersectionsMode
Flags which control how intersections of pre-existing feature are handled when digitizing new feature...
Definition: qgis.h:2512
MarkerShape
Marker shapes.
Definition: qgis.h:1909
BlendMode
Blending modes defining the available composition modes that can be used when painting.
Definition: qgis.h:2978
Capitalization
String capitalization options.
Definition: qgis.h:2150
TemporalIntervalMatchMethod
Method to use when resolving a temporal range to a data provider layer or band.
Definition: qgis.h:1597
LabelQuadrantPosition
Label quadrant positions.
Definition: qgis.h:792
ScaleToTileZoomLevelMethod
Available methods for converting map scales to tile zoom levels.
Definition: qgis.h:2181
SublayerQueryFlag
Flags which control how data providers will scan for sublayers in a dataset.
Definition: qgis.h:843
TextOrientation
Text orientations.
Definition: qgis.h:1786
PythonMacroMode
Vector layer type flags.
Definition: qgis.h:294
TemporalUnit
Temporal units.
Definition: qgis.h:3152
UnplacedLabelVisibility
Unplaced label visibility.
Definition: qgis.h:704
CrsDefinitionFormat
CRS definition formats.
Definition: qgis.h:2258
SpatialFilterType
Feature request spatial filter types.
Definition: qgis.h:1369
ProjectFlag
Flags which control the behavior of QgsProjects.
Definition: qgis.h:2380
BrowserItemType
Symbol layer flags.
Definition: qgis.h:519
SettingsType
Types of settings entries.
Definition: qgis.h:345
RasterTemporalMode
Raster layer temporal modes.
Definition: qgis.h:1584
RasterAttributeTableType
The RasterAttributeTableType enum represents the type of RAT.
Definition: qgis.h:954
LabelingFlag
Various flags that affect drawing and placement of labels.
Definition: qgis.h:1741
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition: qgis.h:228
RelationshipType
Relationship types.
Definition: qgis.h:2628
JoinStyle
Join styles for buffers.
Definition: qgis.h:1344
PointCloudDrawOrder
Pointcloud rendering order for 2d views.
Definition: qgis.h:2497
TextCharacterVerticalAlignment
Text vertical alignment for characters.
Definition: qgis.h:1869
DpiMode
DpiMode enum.
Definition: qgis.h:2119
BrowserLayerType
Browser item layer types.
Definition: qgis.h:573
AltitudeBinding
Altitude binding.
Definition: qgis.h:2342
MapLayerActionTarget
Map layer action targets.
Definition: qgis.h:2764
ScriptLanguage
Scripting languages.
Definition: qgis.h:2715
LabelMultiLineAlignment
Text alignment for multi-line labels.
Definition: qgis.h:828
VectorDataProviderTemporalMode
Vector data provider temporal handling modes.
Definition: qgis.h:1571
TextRenderFormat
Options for rendering text.
Definition: qgis.h:1727
DataType
Raster data types.
Definition: qgis.h:242
Q_ENUM(ProfileSurfaceSymbology)
SystemOfMeasurement
Systems of unit measurement.
Definition: qgis.h:3014
RasterAttributeTableFieldUsage
Flags which control behavior of raster renderers.
Definition: qgis.h:925
VerticalAxisInversion
Vertical axis inversion options for 3D views.
Definition: qgis.h:2433
RelationshipCapability
Relationship capabilities.
Definition: qgis.h:2668
RasterBuildPyramidOption
Raster pyramid building options.
Definition: qgis.h:2933
NavigationMode
The navigation mode used by 3D cameras.
Definition: qgis.h:2421
LayerType
Types of layers that can be added to a map.
Definition: qgis.h:115
Q_DECLARE_FLAGS(RenderContextFlags, RenderContextFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsRenderContext
Render context flags.
PlotToolFlag
Flags that control the way the QgsPlotTools operate.
Definition: qgis.h:2396
RenderUnit
Rendering size units.
Definition: qgis.h:3176
CoordinateOrder
Order of coordinates.
Definition: qgis.h:1478
SelectionFlag
Flags which control feature selection behavior.
Definition: qgis.h:1035
EndCapStyle
End cap styles for buffers.
Definition: qgis.h:1331
BabelCommandFlag
Babel GPS format capabilities.
Definition: qgis.h:1237
FieldDomainType
Types of field domain.
Definition: qgis.h:2303
RenderContextFlag
Flags which affect rendering operations.
Definition: qgis.h:1693
RasterPipeInterfaceRole
Sublayer flags.
Definition: qgis.h:874
SymbolPreviewFlag
Symbol flags.
Definition: qgis.h:491
AnnotationItemGuiFlag
Annotation item flags.
Definition: qgis.h:1505
MapBoxGlStyleSourceType
Flags which control project capabilities.
Definition: qgis.h:2590
LayoutUnitType
Types of layout units.
Definition: qgis.h:3216
DashPatternLineEndingRule
Dash pattern line ending rules.
Definition: qgis.h:2078
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
Definition: qgis.h:1071
HistoryProviderBackend
History provider backends.
Definition: qgis.h:2244
SublayerPromptMode
Specifies how to handle layer sources with multiple sublayers.
Definition: qgis.h:995
TextVerticalAlignment
Text vertical alignment.
Definition: qgis.h:1853
RelationshipCardinality
Relationship cardinality.
Definition: qgis.h:2654
GradientType
Gradient types.
Definition: qgis.h:1994
VectorProfileType
Types of elevation profiles to generate for vector sources.
Definition: qgis.h:2458
GpsFeatureType
Babel command flags.
Definition: qgis.h:1251
VectorLayerTypeFlag
Vector layer type flags.
Definition: qgis.h:281
MakeValidMethod
Algorithms to use when repairing invalid geometries.
Definition: qgis.h:1357
VectorTemporalLimitMode
Mode for the handling of the limits of the filtering timeframe for vector features.
Definition: qgis.h:1559
SqlLayerDefinitionCapability
SqlLayerDefinitionCapability enum lists the arguments supported by the provider when creating SQL que...
Definition: qgis.h:641
VectorEditResult
Flags which control feature selection behavior.
Definition: qgis.h:1056
Q_DECLARE_FLAGS(GeometryValidityFlags, GeometryValidityFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsGeometry
Geometry validity flags.
VolumeUnit
Units of volume.
Definition: qgis.h:3108
ProjectFileFormat
Flags which control project read behavior.
Definition: qgis.h:2527
SnappingMode
SnappingMode defines on which layer the snapping is performed.
Definition: qgis.h:431
SymbolType
Symbol types.
Definition: qgis.h:320
RasterColorInterpretation
Raster color interpretation.
Definition: qgis.h:2849
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
Definition: qgis.h:2446
LabelPlacementEngineVersion
Labeling placement engine version.
Definition: qgis.h:1772
RendererUsage
Usage of the renderer.
Definition: qgis.h:2205
SettingsTreeNodeOption
Options for named list nodes.
Definition: qgis.h:376
BabelFormatCapability
GPS information component.
Definition: qgis.h:1218
GpsConnectionType
GPS connection types.
Definition: qgis.h:1098
GpsConnectionStatus
GPS connection status.
Definition: qgis.h:1112
BetweenLineConstraint
Between line constraints which can be enabled.
Definition: qgis.h:2354
MetadataDateType
Date types for metadata.
Definition: qgis.h:2831
RasterIdentifyFormat
Raster identify formats.
Definition: qgis.h:2948
TextHorizontalAlignment
Text horizontal alignment.
Definition: qgis.h:1834
SymbolFlag
Flags controlling behavior of symbols.
Definition: qgis.h:477
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
Definition: qgis.h:2367
HttpMethod
Different methods of HTTP requests.
Definition: qgis.h:608
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition: qgis.h:155
SymbolCoordinateReference
Symbol coordinate reference modes.
Definition: qgis.h:2009
TextRendererFlag
Flags which control the behavior of rendering text.
Definition: qgis.h:2168
SelectGeometryRelationship
Geometry relationship test to apply for selecting features.
Definition: qgis.h:1023
CrsAxisDirection
Data provider flags.
Definition: qgis.h:1428
SettingsOrigin
The setting origin describes where a setting is stored.
Definition: qgis.h:2702
LabelOverlapHandling
Label overlap handling.
Definition: qgis.h:716
CoordinateTransformationFlag
Flags which adjust the coordinate transformations behave.
Definition: qgis.h:1643
TextComponent
Text components.
Definition: qgis.h:1818
TransformDirection
Flags for raster layer temporal capabilities.
Definition: qgis.h:1631
LightSourceType
Light source types for 3D scenes.
Definition: qgis.h:2409
LabelPredefinedPointPosition
Positions for labels when using the Qgis::LabelPlacement::OrderedPositionsAroundPoint placement mode.
Definition: qgis.h:753
UpsideDownLabelHandling
Handling techniques for upside down labels.
Definition: qgis.h:813
Q_DECLARE_FLAGS(MapSettingsFlags, MapSettingsFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsMapSettings
Map settings flags.
MapSettingsFlag
Coordinate transformation flags.
Definition: qgis.h:1663
SelectBehavior
Specifies how a selection should be applied.
Definition: qgis.h:1009
Utility class that encapsulates an action based on vector attributes.
Definition: qgsaction.h:37
Utility functions for working with ArcGIS REST services.
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.
Abstract base class for curved geometry type.
Definition: qgscurve.h:36
Base class for all items in the model.
Definition: qgsdataitem.h:46
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:164
Encapsulates information relating to a GPS position fix.
Stores global configuration for labeling engine.
Item that represents a layer that can be opened with one of the providers.
Definition: qgslayeritem.h:31
Base class for all map layer types.
Definition: qgsmaplayer.h:73
The QgsMapSettings class contains configuration for rendering of the map.
Registry for temporary fetched files.
Misc painting enums and functions.
Definition: qgspainting.h:30
Contains settings for how a map layer will be labeled.
Abstract base class for 2d point cloud renderers.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:105
A fill symbol layer which places markers at random locations within polygons.
Implementation of data provider temporal properties for QgsRasterDataProviders.
Implementation of map layer temporal properties for raster layers.
Represents a raster layer.
Contains a pipeline of raster interfaces for sequential raster processing.
Definition: qgsrasterpipe.h:50
Raster namespace.
Definition: qgsraster.h:32
Contains information about the context of a rendering operation.
Represent settings entry and provides methods for reading and writing settings values.
RAII signal blocking class.
Definition: qgis.h:3394
Object * operator->()
Returns pointer to blocked QObject.
Definition: qgis.h:3412
~QgsSignalBlocker()
Definition: qgis.h:3406
QgsSignalBlocker(Object *object)
Constructor for QgsSignalBlocker.
Definition: qgis.h:3401
Abstract base class for simple marker symbol layers.
This is a container for configuration of the snapping of the project.
Utility functions for working with strings.
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:93
Base class for templated line symbols, e.g.
Container for all settings relating to text rendering.
Definition: qgstextformat.h:41
Handles rendering text using rich formatting options, including drop shadows, buffers and background ...
This is the class is providing tolerance value in map unit values.
Definition: qgstolerance.h:33
Helper functions for various unit types.
Definition: qgsunittypes.h:40
Implementation of data provider temporal properties for QgsVectorDataProviders.
This is the base class for vector data providers.
A convenience class for exporting vector layers to a destination data provider.
Implementation of map layer temporal properties for vector layers.
Represents a vector layer which manages a vector based data sets.
Handles storage of information regarding WKB types and their properties.
Definition: qgswkbtypes.h:43
FeatureCountState
Enumeration of feature count states.
Definition: qgis.h:309
@ Points
Point based rendering, requires point data.
int significantDigits(const Qgis::DataType rasterDataType)
Returns the maximum number of significant digits a for the given rasterDataType.
As part of the API refactoring and improvements which landed in QGIS
#define str(x)
Definition: qgis.cpp:37
CONSTLATIN1STRING geoNone()
Constant that holds the string representation for "No ellips/No CRS".
Definition: qgis.h:4011
const double DEFAULT_LINE_WIDTH
Definition: qgis.h:4049
CORE_EXPORT uint qHash(const QVariant &variant)
Hash for QVariant.
Definition: qgis.cpp:217
bool operator>(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is greater than the second.
Definition: qgis.h:3903
CORE_EXPORT QString qgsVsiPrefix(const QString &path)
Definition: qgis.cpp:192
CORE_EXPORT bool qgsVariantEqual(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether they are equal, two NULL values are always treated a...
Definition: qgis.cpp:266
T qgsEnumKeyToValue(const QString &key, const T &defaultValue, bool tryValueAsKey=true, bool *returnOk=nullptr)
Returns the value corresponding to the given key of an enum.
Definition: qgis.h:3732
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
Definition: qgis.h:3448
QString qgsMapJoinValues(const QMap< Key, Value > &map, const QString &separator)
Joins all the map values into a single string with each element separated by the given separator.
Definition: qgis.h:3596
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.
Definition: qgis.h:3713
QString qgsFlagValueToKeys(const T &value, bool *returnOk=nullptr)
Returns the value for the given keys of a flag.
Definition: qgis.h:3771
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
Definition: qgis.h:4035
QString qgsMapJoinKeys(const QMap< Key, Value > &map, const QString &separator)
Joins all the map keys into a single string with each element separated by the given separator.
Definition: qgis.h:3579
T qgsFlagKeysToValue(const QString &keys, const T &defaultValue, bool tryValueAsKey=true, bool *returnOk=nullptr)
Returns the value corresponding to the given keys of a flag.
Definition: qgis.h:3793
CORE_EXPORT bool qgsVariantGreaterThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is greater than the second.
Definition: qgis.cpp:187
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
Definition: qgis.h:4064
const QMap< T, QString > qgsEnumMap()
Returns a map of all enum entries.
Definition: qgis.h:3696
bool qgsFloatNear(float a, float b, float epsilon=4 *FLT_EPSILON)
Compare two floats (but allow some difference)
Definition: qgis.h:3526
QString qgsSetJoin(const QSet< T > &set, const QString &separator)
Joins all the set values into a single string with each element separated by the given separator.
Definition: qgis.h:3613
CORE_EXPORT double qgsPermissiveToDouble(QString string, bool &ok)
Converts a string to a double in a permissive way, e.g., allowing for incorrect numbers of digits bet...
Definition: qgis.cpp:71
const QList< T > qgsEnumList()
Returns a list all enum entries.
Definition: qgis.h:3679
double qgsRound(double number, int places)
Returns a double number, rounded (as close as possible) to the specified number of places.
Definition: qgis.h:3563
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Definition: qgis.h:3509
CONSTLATIN1STRING geoProj4()
PROJ4 string that represents a geographic coord sys.
Definition: qgis.h:3999
bool qgsNanCompatibleEquals(double a, double b)
Compare two doubles, treating nan values as equal.
Definition: qgis.h:3493
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
Definition: qgis.h:3435
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
Definition: qgis.cpp:92
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
Definition: qgis.h:4052
QMap< QString, QString > QgsStringMap
Definition: qgis.h:4054
#define CONSTLATIN1STRING
Definition: qgis.h:3952
CONSTLATIN1STRING geoWkt()
Wkt string that represents a geographic coord sys.
Definition: qgis.h:3991
bool qgsDoubleNearSig(double a, double b, int significantDigits=10)
Compare two doubles using specified number of significant digits.
Definition: qgis.h:3538
const int USER_CRS_START_ID
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/....
Definition: qgis.h:4041
void CORE_EXPORT qgsFree(void *ptr)
Frees the memory space pointed to by ptr.
Definition: qgis.cpp:114
CORE_EXPORT qlonglong qgsPermissiveToLongLong(QString string, bool &ok)
Converts a string to an qlonglong in a permissive way, e.g., allowing for incorrect numbers of digits...
Definition: qgis.cpp:85
CORE_EXPORT int qgsPermissiveToInt(QString string, bool &ok)
Converts a string to an integer in a permissive way, e.g., allowing for incorrect numbers of digits b...
Definition: qgis.cpp:78
CORE_EXPORT bool qgsVariantLessThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is less than the second.
Definition: qgis.cpp:119
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
Definition: qgis.h:4029
#define QHASH_FOR_CLASS_ENUM(T)
Definition: qgis.h:44
bool operator<(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is less than the second.
Definition: qgis.h:3917
CONSTLATIN1STRING geoEpsgCrsAuthId()
Geographic coord sys from EPSG authority.
Definition: qgis.h:4005
const long GEOCRS_ID
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
Definition: qgis.h:4032
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
Definition: qgis.h:4048
#define SIP_SKIP
Definition: qgis_sip.h:126
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition: qgis_sip.h:266
#define SIP_MONKEYPATCH_FLAGS_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition: qgis_sip.h:267
#define SIP_MONKEYPATCH_SCOPEENUM
Definition: qgis_sip.h:265
#define SIP_MONKEYPATCH_COMPAT_NAME(FORMERNAME)
Definition: qgis_sip.h:268
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
int precision
Utility class for identifying a unique vertex within a geometry.
Definition: qgsvertexid.h:31