QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
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 "qgis_core.h"
28#include "qgis_sip.h"
29
30#ifdef SIP_RUN
31% ModuleHeaderCode
32#include <qgis.h>
33% End
34
35% ModuleCode
36int QgisEvent = QEvent::User + 1;
37% End
38#endif
39
40#ifndef SIP_RUN
41// qHash implementation for scoped enum type
42// https://gitlab.com/frostasm/programming-knowledge-base/-/snippets/20120
43#define QHASH_FOR_CLASS_ENUM(T) \
44 inline uint qHash(const T &t, uint seed) { \
45 return ::qHash(static_cast<typename std::underlying_type<T>::type>(t), seed); \
46 }
47#endif
48
53class CORE_EXPORT Qgis
54{
55 Q_GADGET
56 Q_CLASSINFO( "RegisterEnumClassesUnscoped", "false" )
57
58 public:
59
65 static QString version();
66
72 static int versionInt();
73
79 static QString releaseName();
80
82 static const char *QGIS_DEV_VERSION;
83
89 static QString devVersion();
90
91 // Enumerations
92 //
93
99 {
100 Info = 0,
101 Warning = 1,
102 Critical = 2,
103 Success = 3,
104 NoLevel = 4,
105 };
106 Q_ENUM( MessageLevel )
107
108
114 {
115 Vector SIP_MONKEYPATCH_COMPAT_NAME( VectorLayer ),
116 Raster SIP_MONKEYPATCH_COMPAT_NAME( RasterLayer ),
117 Plugin SIP_MONKEYPATCH_COMPAT_NAME( PluginLayer ),
118 Mesh SIP_MONKEYPATCH_COMPAT_NAME( MeshLayer ),
119 VectorTile SIP_MONKEYPATCH_COMPAT_NAME( VectorTileLayer ),
120 Annotation SIP_MONKEYPATCH_COMPAT_NAME( AnnotationLayer ),
121 PointCloud SIP_MONKEYPATCH_COMPAT_NAME( PointCloudLayer ),
122 Group SIP_MONKEYPATCH_COMPAT_NAME( GroupLayer ),
123 };
124 Q_ENUM( LayerType )
125
126
154 {
155 Unknown = 0,
156 Point = 1,
157 LineString = 2,
158 Polygon = 3,
159 Triangle = 17,
160 MultiPoint = 4,
161 MultiLineString = 5,
162 MultiPolygon = 6,
163 GeometryCollection = 7,
164 CircularString = 8,
165 CompoundCurve = 9,
166 CurvePolygon = 10,
167 MultiCurve = 11,
168 MultiSurface = 12,
169 NoGeometry = 100,
170 PointZ = 1001,
171 LineStringZ = 1002,
172 PolygonZ = 1003,
173 TriangleZ = 1017,
174 MultiPointZ = 1004,
175 MultiLineStringZ = 1005,
176 MultiPolygonZ = 1006,
177 GeometryCollectionZ = 1007,
178 CircularStringZ = 1008,
179 CompoundCurveZ = 1009,
180 CurvePolygonZ = 1010,
181 MultiCurveZ = 1011,
182 MultiSurfaceZ = 1012,
183 PointM = 2001,
184 LineStringM = 2002,
185 PolygonM = 2003,
186 TriangleM = 2017,
187 MultiPointM = 2004,
188 MultiLineStringM = 2005,
189 MultiPolygonM = 2006,
190 GeometryCollectionM = 2007,
191 CircularStringM = 2008,
192 CompoundCurveM = 2009,
193 CurvePolygonM = 2010,
194 MultiCurveM = 2011,
195 MultiSurfaceM = 2012,
196 PointZM = 3001,
197 LineStringZM = 3002,
198 PolygonZM = 3003,
199 MultiPointZM = 3004,
200 MultiLineStringZM = 3005,
201 MultiPolygonZM = 3006,
202 GeometryCollectionZM = 3007,
203 CircularStringZM = 3008,
204 CompoundCurveZM = 3009,
205 CurvePolygonZM = 3010,
206 MultiCurveZM = 3011,
207 MultiSurfaceZM = 3012,
208 TriangleZM = 3017,
209 Point25D = 0x80000001,
210 LineString25D,
211 Polygon25D,
212 MultiPoint25D,
213 MultiLineString25D,
214 MultiPolygon25D
215 };
216 Q_ENUM( WkbType )
217
218
227 {
228 Point SIP_MONKEYPATCH_COMPAT_NAME( PointGeometry ),
229 Line SIP_MONKEYPATCH_COMPAT_NAME( LineGeometry ),
230 Polygon SIP_MONKEYPATCH_COMPAT_NAME( PolygonGeometry ),
231 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownGeometry ),
232 Null SIP_MONKEYPATCH_COMPAT_NAME( NullGeometry ),
233 };
234 Q_ENUM( GeometryType )
235
236
241 {
242 UnknownDataType = 0,
243 Byte = 1,
244 Int8 = 14,
245 UInt16 = 2,
246 Int16 = 3,
247 UInt32 = 4,
248 Int32 = 5,
249 Float32 = 6,
250 Float64 = 7,
251 CInt16 = 8,
252 CInt32 = 9,
253 CFloat32 = 10,
254 CFloat64 = 11,
255 ARGB32 = 12,
256 ARGB32_Premultiplied = 13
257 };
258 Q_ENUM( DataType )
259
260
265 enum class CaptureTechnique : int
266 {
267 StraightSegments,
268 CircularString,
269 Streaming,
270 Shape,
271 };
272 Q_ENUM( CaptureTechnique )
273
274
279 enum class VectorLayerTypeFlag : int
280 {
281 SqlQuery = 1 << 0
282 };
283 Q_ENUM( VectorLayerTypeFlag )
285 Q_DECLARE_FLAGS( VectorLayerTypeFlags, VectorLayerTypeFlag )
286 Q_FLAG( VectorLayerTypeFlags )
287
288
293 {
294 Never = 0,
295 Ask = 1,
296 SessionOnly = 2,
297 Always = 3,
298 NotForThisSession,
299 };
300 Q_ENUM( PythonMacroMode )
301
302
308 {
309 Uncounted = -2,
310 UnknownCount = -1,
311 };
312 Q_ENUM( FeatureCountState )
313
314
320 {
321 EditAlias = 1 << 0,
322 EditComment = 1 << 1,
323 };
324
325 Q_ENUM( VectorDataProviderAttributeEditCapability )
326
327
332 Q_DECLARE_FLAGS( VectorDataProviderAttributeEditCapabilities, VectorDataProviderAttributeEditCapability )
333 Q_FLAG( VectorDataProviderAttributeEditCapabilities )
334
335
340 {
341 Marker,
342 Line,
343 Fill,
344 Hybrid
345 };
346 Q_ENUM( SymbolType )
347
348
354 {
355 ScaleArea,
356 ScaleDiameter
357 };
358 Q_ENUM( ScaleMethod )
359
360
365 {
366 Custom,
367 Variant,
368 String,
369 StringList,
370 VariantMap,
371 Bool,
372 Integer,
373 Double,
374 EnumFlag,
375 Color
376 };
377 Q_ENUM( SettingsType )
378
379
384 {
385 Root,
386 Standard,
387 NamedList,
388 };
389 Q_ENUM( SettingsTreeNodeType )
390
391
395 enum class SettingsTreeNodeOption : int
396 {
397 NamedListSelectedItemSetting = 1 << 0,
398 };
399
400 Q_ENUM( SettingsTreeNodeOption )
401 Q_DECLARE_FLAGS( SettingsTreeNodeOptions, SettingsTreeNodeOption )
402 Q_FLAG( SettingsTreeNodeOptions )
403
404
409 enum class SldExportOption : int
410 {
411 NoOptions = 0,
412 Svg = 1 << 0,
413 Png = 1 << 1,
414 };
415 Q_ENUM( SldExportOption )
416 Q_DECLARE_FLAGS( SldExportOptions, SldExportOption )
417 Q_FLAG( SldExportOptions )
418
419
425 {
426 NoVendorExtension = 0,
427 GeoServerVendorExtension = 1 << 1,
428 DeegreeVendorExtension = 1 << 2,
429 };
430 Q_ENUM( SldExportVendorExtension )
431
432
433
437 enum class SettingsOption : int
438 {
439 SaveFormerValue = 1 << 1, //<! Save the former value of the settings
440 SaveEnumFlagAsInt = 1 << 2,
441 };
442 Q_ENUM( SettingsOption )
443 Q_DECLARE_FLAGS( SettingsOptions, SettingsOption )
444 Q_FLAG( SettingsOptions )
445
446
451 {
452 ActiveLayer = 1,
453 AllLayers = 2,
454 AdvancedConfiguration = 3,
455 };
456 Q_ENUM( SnappingMode )
457
458
463 {
464 NoSnap SIP_MONKEYPATCH_COMPAT_NAME( NoSnapFlag ) = 0,
465 Vertex SIP_MONKEYPATCH_COMPAT_NAME( VertexFlag ) = 1 << 0,
466 Segment SIP_MONKEYPATCH_COMPAT_NAME( SegmentFlag ) = 1 << 1,
467 Area SIP_MONKEYPATCH_COMPAT_NAME( AreaFlag ) = 1 << 2,
468 Centroid SIP_MONKEYPATCH_COMPAT_NAME( CentroidFlag ) = 1 << 3,
469 MiddleOfSegment SIP_MONKEYPATCH_COMPAT_NAME( MiddleOfSegmentFlag ) = 1 << 4,
470 LineEndpoint SIP_MONKEYPATCH_COMPAT_NAME( LineEndpointFlag ) = 1 << 5,
471 };
472 Q_ENUM( SnappingType )
474 Q_DECLARE_FLAGS( SnappingTypes, SnappingType ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSnappingConfig, SnappingTypeFlag )
475 Q_FLAG( SnappingTypes )
476
483 {
484 DynamicRotation = 2,
485 };
486 Q_ENUM( SymbolRenderHint )
488 Q_DECLARE_FLAGS( SymbolRenderHints, SymbolRenderHint ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSymbol, RenderHints )
489 Q_FLAG( SymbolRenderHints )
490
496 enum class SymbolRotationMode : int
497 {
498 RespectMapRotation,
499 IgnoreMapRotation,
500 };
501 Q_ENUM( SymbolRotationMode )
502
503
508 enum class SymbolFlag : int
509 {
510 RendererShouldUseSymbolLevels = 1 << 0,
511 };
512 Q_ENUM( SymbolFlag )
514 Q_DECLARE_FLAGS( SymbolFlags, SymbolFlag )
515 Q_FLAG( SymbolFlags )
516
517
523 {
524 FlagIncludeCrosshairsForMarkerSymbols = 1 << 0,
525 };
526 Q_ENUM( SymbolPreviewFlag )
528 Q_DECLARE_FLAGS( SymbolPreviewFlags, SymbolPreviewFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsSymbol, SymbolPreviewFlags )
529 Q_FLAG( SymbolPreviewFlags )
530
536 enum class SymbolLayerFlag : int
537 {
538 DisableFeatureClipping = 1 << 0,
539 };
540 Q_ENUM( SymbolLayerFlag )
542 Q_DECLARE_FLAGS( SymbolLayerFlags, SymbolLayerFlag )
543 Q_FLAG( SymbolLayerFlags )
544
545
551 {
552 Collection,
553 Directory,
554 Layer,
555 Error,
556 Favorites,
557 Project,
558 Custom,
559 Fields,
560 Field,
561 };
562 Q_ENUM( BrowserItemType )
563
564
570 {
571 NotPopulated,
572 Populating,
573 Populated,
574 };
575 Q_ENUM( BrowserItemState )
576
577
583 {
584 NoCapabilities = 0,
585 SetCrs = 1 << 0,
586 Fertile = 1 << 1,
587 Fast = 1 << 2,
588 Collapse = 1 << 3,
589 Rename = 1 << 4,
590 Delete = 1 << 5,
591 ItemRepresentsFile = 1 << 6,
592 RefreshChildrenWhenItemIsRefreshed = 1 << 7,
593 };
594 Q_ENUM( BrowserItemCapability )
596 Q_DECLARE_FLAGS( BrowserItemCapabilities, BrowserItemCapability ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsDataItem, Capabilities )
597 Q_FLAG( BrowserItemCapabilities )
598
605 {
606 NoType,
607 Vector,
608 Raster,
609 Point,
610 Line,
611 Polygon,
612 TableLayer,
613 Database,
614 Table,
615 Plugin,
616 Mesh,
617 VectorTile,
618 PointCloud
619 };
620 Q_ENUM( BrowserLayerType )
621
622
628 {
629 Default,
630 NeverMonitor,
631 AlwaysMonitor,
632 };
633 Q_ENUM( BrowserDirectoryMonitoring )
634
635
639 enum class HttpMethod : int
640 {
641 Get = 0,
642 Post = 1
643 };
644 Q_ENUM( HttpMethod )
645
646
652 {
653 Success SIP_MONKEYPATCH_COMPAT_NAME( NoError ) = 0,
654 ErrorCreatingDataSource SIP_MONKEYPATCH_COMPAT_NAME( ErrCreateDataSource ),
655 ErrorCreatingLayer SIP_MONKEYPATCH_COMPAT_NAME( ErrCreateLayer ),
656 ErrorAttributeTypeUnsupported SIP_MONKEYPATCH_COMPAT_NAME( ErrAttributeTypeUnsupported ),
657 ErrorAttributeCreationFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrAttributeCreationFailed ),
658 ErrorProjectingFeatures SIP_MONKEYPATCH_COMPAT_NAME( ErrProjection ),
659 ErrorFeatureWriteFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrFeatureWriteFailed ),
660 ErrorInvalidLayer SIP_MONKEYPATCH_COMPAT_NAME( ErrInvalidLayer ),
661 ErrorInvalidProvider SIP_MONKEYPATCH_COMPAT_NAME( ErrInvalidProvider ),
662 ErrorProviderUnsupportedFeature SIP_MONKEYPATCH_COMPAT_NAME( ErrProviderUnsupportedFeature ),
663 ErrorConnectionFailed SIP_MONKEYPATCH_COMPAT_NAME( ErrConnectionFailed ),
664 UserCanceled SIP_MONKEYPATCH_COMPAT_NAME( ErrUserCanceled ),
665 };
666 Q_ENUM( VectorExportResult )
667
668
673 {
674 FieldAliases = 1 << 0,
675 FieldComments = 1 << 2,
676 };
677 Q_ENUM( VectorFileWriterCapability )
678
679
683 Q_DECLARE_FLAGS( VectorFileWriterCapabilities, VectorFileWriterCapability )
684 Q_FLAG( VectorFileWriterCapabilities )
685
686
691 {
692 SubsetStringFilter = 1 << 1,
693 GeometryColumn = 1 << 2,
694 PrimaryKeys = 1 << 3,
695 UnstableFeatureIds = 1 << 4
696 };
697 Q_ENUM( SqlLayerDefinitionCapability )
699 Q_DECLARE_FLAGS( SqlLayerDefinitionCapabilities, SqlLayerDefinitionCapability )
700 Q_FLAG( SqlLayerDefinitionCapabilities )
701
702
707 enum class SqlKeywordCategory : int
708 {
709 Keyword,
710 Constant,
711 Function,
712 Geospatial,
713 Operator,
714 Math,
715 Aggregate,
716 String,
717 Identifier
718 };
719 Q_ENUM( SqlKeywordCategory )
720
721
725 enum class DriveType : int
726 {
727 Unknown,
728 Invalid,
729 Removable,
730 Fixed,
731 Remote,
732 CdRom,
733 RamDisk,
734 Cloud,
735 };
736 Q_ENUM( DriveType )
737
738
743 {
744 Deferred SIP_MONKEYPATCH_COMPAT_NAME( DownloadLater ),
745 Immediate SIP_MONKEYPATCH_COMPAT_NAME( DownloadImmediately ),
746 };
747 Q_ENUM( ActionStart )
748
749
754 enum class UnplacedLabelVisibility : int
755 {
756 FollowEngineSetting,
757 NeverShow,
758 };
759 Q_ENUM( UnplacedLabelVisibility )
760
761
766 enum class LabelOverlapHandling : int
767 {
768 PreventOverlap,
769 AllowOverlapIfRequired,
770 AllowOverlapAtNoCost,
771 };
772 Q_ENUM( LabelOverlapHandling )
773
774
782 {
783 AroundPoint,
784 OverPoint,
785 Line,
786 Curved,
787 Horizontal,
788 Free,
789 OrderedPositionsAroundPoint,
790 PerimeterCurved,
791 OutsidePolygons,
792 };
793 Q_ENUM( LabelPlacement )
794
795
803 {
804 TopLeft,
805 TopSlightlyLeft,
806 TopMiddle,
807 TopSlightlyRight,
808 TopRight,
809 MiddleLeft,
810 MiddleRight,
811 BottomLeft,
812 BottomSlightlyLeft,
813 BottomMiddle,
814 BottomSlightlyRight,
815 BottomRight,
816 };
817 Q_ENUM( LabelPredefinedPointPosition )
818
819
828 {
829 FromPoint,
830 FromSymbolBounds,
831 };
832 Q_ENUM( LabelOffsetType )
833
834
842 {
843 AboveLeft SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAboveLeft ),
844 Above SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAbove ),
845 AboveRight SIP_MONKEYPATCH_COMPAT_NAME( QuadrantAboveRight ),
846 Left SIP_MONKEYPATCH_COMPAT_NAME( QuadrantLeft ),
847 Over SIP_MONKEYPATCH_COMPAT_NAME( QuadrantOver ),
848 Right SIP_MONKEYPATCH_COMPAT_NAME( QuadrantRight ),
849 BelowLeft SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelowLeft ),
850 Below SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelow ),
851 BelowRight SIP_MONKEYPATCH_COMPAT_NAME( QuadrantBelowRight ),
852 };
853 Q_ENUM( LabelQuadrantPosition )
854
855
862 {
863 OnLine = 1,
864 AboveLine = 2,
865 BelowLine = 4,
866 MapOrientation = 8,
867 };
868 Q_ENUM( LabelLinePlacementFlag )
869
870
877 Q_DECLARE_FLAGS( LabelLinePlacementFlags, LabelLinePlacementFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsLabeling, LinePlacementFlags )
878 Q_FLAG( LabelLinePlacementFlags )
879
887 {
888 AllowPlacementOutsideOfPolygon = 1 << 0,
889 AllowPlacementInsideOfPolygon = 1 << 1,
890 };
891 Q_ENUM( LabelPolygonPlacementFlag )
892
893
899 Q_DECLARE_FLAGS( LabelPolygonPlacementFlags, LabelPolygonPlacementFlag )
900 Q_FLAG( LabelPolygonPlacementFlags )
901
902
910 {
911 FlipUpsideDownLabels SIP_MONKEYPATCH_COMPAT_NAME( Upright ),
912 AllowUpsideDownWhenRotationIsDefined SIP_MONKEYPATCH_COMPAT_NAME( ShowDefined ),
913 AlwaysAllowUpsideDown SIP_MONKEYPATCH_COMPAT_NAME( ShowAll )
914 };
915 Q_ENUM( UpsideDownLabelHandling )
916
917
925 {
926 Left SIP_MONKEYPATCH_COMPAT_NAME( MultiLeft ) = 0,
927 Center SIP_MONKEYPATCH_COMPAT_NAME( MultiCenter ),
928 Right SIP_MONKEYPATCH_COMPAT_NAME( MultiRight ),
929 FollowPlacement SIP_MONKEYPATCH_COMPAT_NAME( MultiFollowPlacement ),
930 Justify SIP_MONKEYPATCH_COMPAT_NAME( MultiJustify ),
931 };
932 Q_ENUM( LabelMultiLineAlignment )
933
934
941 {
942 Vector SIP_MONKEYPATCH_COMPAT_NAME( FilterVector ) = 1,
943 Raster SIP_MONKEYPATCH_COMPAT_NAME( FilterRaster ),
944 Mesh SIP_MONKEYPATCH_COMPAT_NAME( FilterMesh ),
945 MeshDataset SIP_MONKEYPATCH_COMPAT_NAME( FilterMeshDataset ),
946 PointCloud SIP_MONKEYPATCH_COMPAT_NAME( FilterPointCloud ),
947 VectorTile,
948 };
949 Q_ENUM( FileFilterType )
950
951
956 enum class SublayerQueryFlag : int
957 {
958 FastScan = 1 << 0,
959 ResolveGeometryType = 1 << 1,
960 CountFeatures = 1 << 2,
961 IncludeSystemTables = 1 << 3,
962 };
964 Q_DECLARE_FLAGS( SublayerQueryFlags, SublayerQueryFlag )
965 Q_ENUM( SublayerQueryFlag )
966 Q_FLAG( SublayerQueryFlags )
967
968
973 enum class SublayerFlag : int
974 {
975 SystemTable = 1 << 0,
976 };
978 Q_DECLARE_FLAGS( SublayerFlags, SublayerFlag )
979 Q_ENUM( SublayerFlag )
980 Q_FLAG( SublayerFlags )
981
982
988 {
989 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownRole ) = 0,
990 Provider SIP_MONKEYPATCH_COMPAT_NAME( ProviderRole ) = 1,
991 Renderer SIP_MONKEYPATCH_COMPAT_NAME( RendererRole ) = 2,
992 Brightness SIP_MONKEYPATCH_COMPAT_NAME( BrightnessRole ) = 3,
993 Resampler SIP_MONKEYPATCH_COMPAT_NAME( ResamplerRole ) = 4,
994 Projector SIP_MONKEYPATCH_COMPAT_NAME( ProjectorRole ) = 5,
995 Nuller SIP_MONKEYPATCH_COMPAT_NAME( NullerRole ) = 6,
996 HueSaturation SIP_MONKEYPATCH_COMPAT_NAME( HueSaturationRole ) = 7,
997 };
998 Q_ENUM( RasterPipeInterfaceRole )
999
1000
1005 {
1007 ResampleFilter,
1009 Provider
1010 };
1011 Q_ENUM( RasterResamplingStage )
1012
1013
1018 enum class RasterRendererFlag : int
1019 {
1020 InternalLayerOpacityHandling = 1 << 0,
1021 };
1022
1028 Q_DECLARE_FLAGS( RasterRendererFlags, RasterRendererFlag )
1029
1030 Q_ENUM( RasterRendererFlag )
1031 Q_FLAG( RasterRendererFlags )
1032
1033
1039 {
1040 Generic = 0,
1041 PixelCount = 1,
1042 Name = 2,
1043 Min = 3,
1044 Max = 4,
1045 MinMax = 5,
1046 Red = 6,
1047 Green = 7,
1048 Blue = 8,
1049 Alpha = 9,
1050 RedMin = 10,
1051 GreenMin = 11,
1052 BlueMin = 12,
1053 AlphaMin = 13,
1054 RedMax = 14,
1055 GreenMax = 15,
1056 BlueMax = 16,
1057 AlphaMax = 17,
1058 MaxCount
1059 };
1060 Q_ENUM( RasterAttributeTableFieldUsage )
1061
1062
1068 {
1069 Thematic = 0,
1070 Athematic = 1
1071 };
1072 Q_ENUM( RasterAttributeTableType )
1073
1074
1081 {
1082 Raw = 0,
1083 RenderedImage SIP_MONKEYPATCH_COMPAT_NAME( Image ) = 1
1084 };
1085 Q_ENUM( RasterExportType )
1086
1087
1094 {
1095 Success SIP_MONKEYPATCH_COMPAT_NAME( NoError ) = 0,
1096 SourceProviderError = 1,
1097 DestinationProviderError SIP_MONKEYPATCH_COMPAT_NAME( DestProviderError ) = 2,
1098 CreateDatasourceError = 3,
1099 WriteError = 4,
1100 NoDataConflict = 5,
1101 Canceled SIP_MONKEYPATCH_COMPAT_NAME( WriteCanceled ) = 6,
1102 };
1103 Q_ENUM( RasterFileWriterResult )
1104
1105
1110 enum class MeshEditingErrorType : int
1111 {
1112 NoError,
1113 InvalidFace,
1114 TooManyVerticesInFace,
1115 FlatFace,
1116 UniqueSharedVertex,
1117 InvalidVertex,
1118 ManifoldFace,
1119 };
1120 Q_ENUM( MeshEditingErrorType )
1121
1122
1127 enum class FilePathType : int
1128 {
1129 Absolute,
1130 Relative,
1131 };
1132 Q_ENUM( FilePathType )
1133
1134
1139 enum class SublayerPromptMode : int
1140 {
1141 AlwaysAsk,
1142 AskExcludingRasterBands,
1143 NeverAskSkip,
1144 NeverAskLoadAll,
1145 };
1146 Q_ENUM( SublayerPromptMode )
1147
1148
1153 enum class FieldMetadataProperty : int
1154 {
1155 GeometryCrs = 0x1000,
1156 GeometryWkbType = 0x1001,
1157 CustomProperty = 0x100000,
1158 };
1159 Q_ENUM( FieldMetadataProperty )
1160
1161
1167 {
1168 SetSelection,
1169 AddToSelection,
1170 IntersectSelection,
1171 RemoveFromSelection,
1172 };
1173 Q_ENUM( SelectBehavior )
1174
1175
1181 {
1182 Intersect,
1183 Within,
1184 };
1185 Q_ENUM( SelectGeometryRelationship )
1186
1187
1192 enum class SelectionFlag : int
1193 {
1194 SingleFeatureSelection = 1 << 0,
1195 ToggleSelection = 1 << 1,
1196 };
1197
1203 Q_DECLARE_FLAGS( SelectionFlags, SelectionFlag )
1204
1205 Q_ENUM( SelectionFlag )
1206 Q_FLAG( SelectionFlags )
1207
1208
1214 {
1215 Success = 0,
1216 EmptyGeometry = 1,
1217 EditFailed = 2,
1218 FetchFeatureFailed = 3,
1219 InvalidLayer = 4,
1220 };
1221 Q_ENUM( VectorEditResult )
1222
1223
1229 {
1230 SemiTransparentCircle,
1231 Cross,
1232 NoMarker,
1233 };
1234 Q_ENUM( VertexMarkerType )
1235
1236
1240 enum class ContentStatus : int
1241 {
1242 NotStarted,
1243 Running,
1244 Finished,
1245 Failed,
1246 Canceled,
1247 };
1248 Q_ENUM( ContentStatus )
1249
1250
1255 enum class GpsConnectionType : int
1256 {
1257 Automatic,
1258 Internal,
1259 Serial,
1260 Gpsd,
1261 };
1262 Q_ENUM( GpsConnectionType )
1263
1264
1269 enum class DeviceConnectionStatus SIP_MONKEYPATCH_SCOPEENUM_UNNEST( Qgis, GpsConnectionStatus ) : int
1270 {
1271 Disconnected,
1272 Connecting,
1273 Connected,
1274 };
1275 Q_ENUM( DeviceConnectionStatus )
1276
1277
1285 {
1286 NoData,
1287 NoFix,
1288 Fix2D,
1289 Fix3D
1290 };
1292
1293
1300 {
1301 Unknown,
1302 Gps,
1303 Glonass,
1304 Galileo,
1305 BeiDou,
1306 Qzss,
1307 Navic,
1308 Sbas,
1309 };
1311
1318 {
1319 Unknown = -1,
1320 Invalid,
1321 GPS,
1322 DGPS,
1323 PPS,
1324 RTK,
1325 FloatRTK,
1326 Estimated,
1327 Manual,
1328 Simulation,
1329 };
1330 Q_ENUM( GpsQualityIndicator )
1331
1332
1338 {
1339 Location = 1 << 0,
1340 Altitude = 1 << 1,
1341 GroundSpeed = 1 << 2,
1342 Bearing = 1 << 3,
1343 TotalTrackLength = 1 << 4,
1344 TrackDistanceFromStart = 1 << 5,
1345 Pdop = 1 << 6,
1346 Hdop = 1 << 7,
1347 Vdop = 1 << 8,
1348 HorizontalAccuracy = 1 << 9,
1349 VerticalAccuracy = 1 << 10,
1350 HvAccuracy = 1 << 11,
1351 SatellitesUsed = 1 << 12,
1352 Timestamp = 1 << 13,
1353 TrackStartTime = 1 << 14,
1354 TrackEndTime = 1 << 15,
1355 TrackDistanceSinceLastPoint = 1 << 16,
1356 TrackTimeSinceLastPoint = 1 << 17,
1357 GeoidalSeparation = 1 << 18,
1358 EllipsoidAltitude = 1 << 19,
1359 };
1360
1366 Q_DECLARE_FLAGS( GpsInformationComponents, GpsInformationComponent )
1367 Q_ENUM( GpsInformationComponent )
1368 Q_FLAG( GpsInformationComponents )
1369
1370
1375 enum class BabelFormatCapability : int
1376 {
1377 Import = 1 << 0,
1378 Export = 1 << 1,
1379 Waypoints = 1 << 2,
1380 Routes = 1 << 3,
1381 Tracks = 1 << 4,
1382 };
1384 Q_DECLARE_FLAGS( BabelFormatCapabilities, BabelFormatCapability )
1385 Q_ENUM( BabelFormatCapability )
1386 Q_FLAG( BabelFormatCapabilities )
1387
1388
1394 enum class BabelCommandFlag : int
1395 {
1396 QuoteFilePaths = 1 << 0,
1397 };
1399 Q_DECLARE_FLAGS( BabelCommandFlags, BabelCommandFlag )
1400 Q_ENUM( BabelCommandFlag )
1401 Q_FLAG( BabelCommandFlags )
1402
1403
1408 enum class GpsFeatureType : int
1409 {
1410 Waypoint,
1411 Route,
1412 Track,
1413 };
1414 Q_ENUM( GpsFeatureType )
1415
1416
1424 {
1425 Success = 0,
1426 NothingHappened = 1000,
1427 InvalidBaseGeometry,
1428 InvalidInputGeometryType,
1429 SelectionIsEmpty,
1430 SelectionIsGreaterThanOne,
1431 GeometryEngineError,
1432 LayerNotEditable,
1433 // Add part issues
1434 AddPartSelectedGeometryNotFound,
1435 AddPartNotMultiGeometry,
1436 // Add ring issues
1437 AddRingNotClosed,
1438 AddRingNotValid,
1439 AddRingCrossesExistingRings,
1440 AddRingNotInExistingFeature,
1441 // Split features
1442 SplitCannotSplitPoint,
1443 };
1444 Q_ENUM( GeometryOperationResult )
1445
1446
1452 {
1453 AllowSelfTouchingHoles SIP_MONKEYPATCH_COMPAT_NAME( FlagAllowSelfTouchingHoles ) = 1 << 0,
1454 };
1457 Q_ENUM( GeometryValidityFlag )
1458 Q_FLAG( GeometryValidityFlags )
1459
1460
1465 {
1466 QgisInternal SIP_MONKEYPATCH_COMPAT_NAME( ValidatorQgisInternal ),
1467 Geos SIP_MONKEYPATCH_COMPAT_NAME( ValidatorGeos ),
1468 };
1469 Q_ENUM( GeometryValidationEngine )
1470
1471
1477 {
1478 Left SIP_MONKEYPATCH_COMPAT_NAME( SideLeft ) = 0,
1479 Right SIP_MONKEYPATCH_COMPAT_NAME( SideRight ),
1480 };
1481 Q_ENUM( BufferSide )
1482
1483
1489 {
1490 Round SIP_MONKEYPATCH_COMPAT_NAME( CapRound ) = 1,
1491 Flat SIP_MONKEYPATCH_COMPAT_NAME( CapFlat ),
1492 Square SIP_MONKEYPATCH_COMPAT_NAME( CapSquare ),
1493 };
1494 Q_ENUM( EndCapStyle )
1495
1496
1502 {
1503 Round SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleRound ) = 1,
1504 Miter SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleMiter ),
1505 Bevel SIP_MONKEYPATCH_COMPAT_NAME( JoinStyleBevel ),
1506 };
1507 Q_ENUM( JoinStyle )
1508
1509
1514 enum class MakeValidMethod : int
1515 {
1516 Linework = 0,
1517 Structure = 1,
1518 };
1519 Q_ENUM( MakeValidMethod )
1520
1521
1526 enum class SpatialFilterType : int
1527 {
1528 NoFilter,
1529 BoundingBox,
1530 DistanceWithin,
1531 };
1532 Q_ENUM( SpatialFilterType )
1533
1534
1539 enum class FileOperationFlag : int
1540 {
1541 IncludeMetadataFile = 1 << 0,
1542 IncludeStyleFile = 1 << 1,
1543 };
1545 Q_DECLARE_FLAGS( FileOperationFlags, FileOperationFlag )
1546 Q_ENUM( FileOperationFlag )
1547 Q_FLAG( FileOperationFlags )
1548
1549
1554 enum class MapLayerProperty : int
1555 {
1556 UsersCannotToggleEditing = 1 << 0,
1557 IsBasemapLayer = 1 << 1,
1558 };
1560 Q_DECLARE_FLAGS( MapLayerProperties, MapLayerProperty )
1561 Q_ENUM( MapLayerProperty )
1562 Q_FLAG( MapLayerProperties )
1563
1564
1569 enum class DataProviderFlag : int
1570 {
1571 IsBasemapSource = 1 << 1,
1572 };
1574 Q_DECLARE_FLAGS( DataProviderFlags, DataProviderFlag )
1575 Q_ENUM( DataProviderFlag )
1576 Q_FLAG( DataProviderFlags )
1577
1578
1585 enum class CrsAxisDirection : int
1586 {
1587 North,
1588 NorthNorthEast,
1589 NorthEast,
1590 EastNorthEast,
1591 East,
1592 EastSouthEast,
1593 SouthEast,
1594 SouthSouthEast,
1595 South,
1596 SouthSouthWest,
1597 SouthWest,
1598 WestSouthWest,
1599 West,
1600 WestNorthWest,
1601 NorthWest,
1602 NorthNorthWest,
1603 GeocentricX,
1604 GeocentricY,
1605 GeocentricZ,
1606 Up,
1607 Down,
1608 Forward,
1609 Aft,
1610 Port,
1611 Starboard,
1612 Clockwise,
1613 CounterClockwise,
1614 ColumnPositive,
1615 ColumnNegative,
1616 RowPositive,
1617 RowNegative,
1618 DisplayRight,
1619 DisplayLeft,
1620 DisplayUp,
1621 DisplayDown,
1622 Future,
1623 Past,
1624 Towards,
1625 AwayFrom,
1626 Unspecified,
1627 };
1628 Q_ENUM( CrsAxisDirection )
1629
1630
1635 enum class CoordinateOrder : int
1636 {
1637 Default,
1638 XY,
1639 YX,
1640 };
1641 Q_ENUM( CoordinateOrder )
1642
1643
1648 enum class AnnotationItemFlag : int
1649 {
1650 ScaleDependentBoundingBox = 1 << 0,
1651 };
1653 Q_DECLARE_FLAGS( AnnotationItemFlags, AnnotationItemFlag )
1654 Q_ENUM( AnnotationItemFlag )
1655 Q_FLAG( AnnotationItemFlags )
1656
1657
1662 enum class AnnotationItemGuiFlag : int
1663 {
1664 FlagNoCreationTools = 1 << 0,
1665 };
1667 Q_DECLARE_FLAGS( AnnotationItemGuiFlags, AnnotationItemGuiFlag )
1668 Q_ENUM( AnnotationItemGuiFlag )
1669 Q_FLAG( AnnotationItemGuiFlags )
1670
1671
1676 enum class AnnotationItemNodeType : int
1677 {
1678 VertexHandle,
1679 };
1680 Q_ENUM( AnnotationItemNodeType )
1681
1682
1688 {
1689 Success,
1690 Invalid,
1691 ItemCleared,
1692 };
1693 Q_ENUM( AnnotationItemEditOperationResult )
1694
1695
1701 {
1702 FixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ModeFixedTemporalRange ) = 0,
1703 FeatureDateTimeInstantFromField SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeInstantFromField ),
1704 FeatureDateTimeStartAndEndFromFields SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndEndFromFields ),
1705 FeatureDateTimeStartAndDurationFromFields SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndDurationFromFields ),
1706 FeatureDateTimeStartAndEndFromExpressions SIP_MONKEYPATCH_COMPAT_NAME( ModeFeatureDateTimeStartAndEndFromExpressions ),
1707 RedrawLayerOnly SIP_MONKEYPATCH_COMPAT_NAME( ModeRedrawLayerOnly ),
1708 };
1709 Q_ENUM( VectorTemporalMode )
1710
1711
1717 {
1718 IncludeBeginExcludeEnd = 0,
1719 IncludeBeginIncludeEnd,
1720 };
1721 Q_ENUM( VectorTemporalLimitMode )
1722
1723
1729 {
1730 HasFixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ProviderHasFixedTemporalRange ) = 0,
1731 StoresFeatureDateTimeInstantInField SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeInstantInField ),
1732 StoresFeatureDateTimeStartAndEndInSeparateFields SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeStartAndEndInSeparateFields ),
1733 };
1734 Q_ENUM( VectorDataProviderTemporalMode )
1735
1736
1742 {
1743 FixedTemporalRange SIP_MONKEYPATCH_COMPAT_NAME( ModeFixedTemporalRange ) = 0,
1744 TemporalRangeFromDataProvider SIP_MONKEYPATCH_COMPAT_NAME( ModeTemporalRangeFromDataProvider ) = 1,
1745 RedrawLayerOnly SIP_MONKEYPATCH_COMPAT_NAME( ModeRedrawLayerOnly ) = 2,
1746 };
1747 Q_ENUM( RasterTemporalMode )
1748
1749
1755 {
1756 MatchUsingWholeRange,
1757 MatchExactUsingStartOfRange,
1758 MatchExactUsingEndOfRange,
1759 FindClosestMatchToStartOfRange,
1760 FindClosestMatchToEndOfRange
1761 };
1762 Q_ENUM( TemporalIntervalMatchMethod )
1763
1764
1770 {
1771 RequestedTimesMustExactlyMatchAllAvailableTemporalRanges = 1 << 0,
1772 };
1773 Q_ENUM( RasterTemporalCapabilityFlag )
1774
1775
1780 Q_DECLARE_FLAGS( RasterTemporalCapabilityFlags, RasterTemporalCapabilityFlag )
1781 Q_FLAG( RasterTemporalCapabilityFlags )
1782
1783
1789 {
1790 Forward SIP_MONKEYPATCH_COMPAT_NAME( ForwardTransform ),
1791 Reverse SIP_MONKEYPATCH_COMPAT_NAME( ReverseTransform )
1792 };
1793 Q_ENUM( TransformDirection )
1794
1795
1801 {
1802 BallparkTransformsAreAppropriate = 1 << 0,
1803 IgnoreImpossibleTransformations = 1 << 1,
1804 };
1805 Q_ENUM( CoordinateTransformationFlag )
1806
1807
1812 Q_DECLARE_FLAGS( CoordinateTransformationFlags, CoordinateTransformationFlag )
1813 Q_FLAG( CoordinateTransformationFlags )
1814
1815
1821 {
1822 Antialiasing = 0x01,
1823 DrawEditingInfo = 0x02,
1824 ForceVectorOutput = 0x04,
1825 UseAdvancedEffects = 0x08,
1826 DrawLabeling = 0x10,
1827 UseRenderingOptimization = 0x20,
1828 DrawSelection = 0x40,
1829 DrawSymbolBounds = 0x80,
1830 RenderMapTile = 0x100,
1831 RenderPartialOutput = 0x200,
1832 RenderPreviewJob = 0x400,
1833 RenderBlocking = 0x800,
1834 LosslessImageRendering = 0x1000,
1835 Render3DMap = 0x2000,
1836 HighQualityImageTransforms = 0x4000,
1837 SkipSymbolRendering = 0x8000,
1838 ForceRasterMasks = 0x10000,
1839 };
1842 Q_ENUM( MapSettingsFlag )
1843 Q_FLAG( MapSettingsFlags )
1844
1845
1851 {
1852 DrawEditingInfo = 0x01,
1853 ForceVectorOutput = 0x02,
1854 UseAdvancedEffects = 0x04,
1855 UseRenderingOptimization = 0x08,
1856 DrawSelection = 0x10,
1857 DrawSymbolBounds = 0x20,
1858 RenderMapTile = 0x40,
1859 Antialiasing = 0x80,
1860 RenderPartialOutput = 0x100,
1861 RenderPreviewJob = 0x200,
1862 RenderBlocking = 0x400,
1863 RenderSymbolPreview = 0x800,
1864 LosslessImageRendering = 0x1000,
1865 ApplyScalingWorkaroundForTextRendering = 0x2000,
1866 Render3DMap = 0x4000,
1867 ApplyClipAfterReprojection = 0x8000,
1868 RenderingSubSymbol = 0x10000,
1869 HighQualityImageTransforms = 0x20000,
1870 SkipSymbolRendering = 0x40000,
1871 };
1874 Q_ENUM( RenderContextFlag )
1875 Q_FLAG( RenderContextFlags )
1876
1877 // refs for below dox: https://github.com/qgis/QGIS/pull/1286#issuecomment-39806854
1878 // https://github.com/qgis/QGIS/pull/8573#issuecomment-445585826
1879
1880
1885 {
1886 AlwaysOutlines SIP_MONKEYPATCH_COMPAT_NAME( TextFormatAlwaysOutlines ),
1887 AlwaysText SIP_MONKEYPATCH_COMPAT_NAME( TextFormatAlwaysText ),
1888 };
1889 Q_ENUM( TextRenderFormat )
1890
1891
1899 {
1900 UseAllLabels = 1 << 1,
1901 UsePartialCandidates = 1 << 2,
1902 // TODO QGIS 4.0: remove
1903 RenderOutlineLabels = 1 << 3,
1904 DrawLabelRectOnly = 1 << 4,
1905 DrawCandidates = 1 << 5,
1906 DrawUnplacedLabels = 1 << 6,
1907 CollectUnplacedLabels = 1 << 7,
1908 DrawLabelMetrics = 1 << 8,
1909 };
1910 Q_ENUM( LabelingFlag )
1911
1912
1919 Q_DECLARE_FLAGS( LabelingFlags, LabelingFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsLabelingEngineSettings, Flags )
1920 Q_FLAG( LabelingFlags )
1921
1930 {
1931 Version1 SIP_MONKEYPATCH_COMPAT_NAME( PlacementEngineVersion1 ),
1932 Version2 SIP_MONKEYPATCH_COMPAT_NAME( PlacementEngineVersion2 ),
1933 };
1934 Q_ENUM( LabelPlacementEngineVersion )
1935
1936
1944 {
1945 Horizontal SIP_MONKEYPATCH_COMPAT_NAME( HorizontalOrientation ),
1946 Vertical SIP_MONKEYPATCH_COMPAT_NAME( VerticalOrientation ),
1947 RotationBased SIP_MONKEYPATCH_COMPAT_NAME( RotationBasedOrientation ),
1948 };
1949 Q_ENUM( TextOrientation )
1950
1951
1959 {
1960 Rectangle SIP_MONKEYPATCH_COMPAT_NAME( Rect ),
1961 Point,
1962 Labeling SIP_MONKEYPATCH_COMPAT_NAME( Label ),
1963 RectangleCapHeightBased,
1964 RectangleAscentBased,
1965 };
1966 Q_ENUM( TextLayoutMode )
1967
1968
1976 {
1977 Text,
1978 Buffer,
1979 Background,
1980 Shadow,
1981 };
1982 Q_ENUM( TextComponent )
1983
1984
1992 {
1993 Left SIP_MONKEYPATCH_COMPAT_NAME( AlignLeft ),
1994 Center SIP_MONKEYPATCH_COMPAT_NAME( AlignCenter ),
1995 Right SIP_MONKEYPATCH_COMPAT_NAME( AlignRight ),
1996 Justify SIP_MONKEYPATCH_COMPAT_NAME( AlignJustify ),
1997 };
1998 Q_ENUM( TextHorizontalAlignment )
1999
2000
2011 {
2012 Top SIP_MONKEYPATCH_COMPAT_NAME( AlignTop ),
2013 VerticalCenter SIP_MONKEYPATCH_COMPAT_NAME( AlignVCenter ),
2014 Bottom SIP_MONKEYPATCH_COMPAT_NAME( AlignBottom ),
2015 };
2016 Q_ENUM( TextVerticalAlignment )
2017
2018
2027 {
2028 Normal,
2029 SuperScript,
2030 SubScript,
2031 };
2032 Q_ENUM( TextCharacterVerticalAlignment )
2033
2034
2040 {
2041 Generic,
2042 ShadowOffset,
2043 BlurSize,
2044 GlowSpread,
2045 };
2046 Q_ENUM( RenderSubcomponentProperty )
2047
2048
2053 {
2054 Segment SIP_MONKEYPATCH_COMPAT_NAME( SegmentVertex ) = 1,
2055 Curve SIP_MONKEYPATCH_COMPAT_NAME( CurveVertex ) = 2,
2056 };
2057 Q_ENUM( VertexType )
2058
2059
2067 {
2068 Square,
2069 Diamond,
2070 Pentagon,
2071 Hexagon,
2072 Triangle,
2073 EquilateralTriangle,
2074 Star,
2075 Arrow,
2076 Circle,
2077 Cross,
2078 CrossFill,
2079 Cross2,
2080 Line,
2081 ArrowHead,
2082 ArrowHeadFilled,
2083 SemiCircle,
2084 ThirdCircle,
2085 QuarterCircle,
2086 QuarterSquare,
2087 HalfSquare,
2088 DiagonalHalfSquare,
2089 RightHalfTriangle,
2090 LeftHalfTriangle,
2091 Octagon,
2092 SquareWithCorners,
2093 AsteriskFill,
2094 HalfArc,
2095 ThirdArc,
2096 QuarterArc,
2097 ParallelogramRight,
2098 ParallelogramLeft,
2099 Trapezoid,
2100 Shield,
2101 DiamondStar,
2102 Heart,
2103 Decagon,
2104 RoundedSquare,
2105 };
2106 Q_ENUM( MarkerShape )
2107
2108
2116 {
2117 Interval = 1 << 0,
2118 Vertex = 1 << 1,
2119 LastVertex = 1 << 2,
2120 FirstVertex = 1 << 3,
2121 CentralPoint = 1 << 4,
2122 CurvePoint = 1 << 5,
2123 SegmentCenter = 1 << 6,
2124 InnerVertices = 1 << 7,
2125 };
2126 Q_ENUM( MarkerLinePlacement )
2127 Q_DECLARE_FLAGS( MarkerLinePlacements, MarkerLinePlacement )
2128 Q_FLAG( MarkerLinePlacements )
2129
2130
2138 {
2139 SimpleTwoColor,
2140 ColorRamp,
2141 };
2142 Q_ENUM( GradientColorSource )
2143
2144
2152 {
2153 Linear,
2154 Radial,
2155 Conical,
2156 };
2157 Q_ENUM( GradientType )
2158
2159
2167 {
2168 Feature,
2169 Viewport,
2170 };
2171 Q_ENUM( SymbolCoordinateReference )
2172
2173
2182 {
2183 Pad,
2184 Reflect,
2185 Repeat,
2186 };
2187 Q_ENUM( GradientSpread )
2188
2189
2197 {
2198 Absolute SIP_MONKEYPATCH_COMPAT_NAME( AbsoluteCount ),
2199 DensityBased SIP_MONKEYPATCH_COMPAT_NAME( DensityBasedCount ),
2200 };
2201 Q_ENUM( PointCountMethod )
2202
2203
2208 enum class MarkerClipMode : int
2209 {
2210 NoClipping,
2211 Shape,
2212 CentroidWithin,
2213 CompletelyWithin,
2214 };
2215 Q_ENUM( MarkerClipMode )
2216
2217
2222 enum class LineClipMode : int
2223 {
2224 ClipPainterOnly,
2225 ClipToIntersection,
2226 NoClipping,
2227 };
2228 Q_ENUM( LineClipMode )
2229
2230
2236 {
2237 NoRule,
2238 FullDash,
2239 HalfDash,
2240 FullGap,
2241 HalfGap,
2242 };
2243 Q_ENUM( DashPatternLineEndingRule )
2244
2245
2251 {
2252 ScaleBothDashAndGap,
2253 ScaleDashOnly,
2254 ScaleGapOnly,
2255 };
2256 Q_ENUM( DashPatternSizeAdjustment )
2257
2258
2266 {
2267 Color SIP_MONKEYPATCH_COMPAT_NAME( GraduatedColor ),
2268 Size SIP_MONKEYPATCH_COMPAT_NAME( GraduatedSize ),
2269 };
2270 Q_ENUM( GraduatedMethod )
2271
2272
2278 {
2279 NoLabels,
2280 EveryLabel,
2281 FirstLabel,
2282 LastLabel,
2283 FirstAndLastLabels,
2284 };
2285 Q_ENUM( PlotAxisSuffixPlacement )
2286
2287
2291 enum class DpiMode
2292 {
2293 All = 7,
2294 Off = 0,
2295 QGIS = 1,
2296 UMN = 2,
2297 GeoServer = 4,
2298 };
2299 Q_ENUM( DpiMode )
2300
2301
2306 {
2307 Undefined = 0,
2308 StandardDpi = 1,
2309 HighDpi = 2,
2310 };
2311 Q_ENUM( TilePixelRatio )
2312
2313 // NOTE -- the hardcoded numbers here must match QFont::Capitalization!
2314
2315
2323 {
2324 MixedCase = 0,
2325 AllUppercase = 1,
2326 AllLowercase = 2,
2327 ForceFirstLetterToCapital = 4,
2328 SmallCaps = 5,
2329 TitleCase = 1004,
2330 UpperCamelCase = 1005,
2331 AllSmallCaps = 1006,
2332 };
2333 Q_ENUM( Capitalization )
2334
2335
2340 enum class TextRendererFlag : int
2341 {
2342 WrapLines = 1 << 0,
2343 };
2344 Q_ENUM( TextRendererFlag )
2345 Q_DECLARE_FLAGS( TextRendererFlags, TextRendererFlag )
2346 Q_FLAG( TextRendererFlags )
2347
2348
2354 {
2355 MapBox,
2356 Esri,
2357 };
2359
2366 {
2367 Clockwise,
2368 CounterClockwise,
2369 };
2370 Q_ENUM( AngularDirection )
2371
2372
2377 enum class RendererUsage : int
2378 {
2379 View,
2380 Export,
2381 Unknown,
2382 };
2383 Q_ENUM( RendererUsage )
2384
2385
2390 enum class ViewSyncModeFlag : int
2391 {
2392 Sync3DTo2D = 1 << 0,
2393 Sync2DTo3D = 1 << 1,
2394 };
2395 Q_ENUM( ViewSyncModeFlag )
2396 Q_DECLARE_FLAGS( ViewSyncModeFlags, ViewSyncModeFlag )
2397
2398
2404 {
2405 Always,
2406 WhenOutsideVisibleExtent,
2407 Never,
2408 };
2409 Q_ENUM( MapRecenteringMode )
2410
2411
2416 enum class HistoryProviderBackend : int
2417 {
2418 LocalProfile = 1 << 0,
2419// Project = 1 << 1, //!< QGIS Project (not yet implemented)
2420 };
2421 Q_ENUM( HistoryProviderBackend )
2422 Q_DECLARE_FLAGS( HistoryProviderBackends, HistoryProviderBackend )
2423 Q_FLAG( HistoryProviderBackends )
2424
2425
2431 {
2432 Wkt SIP_MONKEYPATCH_COMPAT_NAME( FormatWkt ),
2433 Proj SIP_MONKEYPATCH_COMPAT_NAME( FormatProj ),
2434 };
2435 Q_ENUM( CrsDefinitionFormat )
2436
2437
2445 enum class FieldDomainSplitPolicy : int
2446 {
2447 DefaultValue,
2448 Duplicate,
2449 GeometryRatio,
2450 UnsetField,
2451 };
2452 Q_ENUM( FieldDomainSplitPolicy )
2453
2454
2462 enum class FieldDomainMergePolicy : int
2463 {
2464 DefaultValue,
2465 Sum,
2466 GeometryWeighted,
2467 };
2468 Q_ENUM( FieldDomainMergePolicy )
2469
2470
2475 enum class FieldDomainType : int
2476 {
2477 Coded,
2478 Range,
2479 Glob,
2480 };
2481 Q_ENUM( FieldDomainType )
2482
2483
2488 enum class TransactionMode : int
2489 {
2490 Disabled = 0,
2491 AutomaticGroups = 1,
2492 BufferedGroups = 2,
2493 };
2494 Q_ENUM( TransactionMode )
2495
2496
2501 enum class AltitudeClamping : int
2502 {
2503 Absolute,
2504 Relative,
2505 Terrain,
2506 };
2507 Q_ENUM( AltitudeClamping )
2508
2509
2514 enum class AltitudeBinding : int
2515 {
2516 Vertex,
2517 Centroid,
2518 };
2519 Q_ENUM( AltitudeBinding )
2520
2521
2527 {
2528 NoConstraint,
2529 Perpendicular,
2530 Parallel
2531 };
2532 Q_ENUM( BetweenLineConstraint )
2533
2534
2539 enum class LineExtensionSide : int
2540 {
2541 BeforeVertex,
2542 AfterVertex,
2543 NoVertex,
2544 };
2545 Q_ENUM( LineExtensionSide )
2546
2547
2548
2552 enum class CadConstraintType : int
2553 {
2554 Generic,
2555 Angle,
2556 Distance,
2557 XCoordinate,
2558 YCoordinate,
2559 ZValue,
2560 MValue,
2561 };
2562 Q_ENUM( CadConstraintType )
2563
2564
2565
2570 enum class ProjectFlag : int
2571 {
2572 EvaluateDefaultValuesOnProviderSide = 1 << 0,
2573 TrustStoredLayerStatistics = 1 << 1,
2574 RememberLayerEditStatusBetweenSessions = 1 << 2,
2575 RememberAttributeTableWindowsBetweenSessions = 1 << 3,
2576 };
2577 Q_ENUM( ProjectFlag )
2578 Q_DECLARE_FLAGS( ProjectFlags, ProjectFlag )
2579 Q_FLAG( ProjectFlags )
2580
2581
2586 enum class PlotToolFlag : int
2587 {
2588 ShowContextMenu = 1 << 0,
2589 };
2590 Q_ENUM( PlotToolFlag )
2591 Q_DECLARE_FLAGS( PlotToolFlags, PlotToolFlag )
2592 Q_FLAG( PlotToolFlags )
2593
2594
2599 enum class LightSourceType : int
2600 {
2601 Point,
2602 Directional,
2603 };
2604 Q_ENUM( LightSourceType )
2605
2606
2611 enum class NavigationMode : int
2612 {
2613 TerrainBased,
2614 Walk
2615 };
2616 Q_ENUM( NavigationMode )
2617
2618
2623 enum class VerticalAxisInversion : int
2624 {
2625 Never,
2626 WhenDragging,
2627 Always,
2628 };
2629 Q_ENUM( VerticalAxisInversion )
2630
2631
2637 {
2638 Line,
2639 FillBelow,
2640 FillAbove,
2641 };
2643
2649 enum class VectorProfileType : int
2650 {
2651 IndividualFeatures,
2652 ContinuousSurface,
2653 };
2655
2661 enum class ProfileGeneratorFlag : int
2662 {
2663 RespectsMaximumErrorMapUnit = 1 << 0,
2664 RespectsDistanceRange = 1 << 1,
2665 RespectsElevationRange = 1 << 2,
2666 };
2667 Q_ENUM( ProfileGeneratorFlag )
2668 Q_DECLARE_FLAGS( ProfileGeneratorFlags, ProfileGeneratorFlag )
2669 Q_FLAG( ProfileGeneratorFlags )
2670
2671
2676 enum class ProfileExportType : int
2677 {
2678 Features3D,
2679 Profile2D,
2680 DistanceVsElevationTable,
2681 };
2683
2690 {
2691 Square,
2692 Circle,
2693 };
2694 Q_ENUM( PointCloudSymbol )
2695
2696
2702 {
2703 Default,
2704 BottomToTop,
2705 TopToBottom,
2706 };
2707 Q_ENUM( PointCloudDrawOrder )
2708
2709
2717 {
2718 AllowIntersections,
2719 AvoidIntersectionsCurrentLayer,
2720 AvoidIntersectionsLayers,
2721 };
2722 Q_ENUM( AvoidIntersectionsMode )
2723
2724
2732 {
2733 Qgz,
2734 Qgs,
2735 };
2736 Q_ENUM( ProjectFileFormat )
2737
2738
2746 {
2747 DontResolveLayers SIP_MONKEYPATCH_COMPAT_NAME( FlagDontResolveLayers ) = 1 << 0,
2748 DontLoadLayouts SIP_MONKEYPATCH_COMPAT_NAME( FlagDontLoadLayouts ) = 1 << 1,
2749 TrustLayerMetadata SIP_MONKEYPATCH_COMPAT_NAME( FlagTrustLayerMetadata ) = 1 << 2,
2750 DontStoreOriginalStyles SIP_MONKEYPATCH_COMPAT_NAME( FlagDontStoreOriginalStyles ) = 1 << 3,
2751 DontLoad3DViews SIP_MONKEYPATCH_COMPAT_NAME( FlagDontLoad3DViews ) = 1 << 4,
2752 DontLoadProjectStyles = 1 << 5,
2753 ForceReadOnlyLayers = 1 << 6,
2754 };
2755 Q_ENUM( ProjectReadFlag )
2756
2757
2764 Q_DECLARE_FLAGS( ProjectReadFlags, ProjectReadFlag ) SIP_MONKEYPATCH_FLAGS_UNNEST( QgsProject, ReadFlags )
2765 Q_FLAG( ProjectReadFlags )
2766
2775 enum class ProjectCapability : int
2776 {
2777 ProjectStyles = 1 << 0,
2778 };
2779 Q_ENUM( ProjectCapability )
2780
2781
2786 Q_DECLARE_FLAGS( ProjectCapabilities, ProjectCapability )
2787 Q_FLAG( ProjectCapabilities )
2788
2789
2795 {
2796 Vector,
2797 Raster,
2798 RasterDem,
2799 GeoJson,
2800 Image,
2801 Video,
2802 Unknown,
2803 };
2804 Q_ENUM( MapBoxGlStyleSourceType )
2805
2806
2814 {
2815 FeatureServer SIP_MONKEYPATCH_COMPAT_NAME( FeatureService ),
2816 MapServer SIP_MONKEYPATCH_COMPAT_NAME( MapService ),
2817 ImageServer SIP_MONKEYPATCH_COMPAT_NAME( ImageService ),
2818 GlobeServer,
2819 GPServer,
2820 GeocodeServer,
2821 Unknown,
2822 };
2823 Q_ENUM( ArcGisRestServiceType )
2824
2825
2833 {
2834 Normal,
2835 Generated,
2836 };
2837 Q_ENUM( RelationshipType )
2838
2839
2847 {
2848 Association,
2849 Composition,
2850 };
2851 Q_ENUM( RelationshipStrength )
2852
2853
2859 {
2860 OneToOne,
2861 OneToMany,
2862 ManyToOne,
2863 ManyToMany,
2864 };
2865 Q_ENUM( RelationshipCardinality )
2866
2867
2872 enum class RelationshipCapability : int
2873 {
2874 MultipleFieldKeys = 1 << 0,
2875 ForwardPathLabel = 1 << 1,
2876 BackwardPathLabel = 1 << 2,
2877 };
2878 Q_ENUM( RelationshipCapability )
2879
2880
2885 Q_DECLARE_FLAGS( RelationshipCapabilities, RelationshipCapability )
2886 Q_FLAG( RelationshipCapabilities )
2887
2888
2893 enum class CoordinateDisplayType : int
2894 {
2895 MapCrs,
2896 MapGeographic,
2897 CustomCrs,
2898 };
2899 Q_ENUM( CoordinateDisplayType )
2900
2901
2906 enum class SettingsOrigin : int
2907 {
2908 Any,
2909 Global,
2910 Local,
2911 };
2912 Q_ENUM( SettingsOrigin )
2913
2914
2919 enum class ScriptLanguage : int
2920 {
2921 Css,
2922 QgisExpression,
2923 Html,
2924 JavaScript,
2925 Json,
2926 Python,
2927 R,
2928 Sql,
2929 Batch,
2930 Bash,
2931 Unknown,
2932 };
2933 Q_ENUM( ScriptLanguage )
2934
2935
2943 {
2944 Reformat = 1 << 0,
2945 CheckSyntax = 1 << 1,
2946 ToggleComment = 1 << 2,
2947 };
2948 Q_ENUM( ScriptLanguageCapability )
2949
2950
2955 Q_DECLARE_FLAGS( ScriptLanguageCapabilities, ScriptLanguageCapability )
2956 Q_FLAG( ScriptLanguageCapabilities )
2957
2958
2964 {
2965 AboveInsertionPoint,
2966 TopOfTree,
2967 OptimalInInsertionGroup,
2968 };
2969 Q_ENUM( LayerTreeInsertionMethod )
2970
2971
2976 enum class LayerTreeFilterFlag : int
2977 {
2978 SkipVisibilityCheck = 1 << 0,
2979 };
2980 Q_ENUM( LayerTreeFilterFlag )
2981
2982
2987 Q_DECLARE_FLAGS( LayerTreeFilterFlags, LayerTreeFilterFlag )
2988 Q_FLAG( LayerTreeFilterFlags )
2989
2990
2997 enum class ActionType : int
2998 {
2999 Invalid,
3000 MapLayerAction,
3001 AttributeAction
3002 };
3003 Q_ENUM( ActionType )
3004
3005
3012 enum class MapLayerActionTarget : int
3013 {
3014 Layer = 1 << 0,
3015 SingleFeature = 1 << 1,
3016 MultipleFeatures = 1 << 2,
3017 AllActions = Layer | SingleFeature | MultipleFeatures
3018 };
3019 Q_ENUM( MapLayerActionTarget )
3020
3021
3028 Q_DECLARE_FLAGS( MapLayerActionTargets, MapLayerActionTarget )
3029 Q_FLAG( MapLayerActionTargets )
3030
3031
3038 enum class MapLayerActionFlag : int
3039 {
3040 EnabledOnlyWhenEditable = 1 << 1,
3041 };
3042 Q_ENUM( MapLayerActionFlag )
3043
3044
3051 Q_DECLARE_FLAGS( MapLayerActionFlags, MapLayerActionFlag )
3052 Q_FLAG( MapLayerActionFlags )
3053
3054
3062 {
3063 Generic,
3064 GenericPython,
3065 Mac,
3066 Windows,
3067 Unix,
3068 OpenUrl,
3069 SubmitUrlEncoded,
3070 SubmitUrlMultipart,
3071 };
3072 Q_ENUM( AttributeActionType )
3073
3074
3080 {
3081 Created,
3082 Published,
3083 Revised,
3084 Superseded,
3085 };
3086 Q_ENUM( MetadataDateType )
3087
3088
3098 {
3099 Undefined SIP_MONKEYPATCH_COMPAT_NAME( UndefinedColorInterpretation ) = 0,
3100 GrayIndex = 1,
3101 PaletteIndex = 2,
3102 RedBand = 3,
3103 GreenBand = 4,
3104 BlueBand = 5,
3105 AlphaBand = 6,
3106 HueBand = 7,
3107 SaturationBand = 8,
3108 LightnessBand = 9,
3109 CyanBand = 10,
3110 MagentaBand = 11,
3111 YellowBand = 12,
3112 BlackBand = 13,
3113 YCbCr_YBand = 14,
3114 YCbCr_CbBand = 15,
3115 YCbCr_CrBand = 16,
3116 ContinuousPalette = 17
3117 };
3118 Q_ENUM( RasterColorInterpretation )
3119
3120
3128 {
3129 GrayOrUndefined,
3130 Palette,
3131 MultiBand SIP_MONKEYPATCH_COMPAT_NAME( Multiband ),
3132 SingleBandColorData SIP_MONKEYPATCH_COMPAT_NAME( ColorLayer ),
3133 };
3134 Q_ENUM( RasterLayerType )
3135
3136
3144 {
3145 Undefined SIP_MONKEYPATCH_COMPAT_NAME( UndefinedDrawingStyle ),
3146 SingleBandGray,
3147 SingleBandPseudoColor,
3148 PalettedColor,
3149 PalettedSingleBandGray,
3150 PalettedSingleBandPseudoColor,
3151 PalettedMultiBandColor,
3152 MultiBandSingleBandGray,
3153 MultiBandSingleBandPseudoColor,
3154 MultiBandColor,
3155 SingleBandColorData SIP_MONKEYPATCH_COMPAT_NAME( SingleBandColorDataStyle ),
3156 };
3157 Q_ENUM( RasterDrawingStyle )
3158
3159
3166 enum class RasterPyramidFormat SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsRaster, RasterPyramidsFormat ) : int
3167 {
3168 GeoTiff SIP_MONKEYPATCH_COMPAT_NAME( PyramidsGTiff ) = 0,
3169 Internal SIP_MONKEYPATCH_COMPAT_NAME( PyramidsInternal ) = 1,
3170 Erdas SIP_MONKEYPATCH_COMPAT_NAME( PyramidsErdas ) = 2
3171 };
3172 Q_ENUM( RasterPyramidFormat )
3173
3174
3182 {
3183 No SIP_MONKEYPATCH_COMPAT_NAME( PyramidsFlagNo ) = 0,
3184 Yes SIP_MONKEYPATCH_COMPAT_NAME( PyramidsFlagYes ) = 1,
3185 CopyExisting SIP_MONKEYPATCH_COMPAT_NAME( PyramidsCopyExisting ) = 2
3186 };
3187 Q_ENUM( RasterBuildPyramidOption )
3188
3189
3197 {
3198 Undefined SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatUndefined ) = 0,
3199 Value SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatValue ) = 1,
3200 Text SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatText ) = 1 << 1,
3201 Html SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatHtml ) = 1 << 2,
3202 Feature SIP_MONKEYPATCH_COMPAT_NAME( IdentifyFormatFeature ) = 1 << 3,
3203 };
3204 Q_ENUM( RasterIdentifyFormat )
3205
3206
3212 {
3213 HighestElevation,
3214 NewerElevation,
3215 };
3216 Q_ENUM( ElevationMapCombineMethod )
3217
3218
3227 {
3228 Normal SIP_MONKEYPATCH_COMPAT_NAME( BlendNormal ),
3229 Lighten SIP_MONKEYPATCH_COMPAT_NAME( BlendLighten ),
3230 Screen SIP_MONKEYPATCH_COMPAT_NAME( BlendScreen ),
3231 Dodge SIP_MONKEYPATCH_COMPAT_NAME( BlendDodge ),
3232 Addition SIP_MONKEYPATCH_COMPAT_NAME( BlendAddition ),
3233 Darken SIP_MONKEYPATCH_COMPAT_NAME( BlendDarken ),
3234 Multiply SIP_MONKEYPATCH_COMPAT_NAME( BlendMultiply ),
3235 Burn SIP_MONKEYPATCH_COMPAT_NAME( BlendBurn ),
3236 Overlay SIP_MONKEYPATCH_COMPAT_NAME( BlendOverlay ),
3237 SoftLight SIP_MONKEYPATCH_COMPAT_NAME( BlendSoftLight ),
3238 HardLight SIP_MONKEYPATCH_COMPAT_NAME( BlendHardLight ),
3239 Difference SIP_MONKEYPATCH_COMPAT_NAME( BlendDifference ),
3240 Subtract SIP_MONKEYPATCH_COMPAT_NAME( BlendSubtract ),
3241 Source SIP_MONKEYPATCH_COMPAT_NAME( BlendSource ),
3242 DestinationOver SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationOver ),
3243 Clear SIP_MONKEYPATCH_COMPAT_NAME( BlendClear ),
3244 Destination SIP_MONKEYPATCH_COMPAT_NAME( BlendDestination ),
3245 SourceIn SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceIn ),
3246 DestinationIn SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationIn ),
3247 SourceOut SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceOut ),
3248 DestinationOut SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationOut ),
3249 SourceAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceAtop ),
3250 DestinationAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationAtop ),
3251 Xor SIP_MONKEYPATCH_COMPAT_NAME( BlendXor ),
3252 };
3253 Q_ENUM( BlendMode )
3254
3255
3263 {
3264 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownSystem ) = 0,
3265 Metric SIP_MONKEYPATCH_COMPAT_NAME( MetricSystem ),
3266 Imperial SIP_MONKEYPATCH_COMPAT_NAME( ImperialSystem ),
3267 USCS SIP_MONKEYPATCH_COMPAT_NAME( USCSSystem ),
3268 };
3269 Q_ENUM( SystemOfMeasurement )
3270
3271
3278 {
3279 Layer SIP_MONKEYPATCH_COMPAT_NAME( LayerUnits ),
3280 Pixels,
3281 Project SIP_MONKEYPATCH_COMPAT_NAME( ProjectUnits )
3282 };
3283 Q_ENUM( MapToolUnit )
3284
3285
3293 {
3294 Distance SIP_MONKEYPATCH_COMPAT_NAME( TypeDistance ) = 0,
3295 Area SIP_MONKEYPATCH_COMPAT_NAME( TypeArea ),
3296 Volume SIP_MONKEYPATCH_COMPAT_NAME( TypeVolume ),
3297 Unknown SIP_MONKEYPATCH_COMPAT_NAME( TypeUnknown ),
3298 Temporal SIP_MONKEYPATCH_COMPAT_NAME( TypeTemporal ),
3299 };
3300 Q_ENUM( UnitType )
3301
3302
3310 {
3311 Meters SIP_MONKEYPATCH_COMPAT_NAME( DistanceMeters ),
3312 Kilometers SIP_MONKEYPATCH_COMPAT_NAME( DistanceKilometers ),
3313 Feet SIP_MONKEYPATCH_COMPAT_NAME( DistanceFeet ),
3314 NauticalMiles SIP_MONKEYPATCH_COMPAT_NAME( DistanceNauticalMiles ),
3315 Yards SIP_MONKEYPATCH_COMPAT_NAME( DistanceYards ),
3316 Miles SIP_MONKEYPATCH_COMPAT_NAME( DistanceMiles ),
3317 Degrees SIP_MONKEYPATCH_COMPAT_NAME( DistanceDegrees ),
3318 Centimeters SIP_MONKEYPATCH_COMPAT_NAME( DistanceCentimeters ),
3319 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( DistanceMillimeters ),
3320 Inches,
3321 Unknown SIP_MONKEYPATCH_COMPAT_NAME( DistanceUnknownUnit ),
3322 };
3323 Q_ENUM( DistanceUnit )
3324
3325
3333 {
3334 Standard,
3335 Geographic,
3336 Unknown SIP_MONKEYPATCH_COMPAT_NAME( UnknownType ),
3337 };
3338 Q_ENUM( DistanceUnitType )
3339
3340
3348 {
3349 SquareMeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMeters ),
3350 SquareKilometers SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareKilometers ),
3351 SquareFeet SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareFeet ),
3352 SquareYards SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareYards ),
3353 SquareMiles SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMiles ),
3354 Hectares SIP_MONKEYPATCH_COMPAT_NAME( AreaHectares ),
3355 Acres SIP_MONKEYPATCH_COMPAT_NAME( AreaAcres ),
3356 SquareNauticalMiles SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareNauticalMiles ),
3357 SquareDegrees SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareDegrees ),
3358 SquareCentimeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareCentimeters ),
3359 SquareMillimeters SIP_MONKEYPATCH_COMPAT_NAME( AreaSquareMillimeters ),
3360 SquareInches,
3361 Unknown SIP_MONKEYPATCH_COMPAT_NAME( AreaUnknownUnit ),
3362 };
3363 Q_ENUM( AreaUnit )
3364
3365
3373 {
3374 CubicMeters SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicMeters ),
3375 CubicFeet SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicFeet ),
3376 CubicYards SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicYards ),
3377 Barrel SIP_MONKEYPATCH_COMPAT_NAME( VolumeBarrel ),
3378 CubicDecimeter SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicDecimeter ),
3379 Liters SIP_MONKEYPATCH_COMPAT_NAME( VolumeLiters ),
3380 GallonUS SIP_MONKEYPATCH_COMPAT_NAME( VolumeGallonUS ),
3381 CubicInch SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicInch ),
3382 CubicCentimeter SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicCentimeter ),
3383 CubicDegrees SIP_MONKEYPATCH_COMPAT_NAME( VolumeCubicDegrees ),
3384 Unknown SIP_MONKEYPATCH_COMPAT_NAME( VolumeUnknownUnit ),
3385 };
3386 Q_ENUM( VolumeUnit )
3387
3388
3396 {
3397 Degrees SIP_MONKEYPATCH_COMPAT_NAME( AngleDegrees ),
3398 Radians SIP_MONKEYPATCH_COMPAT_NAME( AngleRadians ),
3399 Gon SIP_MONKEYPATCH_COMPAT_NAME( AngleGon ),
3400 MinutesOfArc SIP_MONKEYPATCH_COMPAT_NAME( AngleMinutesOfArc ),
3401 SecondsOfArc SIP_MONKEYPATCH_COMPAT_NAME( AngleSecondsOfArc ),
3402 Turn SIP_MONKEYPATCH_COMPAT_NAME( AngleTurn ),
3403 MilliradiansSI SIP_MONKEYPATCH_COMPAT_NAME( AngleMilliradiansSI ),
3404 MilNATO SIP_MONKEYPATCH_COMPAT_NAME( AngleMilNATO ),
3405 Unknown SIP_MONKEYPATCH_COMPAT_NAME( AngleUnknownUnit ),
3406 };
3407 Q_ENUM( AngleUnit )
3408
3409
3417 {
3418 Milliseconds SIP_MONKEYPATCH_COMPAT_NAME( TemporalMilliseconds ),
3419 Seconds SIP_MONKEYPATCH_COMPAT_NAME( TemporalSeconds ),
3420 Minutes SIP_MONKEYPATCH_COMPAT_NAME( TemporalMinutes ),
3421 Hours SIP_MONKEYPATCH_COMPAT_NAME( TemporalHours ),
3422 Days SIP_MONKEYPATCH_COMPAT_NAME( TemporalDays ),
3423 Weeks SIP_MONKEYPATCH_COMPAT_NAME( TemporalWeeks ),
3424 Months SIP_MONKEYPATCH_COMPAT_NAME( TemporalMonths ),
3425 Years SIP_MONKEYPATCH_COMPAT_NAME( TemporalYears ),
3426 Decades SIP_MONKEYPATCH_COMPAT_NAME( TemporalDecades ),
3427 Centuries SIP_MONKEYPATCH_COMPAT_NAME( TemporalCenturies ),
3428 IrregularStep SIP_MONKEYPATCH_COMPAT_NAME( TemporalIrregularStep ),
3429 Unknown SIP_MONKEYPATCH_COMPAT_NAME( TemporalUnknownUnit )
3430 };
3431 Q_ENUM( TemporalUnit )
3432
3433
3441 {
3442 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( RenderMillimeters ),
3443 MapUnits SIP_MONKEYPATCH_COMPAT_NAME( RenderMapUnits ),
3444 Pixels SIP_MONKEYPATCH_COMPAT_NAME( RenderPixels ),
3445 Percentage SIP_MONKEYPATCH_COMPAT_NAME( RenderPercentage ),
3446 Points SIP_MONKEYPATCH_COMPAT_NAME( RenderPoints ),
3447 Inches SIP_MONKEYPATCH_COMPAT_NAME( RenderInches ),
3448 Unknown SIP_MONKEYPATCH_COMPAT_NAME( RenderUnknownUnit ),
3449 MetersInMapUnits SIP_MONKEYPATCH_COMPAT_NAME( RenderMetersInMapUnits ),
3450 };
3451 Q_ENUM( RenderUnit )
3452
3453
3461 {
3462 Millimeters SIP_MONKEYPATCH_COMPAT_NAME( LayoutMillimeters ),
3463 Centimeters SIP_MONKEYPATCH_COMPAT_NAME( LayoutCentimeters ),
3464 Meters SIP_MONKEYPATCH_COMPAT_NAME( LayoutMeters ),
3465 Inches SIP_MONKEYPATCH_COMPAT_NAME( LayoutInches ),
3466 Feet SIP_MONKEYPATCH_COMPAT_NAME( LayoutFeet ),
3467 Points SIP_MONKEYPATCH_COMPAT_NAME( LayoutPoints ),
3468 Picas SIP_MONKEYPATCH_COMPAT_NAME( LayoutPicas ),
3469 Pixels SIP_MONKEYPATCH_COMPAT_NAME( LayoutPixels )
3470 };
3471 Q_ENUM( LayoutUnit )
3472
3473
3481 {
3482 PaperUnits SIP_MONKEYPATCH_COMPAT_NAME( LayoutPaperUnits ),
3483 ScreenUnits SIP_MONKEYPATCH_COMPAT_NAME( LayoutScreenUnits )
3484 };
3485 Q_ENUM( LayoutUnitType )
3486
3487
3493 {
3494 NotSet,
3495 Unknown,
3496 OrdinaryTable,
3497 Index,
3498 Sequence,
3499 View,
3500 MaterializedView,
3501 CompositeType,
3502 ToastTable,
3503 ForeignTable,
3504 PartitionedTable,
3505 };
3506 Q_ENUM( PostgresRelKind )
3507
3508
3514 {
3515 SetFieldComment = 1 << 0,
3516 SetFieldAlias = 1 << 1,
3517 };
3518 Q_ENUM( DatabaseProviderConnectionCapability2 )
3519 Q_DECLARE_FLAGS( DatabaseProviderConnectionCapabilities2, DatabaseProviderConnectionCapability2 )
3520 Q_FLAG( DatabaseProviderConnectionCapabilities2 )
3521
3522
3528 {
3529 LastProfile,
3530 DefaultProfile,
3531 AskUser,
3532 };
3533 Q_ENUM( UserProfileSelectionPolicy )
3534
3535
3543 {
3544 Container SIP_MONKEYPATCH_COMPAT_NAME( AeTypeContainer ),
3545 Field SIP_MONKEYPATCH_COMPAT_NAME( AeTypeField ),
3546 Relation SIP_MONKEYPATCH_COMPAT_NAME( AeTypeRelation ),
3547 QmlElement SIP_MONKEYPATCH_COMPAT_NAME( AeTypeQmlElement ),
3548 HtmlElement SIP_MONKEYPATCH_COMPAT_NAME( AeTypeHtmlElement ),
3549 Action SIP_MONKEYPATCH_COMPAT_NAME( AeTypeAction ),
3550 TextElement SIP_MONKEYPATCH_COMPAT_NAME( AeTypeTextElement ),
3551 SpacerElement SIP_MONKEYPATCH_COMPAT_NAME( AeTypeSpacerElement ),
3552 Invalid SIP_MONKEYPATCH_COMPAT_NAME( AeTypeInvalid ),
3553 };
3554 Q_ENUM( AttributeEditorType )
3555
3556
3562 {
3563 GroupBox,
3564 Tab,
3565 Row,
3566 };
3567 Q_ENUM( AttributeEditorContainerType )
3568
3569
3577 {
3578 AutoGenerated SIP_MONKEYPATCH_COMPAT_NAME( GeneratedLayout ) = 0,
3579 DragAndDrop SIP_MONKEYPATCH_COMPAT_NAME( TabLayout ) = 1,
3580 UiFile SIP_MONKEYPATCH_COMPAT_NAME( UiFileLayout ) = 2
3581 };
3582 Q_ENUM( AttributeFormLayout )
3583
3584
3592 {
3593 Default SIP_MONKEYPATCH_COMPAT_NAME( SuppressDefault ) = 0,
3594 On SIP_MONKEYPATCH_COMPAT_NAME( SuppressOn ) = 1,
3595 Off SIP_MONKEYPATCH_COMPAT_NAME( SuppressOff ) = 2
3596 };
3597 Q_ENUM( AttributeFormSuppression )
3598
3599
3607 {
3608 NoSource SIP_MONKEYPATCH_COMPAT_NAME( CodeSourceNone ) = 0,
3609 File SIP_MONKEYPATCH_COMPAT_NAME( CodeSourceFile ) = 1,
3610 Dialog SIP_MONKEYPATCH_COMPAT_NAME( CodeSourceDialog ) = 2,
3611 Environment SIP_MONKEYPATCH_COMPAT_NAME( CodeSourceEnvironment ) = 3
3612 };
3613 Q_ENUM( AttributeFormPythonInitCodeSource )
3614
3615
3621 {
3622 Qgis,
3623 PointCloud,
3624 };
3625 Q_ENUM( ExpressionType )
3626
3627
3635 {
3636 NoSymbology = 0,
3637 PerFeature SIP_MONKEYPATCH_COMPAT_NAME( FeatureSymbology ),
3638 PerSymbolLayer SIP_MONKEYPATCH_COMPAT_NAME( SymbolLayerSymbology )
3639 };
3640 Q_ENUM( FeatureSymbologyExport )
3641
3642
3647 enum class VectorTileProviderFlag : int
3648 {
3649 AlwaysUseTileMatrixSetFromProvider = 1 << 1,
3650 };
3651 Q_ENUM( VectorTileProviderFlag )
3652
3653
3658 Q_DECLARE_FLAGS( VectorTileProviderFlags, VectorTileProviderFlag )
3659 Q_FLAG( VectorTileProviderFlags )
3660
3661
3666 {
3667 ReadLayerMetadata = 1 << 1,
3668 };
3669 Q_ENUM( VectorTileProviderCapability )
3670
3671
3676 Q_DECLARE_FLAGS( VectorTileProviderCapabilities, VectorTileProviderCapability )
3677 Q_FLAG( VectorTileProviderCapabilities )
3678
3679
3685 {
3686 Available,
3687 NotAvailable,
3688 AvailableNoChildren,
3689 UseLowerZoomLevelTile,
3690 };
3691 Q_ENUM( TileAvailability )
3692
3693
3697 static const double DEFAULT_SEARCH_RADIUS_MM;
3698
3700 static const float DEFAULT_MAPTOPIXEL_THRESHOLD;
3701
3708 static const QColor DEFAULT_HIGHLIGHT_COLOR;
3709
3714 static const double DEFAULT_HIGHLIGHT_BUFFER_MM;
3715
3720 static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
3721
3728 static const double SCALE_PRECISION;
3729
3735 static const double DEFAULT_Z_COORDINATE;
3736
3742 static const double DEFAULT_M_COORDINATE;
3743
3749 static const double UI_SCALE_FACTOR;
3750
3755 static const double DEFAULT_SNAP_TOLERANCE;
3756
3761 static const Qgis::MapToolUnit DEFAULT_SNAP_UNITS;
3762
3768 static QString defaultProjectScales();
3769
3775 static int geosVersionInt();
3776
3782 static int geosVersionMajor();
3783
3789 static int geosVersionMinor();
3790
3796 static int geosVersionPatch();
3797
3803 static QString geosVersion();
3804};
3805
3808
3809Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolRenderHints )
3810Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolFlags )
3811Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolPreviewFlags )
3812Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SymbolLayerFlags )
3813Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BrowserItemCapabilities )
3814Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SublayerQueryFlags )
3815Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SublayerFlags )
3816Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SqlLayerDefinitionCapabilities )
3817Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BabelFormatCapabilities )
3818Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::BabelCommandFlags )
3819Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::GeometryValidityFlags )
3820Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::FileOperationFlags )
3821Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::AnnotationItemFlags )
3822Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::AnnotationItemGuiFlags )
3823Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapSettingsFlags )
3824Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RenderContextFlags )
3825Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorLayerTypeFlags )
3826Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MarkerLinePlacements )
3827Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::TextRendererFlags )
3828Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::HistoryProviderBackends )
3829Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerProperties )
3830Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::DataProviderFlags )
3831Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorDataProviderAttributeEditCapabilities )
3832Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SnappingTypes )
3833Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::PlotToolFlags )
3834Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProfileGeneratorFlags )
3835Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProjectReadFlags )
3836Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ProjectCapabilities )
3837Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::CoordinateTransformationFlags )
3838Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RasterTemporalCapabilityFlags )
3839Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SelectionFlags )
3840Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RasterRendererFlags )
3841Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::LabelingFlags )
3842Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::GpsInformationComponents )
3843Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerActionTargets )
3844Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::MapLayerActionFlags )
3845Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::RelationshipCapabilities )
3846Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::SettingsTreeNodeOptions )
3847Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::ScriptLanguageCapabilities )
3848Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::LayerTreeFilterFlags )
3849Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::LabelLinePlacementFlags )
3850Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::LabelPolygonPlacementFlags )
3851Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::DatabaseProviderConnectionCapabilities2 )
3852Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorFileWriterCapabilities )
3853Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorTileProviderFlags )
3854Q_DECLARE_OPERATORS_FOR_FLAGS( Qgis::VectorTileProviderCapabilities )
3855
3856// hack to workaround warnings when casting void pointers
3857// retrieved from QLibrary::resolve to function pointers.
3858// It's assumed that this works on all systems supporting
3859// QLibrary
3860#define cast_to_fptr(f) f
3861
3862
3871// based on Boojum's code from http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
3872template<class Object> class QgsSignalBlocker SIP_SKIP SIP_SKIP // clazy:exclude=rule-of-three
3873{
3874 public:
3875
3880 explicit QgsSignalBlocker( Object * object )
3881 : mObject( object )
3882 , mPreviousState( object->blockSignals( true ) )
3883 {}
3884
3886 {
3887 mObject->blockSignals( mPreviousState );
3888 }
3889
3891 Object *operator->() { return mObject; }
3892
3893 private:
3894
3895 Object *mObject = nullptr;
3896 bool mPreviousState;
3897
3898};
3899
3913// based on Boojum's code from http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
3914template<class Object> inline QgsSignalBlocker<Object> whileBlocking( Object *object ) SIP_SKIP SIP_SKIP
3915{
3916 return QgsSignalBlocker<Object>( object );
3917}
3918
3920CORE_EXPORT uint qHash( const QVariant &variant );
3921
3927inline QString qgsDoubleToString( double a, int precision = 17 )
3928{
3929 QString str;
3930 if ( precision )
3931 {
3932 if ( precision < 0 )
3933 {
3934 const double roundFactor = std::pow( 10, -precision );
3935 str = QString::number( static_cast< long long >( std::round( a / roundFactor ) * roundFactor ) );
3936 }
3937 else
3938 {
3939 str = QString::number( a, 'f', precision );
3940 if ( str.contains( QLatin1Char( '.' ) ) )
3941 {
3942 // remove ending 0s
3943 int idx = str.length() - 1;
3944 while ( str.at( idx ) == '0' && idx > 1 )
3945 {
3946 idx--;
3947 }
3948 if ( idx < str.length() - 1 )
3949 str.truncate( str.at( idx ) == '.' ? idx : idx + 1 );
3950 }
3951 }
3952 }
3953 else
3954 {
3955 str = QString::number( a, 'f', precision );
3956 }
3957 // avoid printing -0
3958 // see https://bugreports.qt.io/browse/QTBUG-71439
3959 if ( str == QLatin1String( "-0" ) )
3960 {
3961 return QLatin1String( "0" );
3962 }
3963 return str;
3964}
3965
3972inline bool qgsNanCompatibleEquals( double a, double b )
3973{
3974 const bool aIsNan = std::isnan( a );
3975 const bool bIsNan = std::isnan( b );
3976 if ( aIsNan || bIsNan )
3977 return aIsNan && bIsNan;
3978
3979 return a == b;
3980}
3981
3988inline bool qgsDoubleNear( double a, double b, double epsilon = 4 * std::numeric_limits<double>::epsilon() )
3989{
3990 const bool aIsNan = std::isnan( a );
3991 const bool bIsNan = std::isnan( b );
3992 if ( aIsNan || bIsNan )
3993 return aIsNan && bIsNan;
3994
3995 const double diff = a - b;
3996 return diff > -epsilon && diff <= epsilon;
3997}
3998
4005inline bool qgsFloatNear( float a, float b, float epsilon = 4 * FLT_EPSILON )
4006{
4007 const bool aIsNan = std::isnan( a );
4008 const bool bIsNan = std::isnan( b );
4009 if ( aIsNan || bIsNan )
4010 return aIsNan && bIsNan;
4011
4012 const float diff = a - b;
4013 return diff > -epsilon && diff <= epsilon;
4014}
4015
4017inline bool qgsDoubleNearSig( double a, double b, int significantDigits = 10 )
4018{
4019 const bool aIsNan = std::isnan( a );
4020 const bool bIsNan = std::isnan( b );
4021 if ( aIsNan || bIsNan )
4022 return aIsNan && bIsNan;
4023
4024 // The most simple would be to print numbers as %.xe and compare as strings
4025 // but that is probably too costly
4026 // Then the fastest would be to set some bits directly, but little/big endian
4027 // has to be considered (maybe TODO)
4028 // Is there a better way?
4029 int aexp, bexp;
4030 const double ar = std::frexp( a, &aexp );
4031 const double br = std::frexp( b, &bexp );
4032
4033 return aexp == bexp &&
4034 std::round( ar * std::pow( 10.0, significantDigits ) ) == std::round( br * std::pow( 10.0, significantDigits ) );
4035}
4036
4042inline double qgsRound( double number, int places )
4043{
4044 const double m = ( number < 0.0 ) ? -1.0 : 1.0;
4045 const double scaleFactor = std::pow( 10.0, places );
4046 return ( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
4047}
4048
4049#ifndef SIP_RUN
4050
4057template<class Key, class Value>
4058QString qgsMapJoinKeys( const QMap<Key, Value> &map, const QString &separator )
4059{
4060 QString result;
4061 for ( auto it = map.constBegin(); it != map.constEnd(); it++ )
4062 result += QString( "%1%2" ).arg( it.key() ).arg( separator );
4063
4064 result.chop( separator.size() );
4065 return result;
4066}
4067
4074template<class Key, class Value>
4075QString qgsMapJoinValues( const QMap<Key, Value> &map, const QString &separator )
4076{
4077 QString result;
4078 for ( auto it = map.constBegin(); it != map.constEnd(); it++ )
4079 result += QString( "%1%2" ).arg( it.value() ).arg( separator );
4080
4081 result.chop( separator.size() );
4082 return result;
4083}
4084
4091template<class T>
4092QString qgsSetJoin( const QSet<T> &set, const QString &separator )
4093{
4094 QString result;
4095 for ( auto it = set.constBegin(); it != set.constEnd(); it++ )
4096 result += QString( "%1%2" ).arg( *it ).arg( separator );
4097
4098 result.chop( separator.size() );
4099 return result;
4100}
4101
4103
4113namespace qgis
4114{
4115
4128 template<typename To, typename From> inline To down_cast( From *f )
4129 {
4130 static_assert(
4131 ( std::is_base_of<From,
4132 typename std::remove_pointer<To>::type>::value ),
4133 "target type not derived from source type" );
4134 Q_ASSERT( f == nullptr || dynamic_cast<To>( f ) != nullptr );
4135 return static_cast<To>( f );
4136 }
4137
4138 template<class T>
4139 QSet<T> listToSet( const QList<T> &list )
4140 {
4141 return QSet<T>( list.begin(), list.end() );
4142 }
4143
4144 template<class T>
4145 QList<T> setToList( const QSet<T> &set )
4146 {
4147 return QList<T>( set.begin(), set.end() );
4148 }
4149}
4150
4152#endif
4153
4158template<class T> const QList<T> qgsEnumList() SIP_SKIP
4159{
4160 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4161 Q_ASSERT( metaEnum.isValid() );
4162 QList<T> enumList;
4163 for ( int idx = 0; idx < metaEnum.keyCount(); ++idx )
4164 {
4165 enumList.append( static_cast<T>( metaEnum.value( idx ) ) );
4166 }
4167 return enumList;
4168}
4169
4175template<class T> const QMap<T, QString> qgsEnumMap() SIP_SKIP
4176{
4177 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4178 Q_ASSERT( metaEnum.isValid() );
4179 QMap<T, QString> enumMap;
4180 for ( int idx = 0; idx < metaEnum.keyCount(); ++idx )
4181 {
4182 enumMap.insert( static_cast<T>( metaEnum.value( idx ) ), QString( metaEnum.key( idx ) ) );
4183 }
4184 return enumMap;
4185}
4186
4192template<class T> QString qgsEnumValueToKey( const T &value, bool *returnOk = nullptr ) SIP_SKIP
4193{
4194 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4195 Q_ASSERT( metaEnum.isValid() );
4196 const char *key = metaEnum.valueToKey( static_cast<int>( value ) );
4197 if ( returnOk )
4198 {
4199 *returnOk = key ? true : false;
4200 }
4201 return QString::fromUtf8( key );
4202}
4203
4211template<class T> T qgsEnumKeyToValue( const QString &key, const T &defaultValue, bool tryValueAsKey = true, bool *returnOk = nullptr ) SIP_SKIP
4212{
4213 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4214 Q_ASSERT( metaEnum.isValid() );
4215 bool ok = false;
4216 T v = static_cast<T>( metaEnum.keyToValue( key.toUtf8().data(), &ok ) );
4217 if ( returnOk )
4218 {
4219 *returnOk = ok;
4220 }
4221 if ( ok )
4222 {
4223 return v;
4224 }
4225 else
4226 {
4227 // if conversion has failed, try with conversion from int value
4228 if ( tryValueAsKey )
4229 {
4230 bool canConvert = false;
4231 const int intValue = key.toInt( &canConvert );
4232 if ( canConvert && metaEnum.valueToKey( intValue ) )
4233 {
4234 if ( returnOk )
4235 {
4236 *returnOk = true;
4237 }
4238 return static_cast<T>( intValue );
4239 }
4240 }
4241 }
4242 return defaultValue;
4243}
4244
4250template<class T> QString qgsFlagValueToKeys( const T &value, bool *returnOk = nullptr ) SIP_SKIP
4251{
4252 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4253 Q_ASSERT( metaEnum.isValid() );
4254 int intValue = static_cast<int>( value );
4255 const QByteArray ba = metaEnum.valueToKeys( intValue );
4256 // check that the int value does correspond to a flag
4257 // see https://stackoverflow.com/a/68495949/1548052
4258 const int intValueCheck = metaEnum.keysToValue( ba );
4259 bool ok = intValue == intValueCheck;
4260 if ( returnOk )
4261 *returnOk = ok;
4262 return ok ? QString::fromUtf8( ba ) : QString();
4263}
4264
4272template<class T> T qgsFlagKeysToValue( const QString &keys, const T &defaultValue, bool tryValueAsKey = true, bool *returnOk = nullptr ) SIP_SKIP
4273{
4274 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
4275 Q_ASSERT( metaEnum.isValid() );
4276 bool ok = false;
4277 T v = static_cast<T>( metaEnum.keysToValue( keys.toUtf8().constData(), &ok ) );
4278 if ( returnOk )
4279 {
4280 *returnOk = ok;
4281 }
4282 if ( ok )
4283 {
4284 return v;
4285 }
4286 else
4287 {
4288 // if conversion has failed, try with conversion from int value
4289 if ( tryValueAsKey )
4290 {
4291 bool canConvert = false;
4292 const int intValue = keys.toInt( &canConvert );
4293 if ( canConvert )
4294 {
4295 const QByteArray keys = metaEnum.valueToKeys( intValue );
4296 const int intValueCheck = metaEnum.keysToValue( keys );
4297 if ( intValue == intValueCheck )
4298 {
4299 if ( returnOk )
4300 {
4301 *returnOk = true;
4302 }
4303 return T( intValue );
4304 }
4305 }
4306 }
4307 }
4308 return defaultValue;
4309}
4310
4311
4321CORE_EXPORT double qgsPermissiveToDouble( QString string, bool &ok );
4322
4332CORE_EXPORT int qgsPermissiveToInt( QString string, bool &ok );
4333
4343CORE_EXPORT qlonglong qgsPermissiveToLongLong( QString string, bool &ok );
4344
4354CORE_EXPORT bool qgsVariantLessThan( const QVariant &lhs, const QVariant &rhs );
4355
4364CORE_EXPORT bool qgsVariantEqual( const QVariant &lhs, const QVariant &rhs );
4365
4372CORE_EXPORT bool qgsVariantGreaterThan( const QVariant &lhs, const QVariant &rhs );
4373
4374#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
4375
4382inline bool operator> ( const QVariant &v1, const QVariant &v2 )
4383{
4384 return qgsVariantGreaterThan( v1, v2 );
4385}
4386
4396inline bool operator< ( const QVariant &v1, const QVariant &v2 )
4397{
4398 return qgsVariantLessThan( v1, v2 );
4399}
4400#endif
4401
4402
4403#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
4404
4408template<> CORE_EXPORT bool qMapLessThanKey<QVariantList>( const QVariantList &key1, const QVariantList &key2 ) SIP_SKIP;
4409#endif
4410
4411CORE_EXPORT QString qgsVsiPrefix( const QString &path );
4412
4418void CORE_EXPORT *qgsMalloc( size_t size ) SIP_SKIP;
4419
4424void CORE_EXPORT qgsFree( void *ptr ) SIP_SKIP;
4425
4426#ifndef SIP_RUN
4427
4428#ifdef _MSC_VER
4429#define CONSTLATIN1STRING inline const QLatin1String
4430#else
4431#define CONSTLATIN1STRING constexpr QLatin1String
4432#endif
4433
4435class ScopedIntIncrementor
4436{
4437 public:
4438
4439 ScopedIntIncrementor( int *variable )
4440 : mVariable( variable )
4441 {
4442 ( *mVariable )++;
4443 }
4444
4445 ScopedIntIncrementor( const ScopedIntIncrementor &other ) = delete;
4446 ScopedIntIncrementor &operator=( const ScopedIntIncrementor &other ) = delete;
4447
4448 void release()
4449 {
4450 if ( mVariable )
4451 ( *mVariable )--;
4452
4453 mVariable = nullptr;
4454 }
4455
4456 ~ScopedIntIncrementor()
4457 {
4458 release();
4459 }
4460
4461 private:
4462 int *mVariable = nullptr;
4463};
4465
4471{
4472 return QLatin1String(
4473 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]] )"""
4474 );
4475}
4476
4479{
4480 return QLatin1String( "+proj=longlat +datum=WGS84 +no_defs" );
4481}
4482
4485{
4486 return QLatin1String( "EPSG:4326" );
4487}
4488
4491{
4492 return QLatin1String( "NONE" );
4493}
4494
4496
4498const int PREVIEW_JOB_DELAY_MS = 250;
4499
4501const int MAXIMUM_LAYER_PREVIEW_TIME_MS = 250;
4502
4504
4505#endif
4506
4508const long GEOSRID = 4326;
4509
4511const long GEOCRS_ID = 3452;
4512
4514const long GEO_EPSG_CRS_ID = 4326;
4515
4520const int USER_CRS_START_ID = 100000;
4521
4522//
4523// Constants for point symbols
4524//
4525
4527const double DEFAULT_POINT_SIZE = 2.0;
4528const double DEFAULT_LINE_WIDTH = 0.26;
4529
4531const double DEFAULT_SEGMENT_EPSILON = 1e-8;
4532
4533typedef QMap<QString, QString> QgsStringMap SIP_SKIP;
4534
4543typedef unsigned long long qgssize;
4544
4545#ifndef SIP_RUN
4546#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
4547
4548#define Q_NOWARN_DEPRECATED_PUSH \
4549 _Pragma("GCC diagnostic push") \
4550 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
4551#define Q_NOWARN_DEPRECATED_POP \
4552 _Pragma("GCC diagnostic pop");
4553#define Q_NOWARN_UNREACHABLE_PUSH
4554#define Q_NOWARN_UNREACHABLE_POP
4555
4556#elif defined(_MSC_VER)
4557
4558#define Q_NOWARN_DEPRECATED_PUSH \
4559 __pragma(warning(push)) \
4560 __pragma(warning(disable:4996))
4561#define Q_NOWARN_DEPRECATED_POP \
4562 __pragma(warning(pop))
4563#define Q_NOWARN_UNREACHABLE_PUSH \
4564 __pragma(warning(push)) \
4565 __pragma(warning(disable:4702))
4566#define Q_NOWARN_UNREACHABLE_POP \
4567 __pragma(warning(pop))
4568
4569#else
4570
4571#define Q_NOWARN_DEPRECATED_PUSH
4572#define Q_NOWARN_DEPRECATED_POP
4573#define Q_NOWARN_UNREACHABLE_PUSH
4574#define Q_NOWARN_UNREACHABLE_POP
4575
4576#endif
4577#endif
4578
4579#ifndef QGISEXTERN
4580#ifdef Q_OS_WIN
4581# define QGISEXTERN extern "C" __declspec( dllexport )
4582#else
4583# if defined(__GNUC__) || defined(__clang__)
4584# define QGISEXTERN extern "C" __attribute__ ((visibility ("default")))
4585# else
4586# define QGISEXTERN extern "C"
4587# endif
4588#endif
4589#endif
4590#endif
4591
4592#if __cplusplus >= 201500
4593#define FALLTHROUGH [[fallthrough]];
4594#elif defined(__clang__)
4595#define FALLTHROUGH [[clang::fallthrough]];
4596#elif defined(__GNUC__) && __GNUC__ >= 7
4597#define FALLTHROUGH [[gnu::fallthrough]];
4598#else
4599#define FALLTHROUGH
4600#endif
4601
4602// see https://infektor.net/posts/2017-01-19-using-cpp17-attributes-today.html#using-the-nodiscard-attribute
4603#if __cplusplus >= 201703L
4604#define NODISCARD [[nodiscard]]
4605#elif defined(__clang__)
4606#define NODISCARD [[nodiscard]]
4607#elif defined(_MSC_VER)
4608#define NODISCARD // no support
4609#elif defined(__has_cpp_attribute)
4610#if __has_cpp_attribute(nodiscard)
4611#define NODISCARD [[nodiscard]]
4612#elif __has_cpp_attribute(gnu::warn_unused_result)
4613#define NODISCARD [[gnu::warn_unused_result]]
4614#else
4615#define NODISCARD Q_REQUIRED_RESULT
4616#endif
4617#else
4618#define NODISCARD Q_REQUIRED_RESULT
4619#endif
4620
4621#if __cplusplus >= 201703L
4622#define MAYBE_UNUSED [[maybe_unused]]
4623#elif defined(__clang__)
4624#define MAYBE_UNUSED [[maybe_unused]]
4625#elif defined(_MSC_VER)
4626#define MAYBE_UNUSED // no support
4627#elif defined(__has_cpp_attribute)
4628#if __has_cpp_attribute(gnu::unused)
4629#define MAYBE_UNUSED [[gnu::unused]]
4630#else
4631#define MAYBE_UNUSED
4632#endif
4633#else
4634#define MAYBE_UNUSED
4635#endif
4636
4637#ifndef FINAL
4638#define FINAL final
4639#endif
4640
4641#ifndef SIP_RUN
4642#ifdef _MSC_VER
4643#define BUILTIN_UNREACHABLE \
4644 __assume(false);
4645#elif defined(__GNUC__) && !defined(__clang__)
4646// Workaround a GCC bug where a -Wreturn-type warning is emitted in constructs
4647// like:
4648// switch( mVariableThatCanOnlyBeXorY )
4649// {
4650// case X:
4651// return "foo";
4652// case Y:
4653// return "foo";
4654// }
4655// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87951
4656#define BUILTIN_UNREACHABLE \
4657 __builtin_unreachable();
4658#else
4659#define BUILTIN_UNREACHABLE
4660#endif
4661#endif // SIP_RUN
4662
4663#ifdef SIP_RUN
4664
4669QString CORE_EXPORT geoWkt();
4670
4672QString CORE_EXPORT geoProj4();
4673
4675QString CORE_EXPORT geoEpsgCrsAuthId();
4676
4678QString CORE_EXPORT geoNone();
4679
4680#endif
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:54
DistanceUnitType
Types of distance units.
Definition: qgis.h:3333
GnssConstellation
GNSS constellation.
Definition: qgis.h:1300
SettingsOption
Settings options.
Definition: qgis.h:438
ProfileGeneratorFlag
Flags that control the way the QgsAbstractProfileGenerator operate.
Definition: qgis.h:2662
GpsQualityIndicator
GPS signal quality indicator.
Definition: qgis.h:1318
ProjectReadFlag
Flags which control project read behavior.
Definition: qgis.h:2746
MapToolUnit
Type of unit of tolerance value from settings.
Definition: qgis.h:3278
PlotAxisSuffixPlacement
Placement options for suffixes in the labels for axis of plots.
Definition: qgis.h:2278
PointCloudSymbol
Rendering symbols for point cloud points.
Definition: qgis.h:2690
SymbolRotationMode
Modes for handling how symbol and text entity rotation is handled when maps are rotated.
Definition: qgis.h:497
GeometryValidityFlag
Geometry validity check flags.
Definition: qgis.h:1452
ExpressionType
Expression types.
Definition: qgis.h:3621
MapLayerActionFlag
Map layer action targets.
Definition: qgis.h:3039
MapLayerProperty
File operation flags.
Definition: qgis.h:1555
BufferSide
Side of line to buffer.
Definition: qgis.h:1477
RasterResamplingStage
Stage at which raster resampling occurs.
Definition: qgis.h:1005
VectorTileProviderCapability
Vector tile data provider flags.
Definition: qgis.h:3666
AltitudeClamping
Altitude clamping.
Definition: qgis.h:2502
VectorTileProviderFlag
Flags for vector tile data providers.
Definition: qgis.h:3648
VectorTemporalMode
Vector layer temporal feature modes.
Definition: qgis.h:1701
SublayerFlag
Sublayer query flags.
Definition: qgis.h:974
LabelLinePlacementFlag
Line placement flags, which control how candidates are generated for a linear feature.
Definition: qgis.h:862
CoordinateDisplayType
Relationship capabilities.
Definition: qgis.h:2894
DashPatternSizeAdjustment
Dash pattern size adjustment options.
Definition: qgis.h:2251
GpsFixStatus
GPS fix status.
Definition: qgis.h:1285
AnnotationItemNodeType
Annotation item GUI flags.
Definition: qgis.h:1677
static const char * QGIS_DEV_VERSION
The development version.
Definition: qgis.h:82
VectorFileWriterCapability
Capabilities supported by a QgsVectorFileWriter object.
Definition: qgis.h:673
AngularDirection
Angular directions.
Definition: qgis.h:2366
DriveType
Drive types.
Definition: qgis.h:726
UnitType
Unit types.
Definition: qgis.h:3293
ContentStatus
Status for fetched or stored content.
Definition: qgis.h:1241
SnappingType
SnappingTypeFlag defines on what object the snapping is performed.
Definition: qgis.h:463
LayoutUnit
Layout measurement units.
Definition: qgis.h:3461
Q_ENUM(GpsFixStatus)
RelationshipStrength
Relationship strength.
Definition: qgis.h:2847
Q_ENUM(GnssConstellation)
MarkerLinePlacement
Defines how/where the symbols should be placed on a line.
Definition: qgis.h:2116
GeometryOperationResult
Success or failure of a geometry operation.
Definition: qgis.h:1424
BrowserItemState
Browser item states.
Definition: qgis.h:570
AttributeEditorContainerType
Attribute editor container types.
Definition: qgis.h:3562
MarkerClipMode
Marker clipping modes.
Definition: qgis.h:2209
AnnotationItemFlag
Flags for annotation items.
Definition: qgis.h:1649
RenderSubcomponentProperty
Rendering subcomponent properties.
Definition: qgis.h:2040
SymbolRenderHint
Flags controlling behavior of symbols during rendering.
Definition: qgis.h:483
AngleUnit
Units of angles.
Definition: qgis.h:3396
CaptureTechnique
Capture technique.
Definition: qgis.h:266
BrowserItemCapability
Browser item capabilities.
Definition: qgis.h:583
AttributeFormSuppression
Available form types for layout of the attribute form editor.
Definition: qgis.h:3592
LayerTreeInsertionMethod
Script language capabilities.
Definition: qgis.h:2964
LineClipMode
Line clipping modes.
Definition: qgis.h:2223
BrowserDirectoryMonitoring
Browser directory item monitoring switches.
Definition: qgis.h:628
SettingsTreeNodeType
Type of tree node.
Definition: qgis.h:384
TilePixelRatio
DpiMode enum.
Definition: qgis.h:2306
DatabaseProviderConnectionCapability2
The Capability enum represents the extended operations supported by the connection.
Definition: qgis.h:3514
VectorDataProviderAttributeEditCapability
Attribute editing capabilities which may be supported by vector data providers.
Definition: qgis.h:320
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
Definition: qgis.h:828
GradientColorSource
Gradient color sources.
Definition: qgis.h:2138
FileFilterType
Type of file filters.
Definition: qgis.h:941
LabelPlacement
Placement modes which determine how label candidates are generated for a feature.
Definition: qgis.h:782
RasterLayerType
Raster layer types.
Definition: qgis.h:3128
RasterPyramidFormat
Raster pyramid formats.
Definition: qgis.h:3167
VectorExportResult
Vector layer export result codes.
Definition: qgis.h:652
DistanceUnit
Units of distance.
Definition: qgis.h:3310
RasterTemporalCapabilityFlag
Flags for raster layer temporal capabilities.
Definition: qgis.h:1770
SymbolLayerFlag
Flags controlling behavior of symbol layers.
Definition: qgis.h:537
GradientSpread
Gradient spread options, which control how gradients are rendered outside of their start and end poin...
Definition: qgis.h:2182
LabelPolygonPlacementFlag
Polygon placement flags, which control how candidates are generated for a polygon feature.
Definition: qgis.h:887
ScaleMethod
Scale methods.
Definition: qgis.h:354
SldExportOption
SLD export options.
Definition: qgis.h:410
FilePathType
File path types.
Definition: qgis.h:1128
CadConstraintType
Advanced digitizing constraint type.
Definition: qgis.h:2553
AttributeFormPythonInitCodeSource
The Python init code source for attribute forms.
Definition: qgis.h:3607
PointCountMethod
Methods which define the number of points randomly filling a polygon.
Definition: qgis.h:2197
SldExportVendorExtension
SLD export vendor extensions, allow the use of vendor extensions when exporting to SLD.
Definition: qgis.h:425
LayerTreeFilterFlag
Layer tree filter flags.
Definition: qgis.h:2977
AttributeFormLayout
Available form types for layout of the attribute form editor.
Definition: qgis.h:3577
VertexType
Types of vertex.
Definition: qgis.h:2053
DataProviderFlag
Map layer properties.
Definition: qgis.h:1570
GeometryValidationEngine
Available engines for validating geometries.
Definition: qgis.h:1465
TransactionMode
Transaction mode.
Definition: qgis.h:2489
Q_ENUM(ScaleToTileZoomLevelMethod)
ElevationMapCombineMethod
Methods used to select the elevation when two elevation maps are combined.
Definition: qgis.h:3212
RasterDrawingStyle
Raster drawing styles.
Definition: qgis.h:3144
GpsInformationComponent
GPS information component.
Definition: qgis.h:1338
ViewSyncModeFlag
Synchronization of 2D map canvas and 3D view.
Definition: qgis.h:2391
FileOperationFlag
File operation flags.
Definition: qgis.h:1540
ProjectCapability
Flags which control project capabilities.
Definition: qgis.h:2776
Q_ENUM(VectorProfileType)
AttributeActionType
Map layer action flags.
Definition: qgis.h:3062
AreaUnit
Units of area.
Definition: qgis.h:3348
FieldDomainMergePolicy
Merge policy for field domains.
Definition: qgis.h:2463
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition: qgis.h:99
SqlKeywordCategory
SQL layer definition capabilities.
Definition: qgis.h:708
GraduatedMethod
Methods for modifying symbols by range in a graduated symbol renderer.
Definition: qgis.h:2266
TextLayoutMode
Text layout modes.
Definition: qgis.h:1959
RasterRendererFlag
Flags which control behavior of raster renderers.
Definition: qgis.h:1019
MeshEditingErrorType
Type of error that can occur during mesh frame editing.
Definition: qgis.h:1111
FieldDomainSplitPolicy
Split policy for field domains.
Definition: qgis.h:2446
ArcGisRestServiceType
Available ArcGIS REST service types.
Definition: qgis.h:2814
RasterFileWriterResult
Raster file export results.
Definition: qgis.h:1094
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
Definition: qgis.h:1688
MapRecenteringMode
Modes for recentering map canvases.
Definition: qgis.h:2404
ActionType
Layer tree filter flags.
Definition: qgis.h:2998
ActionStart
Enum to determine when an operation would begin.
Definition: qgis.h:743
AvoidIntersectionsMode
Flags which control how intersections of pre-existing feature are handled when digitizing new feature...
Definition: qgis.h:2717
MarkerShape
Marker shapes.
Definition: qgis.h:2067
BlendMode
Blending modes defining the available composition modes that can be used when painting.
Definition: qgis.h:3227
Capitalization
String capitalization options.
Definition: qgis.h:2323
TemporalIntervalMatchMethod
Method to use when resolving a temporal range to a data provider layer or band.
Definition: qgis.h:1755
LabelQuadrantPosition
Label quadrant positions.
Definition: qgis.h:842
ScaleToTileZoomLevelMethod
Available methods for converting map scales to tile zoom levels.
Definition: qgis.h:2354
SublayerQueryFlag
Flags which control how data providers will scan for sublayers in a dataset.
Definition: qgis.h:957
TextOrientation
Text orientations.
Definition: qgis.h:1944
PythonMacroMode
Vector layer type flags.
Definition: qgis.h:293
TemporalUnit
Temporal units.
Definition: qgis.h:3417
UnplacedLabelVisibility
Unplaced label visibility.
Definition: qgis.h:755
CrsDefinitionFormat
CRS definition formats.
Definition: qgis.h:2431
SpatialFilterType
Feature request spatial filter types.
Definition: qgis.h:1527
TileAvailability
Vector tile data provider capabilities.
Definition: qgis.h:3685
ProjectFlag
Flags which control the behavior of QgsProjects.
Definition: qgis.h:2571
BrowserItemType
Symbol layer flags.
Definition: qgis.h:551
SettingsType
Types of settings entries.
Definition: qgis.h:365
RasterTemporalMode
Raster layer temporal modes.
Definition: qgis.h:1742
RasterAttributeTableType
The RasterAttributeTableType enum represents the type of RAT.
Definition: qgis.h:1068
LabelingFlag
Various flags that affect drawing and placement of labels.
Definition: qgis.h:1899
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition: qgis.h:227
RelationshipType
Relationship types.
Definition: qgis.h:2833
ScriptLanguageCapability
Script language capabilities.
Definition: qgis.h:2943
JoinStyle
Join styles for buffers.
Definition: qgis.h:1502
PointCloudDrawOrder
Pointcloud rendering order for 2d views.
Definition: qgis.h:2702
TextCharacterVerticalAlignment
Text vertical alignment for characters.
Definition: qgis.h:2027
UserProfileSelectionPolicy
User profile selection policy.
Definition: qgis.h:3528
DpiMode
DpiMode enum.
Definition: qgis.h:2292
Q_ENUM(ProfileExportType)
BrowserLayerType
Browser item layer types.
Definition: qgis.h:605
AltitudeBinding
Altitude binding.
Definition: qgis.h:2515
MapLayerActionTarget
Map layer action targets.
Definition: qgis.h:3013
ScriptLanguage
Scripting languages.
Definition: qgis.h:2920
LabelMultiLineAlignment
Text alignment for multi-line labels.
Definition: qgis.h:925
VectorDataProviderTemporalMode
Vector data provider temporal handling modes.
Definition: qgis.h:1729
TextRenderFormat
Options for rendering text.
Definition: qgis.h:1885
DataType
Raster data types.
Definition: qgis.h:241
Q_ENUM(ProfileSurfaceSymbology)
SystemOfMeasurement
Systems of unit measurement.
Definition: qgis.h:3263
RasterAttributeTableFieldUsage
Flags which control behavior of raster renderers.
Definition: qgis.h:1039
VerticalAxisInversion
Vertical axis inversion options for 3D views.
Definition: qgis.h:2624
RelationshipCapability
Relationship capabilities.
Definition: qgis.h:2873
RasterBuildPyramidOption
Raster pyramid building options.
Definition: qgis.h:3182
NavigationMode
The navigation mode used by 3D cameras.
Definition: qgis.h:2612
LayerType
Types of layers that can be added to a map.
Definition: qgis.h:114
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:2587
RenderUnit
Rendering size units.
Definition: qgis.h:3441
CoordinateOrder
Order of coordinates.
Definition: qgis.h:1636
SelectionFlag
Flags which control feature selection behavior.
Definition: qgis.h:1193
EndCapStyle
End cap styles for buffers.
Definition: qgis.h:1489
BabelCommandFlag
Babel GPS format capabilities.
Definition: qgis.h:1395
FieldDomainType
Types of field domain.
Definition: qgis.h:2476
RenderContextFlag
Flags which affect rendering operations.
Definition: qgis.h:1851
RasterPipeInterfaceRole
Sublayer flags.
Definition: qgis.h:988
SymbolPreviewFlag
Symbol flags.
Definition: qgis.h:523
AnnotationItemGuiFlag
Annotation item flags.
Definition: qgis.h:1663
MapBoxGlStyleSourceType
Flags which control project capabilities.
Definition: qgis.h:2795
LayoutUnitType
Types of layout units.
Definition: qgis.h:3481
DashPatternLineEndingRule
Dash pattern line ending rules.
Definition: qgis.h:2236
FieldMetadataProperty
Standard field metadata values.
Definition: qgis.h:1154
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
Definition: qgis.h:1229
HistoryProviderBackend
History provider backends.
Definition: qgis.h:2417
RasterExportType
Raster file export types.
Definition: qgis.h:1081
SublayerPromptMode
Specifies how to handle layer sources with multiple sublayers.
Definition: qgis.h:1140
TextVerticalAlignment
Text vertical alignment.
Definition: qgis.h:2011
RelationshipCardinality
Relationship cardinality.
Definition: qgis.h:2859
GradientType
Gradient types.
Definition: qgis.h:2152
VectorProfileType
Types of elevation profiles to generate for vector sources.
Definition: qgis.h:2650
GpsFeatureType
Babel command flags.
Definition: qgis.h:1409
VectorLayerTypeFlag
Vector layer type flags.
Definition: qgis.h:280
MakeValidMethod
Algorithms to use when repairing invalid geometries.
Definition: qgis.h:1515
VectorTemporalLimitMode
Mode for the handling of the limits of the filtering timeframe for vector features.
Definition: qgis.h:1717
SqlLayerDefinitionCapability
Capabilities supported by a QgsVectorFileWriter object.
Definition: qgis.h:691
VectorEditResult
Flags which control feature selection behavior.
Definition: qgis.h:1214
Q_DECLARE_FLAGS(GeometryValidityFlags, GeometryValidityFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsGeometry
Geometry validity flags.
VolumeUnit
Units of volume.
Definition: qgis.h:3373
AttributeEditorType
Attribute editor types.
Definition: qgis.h:3543
ProfileExportType
Types of export for elevation profiles.
Definition: qgis.h:2677
ProjectFileFormat
Flags which control project read behavior.
Definition: qgis.h:2732
SnappingMode
SnappingMode defines on which layer the snapping is performed.
Definition: qgis.h:451
SymbolType
Attribute editing capabilities which may be supported by vector data providers.
Definition: qgis.h:340
RasterColorInterpretation
Raster color interpretation.
Definition: qgis.h:3098
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
Definition: qgis.h:2637
LabelPlacementEngineVersion
Labeling placement engine version.
Definition: qgis.h:1930
RendererUsage
Usage of the renderer.
Definition: qgis.h:2378
SettingsTreeNodeOption
Options for named list nodes.
Definition: qgis.h:396
BabelFormatCapability
GPS information component.
Definition: qgis.h:1376
PostgresRelKind
Postgres database relkind options.
Definition: qgis.h:3493
GpsConnectionType
GPS connection types.
Definition: qgis.h:1256
BetweenLineConstraint
Between line constraints which can be enabled.
Definition: qgis.h:2527
MetadataDateType
Date types for metadata.
Definition: qgis.h:3080
RasterIdentifyFormat
Raster identify formats.
Definition: qgis.h:3197
TextHorizontalAlignment
Text horizontal alignment.
Definition: qgis.h:1992
SymbolFlag
Flags controlling behavior of symbols.
Definition: qgis.h:509
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
Definition: qgis.h:2540
HttpMethod
Different methods of HTTP requests.
Definition: qgis.h:640
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition: qgis.h:154
SymbolCoordinateReference
Symbol coordinate reference modes.
Definition: qgis.h:2167
TextRendererFlag
Flags which control the behavior of rendering text.
Definition: qgis.h:2341
SelectGeometryRelationship
Geometry relationship test to apply for selecting features.
Definition: qgis.h:1181
CrsAxisDirection
Data provider flags.
Definition: qgis.h:1586
SettingsOrigin
The setting origin describes where a setting is stored.
Definition: qgis.h:2907
LabelOverlapHandling
Label overlap handling.
Definition: qgis.h:767
FeatureSymbologyExport
Options for exporting features considering their symbology.
Definition: qgis.h:3635
CoordinateTransformationFlag
Flags which adjust the coordinate transformations behave.
Definition: qgis.h:1801
TextComponent
Text components.
Definition: qgis.h:1976
TransformDirection
Flags for raster layer temporal capabilities.
Definition: qgis.h:1789
LightSourceType
Light source types for 3D scenes.
Definition: qgis.h:2600
LabelPredefinedPointPosition
Positions for labels when using the Qgis::LabelPlacement::OrderedPositionsAroundPoint placement mode.
Definition: qgis.h:803
UpsideDownLabelHandling
Polygon placement flags, which control how candidates are generated for a polygon feature.
Definition: qgis.h:910
DeviceConnectionStatus
GPS connection status.
Definition: qgis.h:1270
Q_DECLARE_FLAGS(MapSettingsFlags, MapSettingsFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsMapSettings
Map settings flags.
MapSettingsFlag
Coordinate transformation flags.
Definition: qgis.h:1821
SelectBehavior
Specifies how a selection should be applied.
Definition: qgis.h:1167
Utility class that encapsulates an action based on vector attributes.
Definition: qgsaction.h:37
Utility functions for working with ArcGIS REST services.
This is an abstract base class for any elements of a drag and drop form.
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
Contains configuration settings for an editor form.
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.
Contains constants and enums relating to labeling.
Definition: qgslabeling.h:32
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:107
Holds data provider key, description, and associated shared library file or function pointer informat...
A fill symbol layer which places markers at random locations within polygons.
Implementation of data provider temporal properties for QgsRasterDataProviders.
The raster file writer which allows you to save a raster to a new file.
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:3873
Object * operator->()
Returns pointer to blocked QObject.
Definition: qgis.h:3891
~QgsSignalBlocker()
Definition: qgis.h:3885
QgsSignalBlocker(Object *object)
Constructor for QgsSignalBlocker.
Definition: qgis.h:3880
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:94
Base class for templated line symbols, e.g.
Container for all settings relating to text rendering.
Definition: qgstextformat.h:42
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 writing vector layers to disk based formats (e.g.
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:308
@ 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:38
CONSTLATIN1STRING geoNone()
Constant that holds the string representation for "No ellips/No CRS".
Definition: qgis.h:4490
const double DEFAULT_LINE_WIDTH
Definition: qgis.h:4528
CORE_EXPORT uint qHash(const QVariant &variant)
Hash for QVariant.
Definition: qgis.cpp:198
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:4382
CORE_EXPORT QString qgsVsiPrefix(const QString &path)
Definition: qgis.cpp:193
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:247
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:4211
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
Definition: qgis.h:3927
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:4075
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.
Definition: qgis.h:4192
QString qgsFlagValueToKeys(const T &value, bool *returnOk=nullptr)
Returns the value for the given keys of a flag.
Definition: qgis.h:4250
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
Definition: qgis.h:4514
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:4058
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:4272
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:188
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:4543
const QMap< T, QString > qgsEnumMap()
Returns a map of all enum entries.
Definition: qgis.h:4175
bool qgsFloatNear(float a, float b, float epsilon=4 *FLT_EPSILON)
Compare two floats (but allow some difference)
Definition: qgis.h:4005
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:4092
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:72
const QList< T > qgsEnumList()
Returns a list all enum entries.
Definition: qgis.h:4158
double qgsRound(double number, int places)
Returns a double number, rounded (as close as possible) to the specified number of places.
Definition: qgis.h:4042
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
Definition: qgis.h:3988
CONSTLATIN1STRING geoProj4()
PROJ4 string that represents a geographic coord sys.
Definition: qgis.h:4478
bool qgsNanCompatibleEquals(double a, double b)
Compare two doubles, treating nan values as equal.
Definition: qgis.h:3972
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
Definition: qgis.h:3914
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
Definition: qgis.cpp:93
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
Definition: qgis.h:4531
QMap< QString, QString > QgsStringMap
Definition: qgis.h:4533
#define CONSTLATIN1STRING
Definition: qgis.h:4431
CONSTLATIN1STRING geoWkt()
Wkt string that represents a geographic coord sys.
Definition: qgis.h:4470
bool qgsDoubleNearSig(double a, double b, int significantDigits=10)
Compare two doubles using specified number of significant digits.
Definition: qgis.h:4017
const int USER_CRS_START_ID
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/....
Definition: qgis.h:4520
void CORE_EXPORT qgsFree(void *ptr)
Frees the memory space pointed to by ptr.
Definition: qgis.cpp:115
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:86
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:79
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:120
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
Definition: qgis.h:4508
#define QHASH_FOR_CLASS_ENUM(T)
Definition: qgis.h:43
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:4396
CONSTLATIN1STRING geoEpsgCrsAuthId()
Geographic coord sys from EPSG authority.
Definition: qgis.h:4484
const long GEOCRS_ID
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
Definition: qgis.h:4511
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
Definition: qgis.h:4527
#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