37int QgisEvent = QEvent::User + 1;
44#define QHASH_FOR_CLASS_ENUM(T) \
45 inline uint qHash(const T &t, uint seed) { \
46 return ::qHash(static_cast<typename std::underlying_type<T>::type>(t), seed); \
57 Q_CLASSINFO(
"RegisterEnumClassesUnscoped",
"false" )
66 static QString version();
73 static int versionInt();
80 static QString releaseName();
90 static QString devVersion();
107 Q_ENUM( MessageLevel )
164 GeometryCollection = 7,
176 MultiLineStringZ = 1005,
177 MultiPolygonZ = 1006,
178 GeometryCollectionZ = 1007,
179 CircularStringZ = 1008,
180 CompoundCurveZ = 1009,
181 CurvePolygonZ = 1010,
183 MultiSurfaceZ = 1012,
189 MultiLineStringM = 2005,
190 MultiPolygonM = 2006,
191 GeometryCollectionM = 2007,
192 CircularStringM = 2008,
193 CompoundCurveM = 2009,
194 CurvePolygonM = 2010,
196 MultiSurfaceM = 2012,
201 MultiLineStringZM = 3005,
202 MultiPolygonZM = 3006,
203 GeometryCollectionZM = 3007,
204 CircularStringZM = 3008,
205 CompoundCurveZM = 3009,
206 CurvePolygonZM = 3010,
208 MultiSurfaceZM = 3012,
210 Point25D = 0x80000001,
235 Q_ENUM( GeometryType )
257 ARGB32_Premultiplied = 13
273 Q_ENUM( CaptureTechnique )
284 Q_ENUM( VectorLayerTypeFlag )
286 Q_DECLARE_FLAGS( VectorLayerTypeFlags, VectorLayerTypeFlag )
287 Q_FLAG( VectorLayerTypeFlags )
301 Q_ENUM( PythonMacroMode )
313 Q_ENUM( FeatureCountState )
338 Q_ENUM( ScaleMethod )
357 Q_ENUM( SettingsType )
369 Q_ENUM( SettingsTreeNodeType )
377 NamedListSelectedItemSetting = 1 << 0,
380 Q_ENUM( SettingsTreeNodeOption )
381 Q_DECLARE_FLAGS( SettingsTreeNodeOptions, SettingsTreeNodeOption )
382 Q_FLAG( SettingsTreeNodeOptions )
395 Q_ENUM( SldExportOption )
396 Q_DECLARE_FLAGS( SldExportOptions, SldExportOption )
397 Q_FLAG( SldExportOptions )
406 NoVendorExtension = 0,
407 GeoServerVendorExtension = 1 << 1,
408 DeegreeVendorExtension = 1 << 2,
410 Q_ENUM( SldExportVendorExtension )
419 SaveFormerValue = 1 << 1,
420 SaveEnumFlagAsInt = 1 << 2,
422 Q_ENUM( SettingsOption )
423 Q_DECLARE_FLAGS( SettingsOptions, SettingsOption )
424 Q_FLAG( SettingsOptions )
434 AdvancedConfiguration = 3,
436 Q_ENUM( SnappingMode )
452 Q_ENUM( SnappingType )
455 Q_FLAG( SnappingTypes )
466 Q_ENUM( SymbolRenderHint )
469 Q_FLAG( SymbolRenderHints )
478 RendererShouldUseSymbolLevels = 1 << 0,
482 Q_DECLARE_FLAGS( SymbolFlags, SymbolFlag )
483 Q_FLAG( SymbolFlags )
492 FlagIncludeCrosshairsForMarkerSymbols = 1 << 0,
494 Q_ENUM( SymbolPreviewFlag )
497 Q_FLAG( SymbolPreviewFlags )
506 DisableFeatureClipping = 1 << 0,
508 Q_ENUM( SymbolLayerFlag )
510 Q_DECLARE_FLAGS( SymbolLayerFlags, SymbolLayerFlag )
511 Q_FLAG( SymbolLayerFlags )
530 Q_ENUM( BrowserItemType )
543 Q_ENUM( BrowserItemState )
559 ItemRepresentsFile = 1 << 6,
560 RefreshChildrenWhenItemIsRefreshed = 1 << 7,
562 Q_ENUM( BrowserItemCapability )
565 Q_FLAG( BrowserItemCapabilities )
588 Q_ENUM( BrowserLayerType )
601 Q_ENUM( BrowserDirectoryMonitoring )
634 Q_ENUM( VectorExportResult )
642 SubsetStringFilter = 1 << 1,
643 GeometryColumn = 1 << 2,
644 PrimaryKeys = 1 << 3,
645 UnstableFeatureIds = 1 << 4
647 Q_ENUM( SqlLayerDefinitionCapability )
649 Q_DECLARE_FLAGS( SqlLayerDefinitionCapabilities, SqlLayerDefinitionCapability )
650 Q_FLAG( SqlLayerDefinitionCapabilities )
669 Q_ENUM( SqlKeywordCategory )
696 Q_ENUM( ActionStart )
708 Q_ENUM( UnplacedLabelVisibility )
718 AllowOverlapIfRequired,
719 AllowOverlapAtNoCost,
721 Q_ENUM( LabelOverlapHandling )
738 OrderedPositionsAroundPoint,
742 Q_ENUM( LabelPlacement )
767 Q_ENUM( LabelPredefinedPointPosition )
782 Q_ENUM( LabelOffsetType )
803 Q_ENUM( LabelQuadrantPosition )
818 Q_ENUM( UpsideDownLabelHandling )
835 Q_ENUM( LabelMultiLineAlignment )
845 ResolveGeometryType = 1 << 1,
846 CountFeatures = 1 << 2,
847 IncludeSystemTables = 1 << 3,
850 Q_DECLARE_FLAGS( SublayerQueryFlags, SublayerQueryFlag )
851 Q_ENUM( SublayerQueryFlag )
852 Q_FLAG( SublayerQueryFlags )
861 SystemTable = 1 << 0,
864 Q_DECLARE_FLAGS( SublayerFlags, SublayerFlag )
865 Q_ENUM( SublayerFlag )
866 Q_FLAG( SublayerFlags )
884 Q_ENUM( RasterPipeInterfaceRole )
897 Q_ENUM( RasterResamplingStage )
906 InternalLayerOpacityHandling = 1 << 0,
914 Q_DECLARE_FLAGS( RasterRendererFlags, RasterRendererFlag )
916 Q_ENUM( RasterRendererFlag )
917 Q_FLAG( RasterRendererFlags )
946 Q_ENUM( RasterAttributeTableFieldUsage )
958 Q_ENUM( RasterAttributeTableType )
969 TooManyVerticesInFace,
975 Q_ENUM( MeshEditingErrorType )
987 Q_ENUM( FilePathType )
997 AskExcludingRasterBands,
1001 Q_ENUM( SublayerPromptMode )
1013 RemoveFromSelection,
1015 Q_ENUM( SelectBehavior )
1027 Q_ENUM( SelectGeometryRelationship )
1036 SingleFeatureSelection = 1 << 0,
1037 ToggleSelection = 1 << 1,
1045 Q_DECLARE_FLAGS( SelectionFlags, SelectionFlag )
1047 Q_ENUM( SelectionFlag )
1048 Q_FLAG( SelectionFlags )
1060 FetchFeatureFailed = 3,
1063 Q_ENUM( VectorEditResult )
1072 SemiTransparentCircle,
1076 Q_ENUM( VertexMarkerType )
1090 Q_ENUM( ContentStatus )
1104 Q_ENUM( GpsConnectionType )
1117 Q_ENUM( GpsConnectionStatus )
1172 Q_ENUM( GpsQualityIndicator )
1183 GroundSpeed = 1 << 2,
1185 TotalTrackLength = 1 << 4,
1186 TrackDistanceFromStart = 1 << 5,
1190 HorizontalAccuracy = 1 << 9,
1191 VerticalAccuracy = 1 << 10,
1192 HvAccuracy = 1 << 11,
1193 SatellitesUsed = 1 << 12,
1194 Timestamp = 1 << 13,
1195 TrackStartTime = 1 << 14,
1196 TrackEndTime = 1 << 15,
1197 TrackDistanceSinceLastPoint = 1 << 16,
1198 TrackTimeSinceLastPoint = 1 << 17,
1199 GeoidalSeparation = 1 << 18,
1200 EllipsoidAltitude = 1 << 19,
1208 Q_DECLARE_FLAGS( GpsInformationComponents, GpsInformationComponent )
1209 Q_ENUM( GpsInformationComponent )
1210 Q_FLAG( GpsInformationComponents )
1226 Q_DECLARE_FLAGS( BabelFormatCapabilities, BabelFormatCapability )
1227 Q_ENUM( BabelFormatCapability )
1228 Q_FLAG( BabelFormatCapabilities )
1238 QuoteFilePaths = 1 << 0,
1241 Q_DECLARE_FLAGS( BabelCommandFlags, BabelCommandFlag )
1242 Q_ENUM( BabelCommandFlag )
1243 Q_FLAG( BabelCommandFlags )
1256 Q_ENUM( GpsFeatureType )
1268 NothingHappened = 1000,
1269 InvalidBaseGeometry,
1270 InvalidInputGeometryType,
1272 SelectionIsGreaterThanOne,
1273 GeometryEngineError,
1276 AddPartSelectedGeometryNotFound,
1277 AddPartNotMultiGeometry,
1281 AddRingCrossesExistingRings,
1282 AddRingNotInExistingFeature,
1284 SplitCannotSplitPoint,
1286 Q_ENUM( GeometryOperationResult )
1300 Q_FLAG( GeometryValidityFlags )
1311 Q_ENUM( GeometryValidationEngine )
1323 Q_ENUM( BufferSide )
1336 Q_ENUM( EndCapStyle )
1361 Q_ENUM( MakeValidMethod )
1374 Q_ENUM( SpatialFilterType )
1383 IncludeMetadataFile = 1 << 0,
1384 IncludeStyleFile = 1 << 1,
1387 Q_DECLARE_FLAGS( FileOperationFlags, FileOperationFlag )
1388 Q_ENUM( FileOperationFlag )
1389 Q_FLAG( FileOperationFlags )
1398 UsersCannotToggleEditing = 1 << 0,
1399 IsBasemapLayer = 1 << 1,
1402 Q_DECLARE_FLAGS( MapLayerProperties, MapLayerProperty )
1403 Q_ENUM( MapLayerProperty )
1404 Q_FLAG( MapLayerProperties )
1413 IsBasemapSource = 1 << 1,
1416 Q_DECLARE_FLAGS( DataProviderFlags, DataProviderFlag )
1417 Q_ENUM( DataProviderFlag )
1418 Q_FLAG( DataProviderFlags )
1470 Q_ENUM( CrsAxisDirection )
1483 Q_ENUM( CoordinateOrder )
1492 ScaleDependentBoundingBox = 1 << 0,
1495 Q_DECLARE_FLAGS( AnnotationItemFlags, AnnotationItemFlag )
1496 Q_ENUM( AnnotationItemFlag )
1497 Q_FLAG( AnnotationItemFlags )
1506 FlagNoCreationTools = 1 << 0,
1509 Q_DECLARE_FLAGS( AnnotationItemGuiFlags, AnnotationItemGuiFlag )
1510 Q_ENUM( AnnotationItemGuiFlag )
1511 Q_FLAG( AnnotationItemGuiFlags )
1522 Q_ENUM( AnnotationItemNodeType )
1535 Q_ENUM( AnnotationItemEditOperationResult )
1551 Q_ENUM( VectorTemporalMode )
1560 IncludeBeginExcludeEnd = 0,
1561 IncludeBeginIncludeEnd,
1563 Q_ENUM( VectorTemporalLimitMode )
1574 StoresFeatureDateTimeStartAndEndInSeparateFields
SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeStartAndEndInSeparateFields ),
1576 Q_ENUM( VectorDataProviderTemporalMode )
1589 Q_ENUM( RasterTemporalMode )
1598 MatchUsingWholeRange,
1599 MatchExactUsingStartOfRange,
1600 MatchExactUsingEndOfRange,
1601 FindClosestMatchToStartOfRange,
1602 FindClosestMatchToEndOfRange
1604 Q_ENUM( TemporalIntervalMatchMethod )
1613 RequestedTimesMustExactlyMatchAllAvailableTemporalRanges = 1 << 0,
1615 Q_ENUM( RasterTemporalCapabilityFlag )
1622 Q_DECLARE_FLAGS( RasterTemporalCapabilityFlags, RasterTemporalCapabilityFlag )
1623 Q_ENUM( RasterTemporalCapabilityFlags )
1635 Q_ENUM( TransformDirection )
1644 BallparkTransformsAreAppropriate = 1 << 0,
1645 IgnoreImpossibleTransformations = 1 << 1,
1647 Q_ENUM( CoordinateTransformationFlag )
1654 Q_DECLARE_FLAGS( CoordinateTransformationFlags, CoordinateTransformationFlag )
1655 Q_ENUM( CoordinateTransformationFlags )
1664 Antialiasing = 0x01,
1665 DrawEditingInfo = 0x02,
1666 ForceVectorOutput = 0x04,
1667 UseAdvancedEffects = 0x08,
1668 DrawLabeling = 0x10,
1669 UseRenderingOptimization = 0x20,
1670 DrawSelection = 0x40,
1671 DrawSymbolBounds = 0x80,
1672 RenderMapTile = 0x100,
1673 RenderPartialOutput = 0x200,
1674 RenderPreviewJob = 0x400,
1675 RenderBlocking = 0x800,
1676 LosslessImageRendering = 0x1000,
1677 Render3DMap = 0x2000,
1678 HighQualityImageTransforms = 0x4000,
1679 SkipSymbolRendering = 0x8000,
1680 ForceRasterMasks = 0x10000,
1685 Q_FLAG( MapSettingsFlags )
1694 DrawEditingInfo = 0x01,
1695 ForceVectorOutput = 0x02,
1696 UseAdvancedEffects = 0x04,
1697 UseRenderingOptimization = 0x08,
1698 DrawSelection = 0x10,
1699 DrawSymbolBounds = 0x20,
1700 RenderMapTile = 0x40,
1701 Antialiasing = 0x80,
1702 RenderPartialOutput = 0x100,
1703 RenderPreviewJob = 0x200,
1704 RenderBlocking = 0x400,
1705 RenderSymbolPreview = 0x800,
1706 LosslessImageRendering = 0x1000,
1707 ApplyScalingWorkaroundForTextRendering = 0x2000,
1708 Render3DMap = 0x4000,
1709 ApplyClipAfterReprojection = 0x8000,
1710 RenderingSubSymbol = 0x10000,
1711 HighQualityImageTransforms = 0x20000,
1712 SkipSymbolRendering = 0x40000,
1717 Q_FLAG( RenderContextFlags )
1731 Q_ENUM( TextRenderFormat )
1742 UseAllLabels = 1 << 1,
1743 UsePartialCandidates = 1 << 2,
1745 RenderOutlineLabels = 1 << 3,
1746 DrawLabelRectOnly = 1 << 4,
1747 DrawCandidates = 1 << 5,
1748 DrawUnplacedLabels = 1 << 6,
1749 CollectUnplacedLabels = 1 << 7,
1750 DrawLabelMetrics = 1 << 8,
1752 Q_ENUM( LabelingFlag )
1762 Q_FLAG( LabelingFlags )
1776 Q_ENUM( LabelPlacementEngineVersion )
1791 Q_ENUM( TextOrientation )
1805 RectangleCapHeightBased,
1806 RectangleAscentBased,
1808 Q_ENUM( TextLayoutMode )
1824 Q_ENUM( TextComponent )
1840 Q_ENUM( TextHorizontalAlignment )
1858 Q_ENUM( TextVerticalAlignment )
1874 Q_ENUM( TextCharacterVerticalAlignment )
1888 Q_ENUM( RenderSubcomponentProperty )
1899 Q_ENUM( VertexType )
1915 EquilateralTriangle,
1948 Q_ENUM( MarkerShape )
1961 LastVertex = 1 << 2,
1962 FirstVertex = 1 << 3,
1963 CentralPoint = 1 << 4,
1964 CurvePoint = 1 << 5,
1965 SegmentCenter = 1 << 6,
1966 InnerVertices = 1 << 7,
1968 Q_ENUM( MarkerLinePlacement )
1969 Q_DECLARE_FLAGS( MarkerLinePlacements, MarkerLinePlacement )
1970 Q_FLAG( MarkerLinePlacements )
1984 Q_ENUM( GradientColorSource )
1999 Q_ENUM( GradientType )
2013 Q_ENUM( SymbolCoordinateReference )
2029 Q_ENUM( GradientSpread )
2043 Q_ENUM( PointCountMethod )
2057 Q_ENUM( MarkerClipMode )
2070 Q_ENUM( LineClipMode )
2085 Q_ENUM( DashPatternLineEndingRule )
2094 ScaleBothDashAndGap,
2098 Q_ENUM( DashPatternSizeAdjustment )
2112 Q_ENUM( GraduatedMethod )
2138 Q_ENUM( TilePixelRatio )
2154 ForceFirstLetterToCapital = 4,
2157 UpperCamelCase = 1005,
2158 AllSmallCaps = 1006,
2160 Q_ENUM( Capitalization )
2171 Q_ENUM( TextRendererFlag )
2172 Q_DECLARE_FLAGS( TextRendererFlags, TextRendererFlag )
2173 Q_FLAG( TextRendererFlags )
2197 Q_ENUM( AngularDirection )
2210 Q_ENUM( RendererUsage )
2219 Sync3DTo2D = 1 << 0,
2220 Sync2DTo3D = 1 << 1,
2222 Q_ENUM( ViewSyncModeFlag )
2223 Q_DECLARE_FLAGS( ViewSyncModeFlags, ViewSyncModeFlag )
2233 WhenOutsideVisibleExtent,
2236 Q_ENUM( MapRecenteringMode )
2245 LocalProfile = 1 << 0,
2248 Q_ENUM( HistoryProviderBackend )
2249 Q_DECLARE_FLAGS( HistoryProviderBackends, HistoryProviderBackend )
2250 Q_FLAG( HistoryProviderBackends )
2262 Q_ENUM( CrsDefinitionFormat )
2279 Q_ENUM( FieldDomainSplitPolicy )
2295 Q_ENUM( FieldDomainMergePolicy )
2308 Q_ENUM( FieldDomainType )
2318 AutomaticGroups = 1,
2321 Q_ENUM( TransactionMode )
2334 Q_ENUM( AltitudeClamping )
2346 Q_ENUM( AltitudeBinding )
2359 Q_ENUM( BetweenLineConstraint )
2372 Q_ENUM( LineExtensionSide )
2381 EvaluateDefaultValuesOnProviderSide = 1 << 0,
2382 TrustStoredLayerStatistics = 1 << 1,
2383 RememberLayerEditStatusBetweenSessions = 1 << 2,
2384 RememberAttributeTableWindowsBetweenSessions = 1 << 3,
2386 Q_ENUM( ProjectFlag )
2387 Q_DECLARE_FLAGS( ProjectFlags, ProjectFlag )
2388 Q_FLAG( ProjectFlags )
2397 ShowContextMenu = 1 << 0,
2399 Q_ENUM( PlotToolFlag )
2400 Q_DECLARE_FLAGS( PlotToolFlags, PlotToolFlag )
2401 Q_FLAG( PlotToolFlags )
2413 Q_ENUM( LightSourceType )
2425 Q_ENUM( NavigationMode )
2438 Q_ENUM( VerticalAxisInversion )
2471 RespectsMaximumErrorMapUnit = 1 << 0,
2472 RespectsDistanceRange = 1 << 1,
2473 RespectsElevationRange = 1 << 2,
2475 Q_ENUM( ProfileGeneratorFlag )
2476 Q_DECLARE_FLAGS( ProfileGeneratorFlags, ProfileGeneratorFlag )
2477 Q_FLAG( ProfileGeneratorFlags )
2489 Q_ENUM( PointCloudSymbol )
2502 Q_ENUM( PointCloudDrawOrder )
2514 AvoidIntersectionsCurrentLayer,
2515 AvoidIntersectionsLayers,
2517 Q_ENUM( AvoidIntersectionsMode )
2531 Q_ENUM( ProjectFileFormat )
2547 DontLoadProjectStyles = 1 << 5,
2548 ForceReadOnlyLayers = 1 << 6,
2550 Q_ENUM( ProjectReadFlag )
2560 Q_FLAG( ProjectReadFlags )
2572 ProjectStyles = 1 << 0,
2574 Q_ENUM( ProjectCapability )
2581 Q_DECLARE_FLAGS( ProjectCapabilities, ProjectCapability )
2582 Q_FLAG( ProjectCapabilities )
2599 Q_ENUM( MapBoxGlStyleSourceType )
2618 Q_ENUM( ArcGisRestServiceType )
2632 Q_ENUM( RelationshipType )
2646 Q_ENUM( RelationshipStrength )
2660 Q_ENUM( RelationshipCardinality )
2669 MultipleFieldKeys = 1 << 0,
2670 ForwardPathLabel = 1 << 1,
2671 BackwardPathLabel = 1 << 2,
2673 Q_ENUM( RelationshipCapability )
2680 Q_DECLARE_FLAGS( RelationshipCapabilities, RelationshipCapability )
2681 Q_FLAG( RelationshipCapabilities )
2694 Q_ENUM( CoordinateDisplayType )
2707 Q_ENUM( SettingsOrigin )
2726 Q_ENUM( ScriptLanguage )
2735 AboveInsertionPoint,
2737 OptimalInInsertionGroup,
2739 Q_ENUM( LayerTreeInsertionMethod )
2754 Q_ENUM( ActionType )
2766 SingleFeature = 1 << 1,
2767 MultipleFeatures = 1 << 2,
2768 AllActions = Layer | SingleFeature | MultipleFeatures
2770 Q_ENUM( MapLayerActionTarget )
2779 Q_DECLARE_FLAGS( MapLayerActionTargets, MapLayerActionTarget )
2780 Q_FLAG( MapLayerActionTargets )
2791 EnabledOnlyWhenEditable = 1 << 1,
2793 Q_ENUM( MapLayerActionFlag )
2802 Q_DECLARE_FLAGS( MapLayerActionFlags, MapLayerActionFlag )
2803 Q_FLAG( MapLayerActionFlags )
2823 Q_ENUM( AttributeActionType )
2837 Q_ENUM( MetadataDateType )
2867 ContinuousPalette = 17
2869 Q_ENUM( RasterColorInterpretation )
2885 Q_ENUM( RasterLayerType )
2898 SingleBandPseudoColor,
2900 PalettedSingleBandGray,
2901 PalettedSingleBandPseudoColor,
2902 PalettedMultiBandColor,
2903 MultiBandSingleBandGray,
2904 MultiBandSingleBandPseudoColor,
2908 Q_ENUM( RasterDrawingStyle )
2923 Q_ENUM( RasterPyramidFormat )
2938 Q_ENUM( RasterBuildPyramidOption )
2955 Q_ENUM( RasterIdentifyFormat )
2967 Q_ENUM( ElevationMapCombineMethod )
3020 Q_ENUM( SystemOfMeasurement )
3059 Q_ENUM( DistanceUnit )
3074 Q_ENUM( DistanceUnitType )
3121 Q_ENUM( VolumeUnit )
3166 Q_ENUM( TemporalUnit )
3186 Q_ENUM( RenderUnit )
3206 Q_ENUM( LayoutUnit )
3220 Q_ENUM( LayoutUnitType )
3226 static const
double DEFAULT_SEARCH_RADIUS_MM;
3229 static const
float DEFAULT_MAPTOPIXEL_THRESHOLD;
3237 static const QColor DEFAULT_HIGHLIGHT_COLOR;
3243 static const
double DEFAULT_HIGHLIGHT_BUFFER_MM;
3249 static const
double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
3257 static const
double SCALE_PRECISION;
3264 static const
double DEFAULT_Z_COORDINATE;
3271 static const
double DEFAULT_M_COORDINATE;
3278 static const
double UI_SCALE_FACTOR;
3284 static const
double DEFAULT_SNAP_TOLERANCE;
3297 static QString defaultProjectScales();
3304 static
int geosVersionInt();
3311 static
int geosVersionMajor();
3318 static
int geosVersionMinor();
3325 static
int geosVersionPatch();
3332 static QString geosVersion();
3381#define cast_to_fptr(f) f
3403 , mPreviousState( object->blockSignals( true ) )
3408 mObject->blockSignals( mPreviousState );
3416 Object *mObject =
nullptr;
3417 bool mPreviousState;
3441CORE_EXPORT uint
qHash(
const QVariant &variant );
3455 const double roundFactor = std::pow( 10, -
precision );
3456 str = QString::number(
static_cast< long long >( std::round( a / roundFactor ) * roundFactor ) );
3461 if (
str.contains( QLatin1Char(
'.' ) ) )
3464 int idx =
str.length() - 1;
3465 while (
str.at( idx ) ==
'0' && idx > 1 )
3469 if ( idx <
str.length() - 1 )
3470 str.truncate(
str.at( idx ) ==
'.' ? idx : idx + 1 );
3480 if (
str == QLatin1String(
"-0" ) )
3482 return QLatin1String(
"0" );
3495 const bool aIsNan = std::isnan( a );
3496 const bool bIsNan = std::isnan( b );
3497 if ( aIsNan || bIsNan )
3498 return aIsNan && bIsNan;
3509inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * std::numeric_limits<double>::epsilon() )
3511 const bool aIsNan = std::isnan( a );
3512 const bool bIsNan = std::isnan( b );
3513 if ( aIsNan || bIsNan )
3514 return aIsNan && bIsNan;
3516 const double diff = a - b;
3517 return diff > -epsilon && diff <= epsilon;
3526inline bool qgsFloatNear(
float a,
float b,
float epsilon = 4 * FLT_EPSILON )
3528 const bool aIsNan = std::isnan( a );
3529 const bool bIsNan = std::isnan( b );
3530 if ( aIsNan || bIsNan )
3531 return aIsNan && bIsNan;
3533 const float diff = a - b;
3534 return diff > -epsilon && diff <= epsilon;
3540 const bool aIsNan = std::isnan( a );
3541 const bool bIsNan = std::isnan( b );
3542 if ( aIsNan || bIsNan )
3543 return aIsNan && bIsNan;
3551 const double ar = std::frexp( a, &aexp );
3552 const double br = std::frexp( b, &bexp );
3554 return aexp == bexp &&
3565 const double m = ( number < 0.0 ) ? -1.0 : 1.0;
3566 const double scaleFactor = std::pow( 10.0, places );
3567 return ( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
3578template<
class Key,
class Value>
3582 for (
auto it = map.constBegin(); it != map.constEnd(); it++ )
3583 result += QString(
"%1%2" ).arg( it.key() ).arg( separator );
3585 result.chop( separator.size() );
3595template<
class Key,
class Value>
3599 for (
auto it = map.constBegin(); it != map.constEnd(); it++ )
3600 result += QString(
"%1%2" ).arg( it.value() ).arg( separator );
3602 result.chop( separator.size() );
3613QString
qgsSetJoin(
const QSet<T> &set,
const QString &separator )
3616 for (
auto it = set.constBegin(); it != set.constEnd(); it++ )
3617 result += QString(
"%1%2" ).arg( *it ).arg( separator );
3619 result.chop( separator.size() );
3649 template<
typename To,
typename From>
inline To down_cast( From *f )
3652 ( std::is_base_of<From,
3653 typename std::remove_pointer<To>::type>::value ),
3654 "target type not derived from source type" );
3655 Q_ASSERT( f ==
nullptr ||
dynamic_cast<To
>( f ) !=
nullptr );
3656 return static_cast<To
>( f );
3660 QSet<T> listToSet(
const QList<T> &list )
3662 return QSet<T>( list.begin(), list.end() );
3666 QList<T> setToList(
const QSet<T> &set )
3668 return QList<T>( set.begin(), set.end() );
3681 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3682 Q_ASSERT( metaEnum.isValid() );
3684 for (
int idx = 0; idx < metaEnum.keyCount(); ++idx )
3686 enumList.append(
static_cast<T
>( metaEnum.value( idx ) ) );
3698 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3699 Q_ASSERT( metaEnum.isValid() );
3700 QMap<T, QString> enumMap;
3701 for (
int idx = 0; idx < metaEnum.keyCount(); ++idx )
3703 enumMap.insert(
static_cast<T
>( metaEnum.value( idx ) ), QString( metaEnum.key( idx ) ) );
3715 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3716 Q_ASSERT( metaEnum.isValid() );
3717 const char *key = metaEnum.valueToKey(
static_cast<int>( value ) );
3720 *returnOk = key ? true :
false;
3722 return QString::fromUtf8( key );
3732template<
class T> T
qgsEnumKeyToValue(
const QString &key,
const T &defaultValue,
bool tryValueAsKey =
true,
bool *returnOk =
nullptr )
SIP_SKIP
3734 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3735 Q_ASSERT( metaEnum.isValid() );
3737 T v =
static_cast<T
>( metaEnum.keyToValue( key.toUtf8().data(), &ok ) );
3749 if ( tryValueAsKey )
3751 bool canConvert =
false;
3752 const int intValue = key.toInt( &canConvert );
3753 if ( canConvert && metaEnum.valueToKey( intValue ) )
3759 return static_cast<T
>( intValue );
3763 return defaultValue;
3773 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3774 Q_ASSERT( metaEnum.isValid() );
3775 int intValue =
static_cast<int>( value );
3776 const QByteArray ba = metaEnum.valueToKeys( intValue );
3779 const int intValueCheck = metaEnum.keysToValue( ba );
3780 bool ok = intValue == intValueCheck;
3783 return ok ? QString::fromUtf8( ba ) : QString();
3793template<
class T> T
qgsFlagKeysToValue(
const QString &keys,
const T &defaultValue,
bool tryValueAsKey =
true,
bool *returnOk =
nullptr )
SIP_SKIP
3795 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
3796 Q_ASSERT( metaEnum.isValid() );
3798 T v =
static_cast<T
>( metaEnum.keysToValue( keys.toUtf8().constData(), &ok ) );
3810 if ( tryValueAsKey )
3812 bool canConvert =
false;
3813 const int intValue = keys.toInt( &canConvert );
3816 const QByteArray keys = metaEnum.valueToKeys( intValue );
3817 const int intValueCheck = metaEnum.keysToValue( keys );
3818 if ( intValue == intValueCheck )
3824 return T( intValue );
3829 return defaultValue;
3885CORE_EXPORT
bool qgsVariantEqual(
const QVariant &lhs,
const QVariant &rhs );
3895#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
3903inline bool operator> (
const QVariant &v1,
const QVariant &v2 )
3917inline bool operator< (
const QVariant &v1,
const QVariant &v2 )
3924#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
3929template<> CORE_EXPORT
bool qMapLessThanKey<QVariantList>(
const QVariantList &key1,
const QVariantList &key2 )
SIP_SKIP;
3932CORE_EXPORT QString
qgsVsiPrefix(
const QString &path );
3950#define CONSTLATIN1STRING inline const QLatin1String
3952#define CONSTLATIN1STRING constexpr QLatin1String
3956class ScopedIntIncrementor
3960 ScopedIntIncrementor(
int *variable )
3961 : mVariable( variable )
3966 ScopedIntIncrementor(
const ScopedIntIncrementor &other ) =
delete;
3967 ScopedIntIncrementor &operator=(
const ScopedIntIncrementor &other ) =
delete;
3974 mVariable =
nullptr;
3977 ~ScopedIntIncrementor()
3983 int *mVariable =
nullptr;
3993 return QLatin1String(
3994 R
"""(GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["unknown"],AREA["World"],BBOX[-90,-180,90,180]],ID["EPSG",4326]] )"""
4001 return QLatin1String(
"+proj=longlat +datum=WGS84 +no_defs" );
4007 return QLatin1String(
"EPSG:4326" );
4013 return QLatin1String(
"NONE" );
4019const int PREVIEW_JOB_DELAY_MS = 250;
4022const int MAXIMUM_LAYER_PREVIEW_TIME_MS = 250;
4067#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
4069#define Q_NOWARN_DEPRECATED_PUSH \
4070 _Pragma("GCC diagnostic push") \
4071 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
4072#define Q_NOWARN_DEPRECATED_POP \
4073 _Pragma("GCC diagnostic pop");
4074#define Q_NOWARN_UNREACHABLE_PUSH
4075#define Q_NOWARN_UNREACHABLE_POP
4077#elif defined(_MSC_VER)
4079#define Q_NOWARN_DEPRECATED_PUSH \
4080 __pragma(warning(push)) \
4081 __pragma(warning(disable:4996))
4082#define Q_NOWARN_DEPRECATED_POP \
4083 __pragma(warning(pop))
4084#define Q_NOWARN_UNREACHABLE_PUSH \
4085 __pragma(warning(push)) \
4086 __pragma(warning(disable:4702))
4087#define Q_NOWARN_UNREACHABLE_POP \
4088 __pragma(warning(pop))
4092#define Q_NOWARN_DEPRECATED_PUSH
4093#define Q_NOWARN_DEPRECATED_POP
4094#define Q_NOWARN_UNREACHABLE_PUSH
4095#define Q_NOWARN_UNREACHABLE_POP
4102# define QGISEXTERN extern "C" __declspec( dllexport )
4104# if defined(__GNUC__) || defined(__clang__)
4105# define QGISEXTERN extern "C" __attribute__ ((visibility ("default")))
4107# define QGISEXTERN extern "C"
4113#if __cplusplus >= 201500
4114#define FALLTHROUGH [[fallthrough]];
4115#elif defined(__clang__)
4116#define FALLTHROUGH [[clang::fallthrough]];
4117#elif defined(__GNUC__) && __GNUC__ >= 7
4118#define FALLTHROUGH [[gnu::fallthrough]];
4124#if __cplusplus >= 201703L
4125#define NODISCARD [[nodiscard]]
4126#elif defined(__clang__)
4127#define NODISCARD [[nodiscard]]
4128#elif defined(_MSC_VER)
4130#elif defined(__has_cpp_attribute)
4131#if __has_cpp_attribute(nodiscard)
4132#define NODISCARD [[nodiscard]]
4133#elif __has_cpp_attribute(gnu::warn_unused_result)
4134#define NODISCARD [[gnu::warn_unused_result]]
4136#define NODISCARD Q_REQUIRED_RESULT
4139#define NODISCARD Q_REQUIRED_RESULT
4142#if __cplusplus >= 201703L
4143#define MAYBE_UNUSED [[maybe_unused]]
4144#elif defined(__clang__)
4145#define MAYBE_UNUSED [[maybe_unused]]
4146#elif defined(_MSC_VER)
4148#elif defined(__has_cpp_attribute)
4149#if __has_cpp_attribute(gnu::unused)
4150#define MAYBE_UNUSED [[gnu::unused]]
4164#define BUILTIN_UNREACHABLE \
4166#elif defined(__GNUC__) && !defined(__clang__)
4177#define BUILTIN_UNREACHABLE \
4178 __builtin_unreachable();
4180#define BUILTIN_UNREACHABLE
4190QString CORE_EXPORT
geoWkt();
The Qgis class provides global constants for use throughout the application.
DistanceUnitType
Types of distance units.
GnssConstellation
GNSS constellation.
SettingsOption
Settings options.
ProfileGeneratorFlag
Flags that control the way the QgsAbstractProfileGenerator operate.
GpsQualityIndicator
GPS signal quality indicator.
ProjectReadFlag
Flags which control project read behavior.
PointCloudSymbol
Rendering symbols for point cloud points.
GeometryValidityFlag
Geometry validity check flags.
MapLayerActionFlag
Map layer action targets.
MapLayerProperty
File operation flags.
BufferSide
Side of line to buffer.
RasterResamplingStage
Stage at which raster resampling occurs.
AltitudeClamping
Altitude clamping.
VectorTemporalMode
Vector layer temporal feature modes.
SublayerFlag
Sublayer query flags.
CoordinateDisplayType
Relationship capabilities.
DashPatternSizeAdjustment
Dash pattern size adjustment options.
GpsFixStatus
GPS fix status.
AnnotationItemNodeType
Annotation item GUI flags.
static const char * QGIS_DEV_VERSION
The development version.
AngularDirection
Angular directions.
ContentStatus
Status for fetched or stored content.
SnappingType
SnappingTypeFlag defines on what object the snapping is performed.
LayoutUnit
Layout measurement units.
RelationshipStrength
Relationship strength.
Q_ENUM(GnssConstellation)
MarkerLinePlacement
Defines how/where the symbols should be placed on a line.
GeometryOperationResult
Success or failure of a geometry operation.
BrowserItemState
Browser item states.
MarkerClipMode
Marker clipping modes.
AnnotationItemFlag
Flags for annotation items.
RenderSubcomponentProperty
Rendering subcomponent properties.
SymbolRenderHint
Flags controlling behavior of symbols during rendering.
AngleUnit
Units of angles.
CaptureTechnique
Capture technique.
BrowserItemCapability
Browser item capabilities.
LayerTreeInsertionMethod
Layer tree insertion methods.
LineClipMode
Line clipping modes.
BrowserDirectoryMonitoring
Browser directory item monitoring switches.
SettingsTreeNodeType
Type of tree node.
TilePixelRatio
DpiMode enum.
LabelOffsetType
Behavior modifier for label offset and distance, only applies in some label placement modes.
GradientColorSource
Gradient color sources.
LabelPlacement
Placement modes which determine how label candidates are generated for a feature.
RasterLayerType
Raster layer types.
RasterPyramidFormat
Raster pyramid formats.
VectorExportResult
Vector layer export result codes.
DistanceUnit
Units of distance.
RasterTemporalCapabilityFlag
Flags for raster layer temporal capabilities.
SymbolLayerFlag
Flags controlling behavior of symbol layers.
GradientSpread
Gradient spread options, which control how gradients are rendered outside of their start and end poin...
ScaleMethod
Scale methods.
SldExportOption
SLD export options.
FilePathType
File path types.
PointCountMethod
Methods which define the number of points randomly filling a polygon.
SldExportVendorExtension
SLD export vendor extensions, allow the use of vendor extensions when exporting to SLD.
VertexType
Types of vertex.
DataProviderFlag
Map layer properties.
GeometryValidationEngine
Available engines for validating geometries.
TransactionMode
Transaction mode.
Q_ENUM(ScaleToTileZoomLevelMethod)
ElevationMapCombineMethod
Methods used to select the elevation when two elevation maps are combined.
RasterDrawingStyle
Raster drawing styles.
GpsInformationComponent
GPS information component.
ViewSyncModeFlag
Synchronization of 2D map canvas and 3D view.
FileOperationFlag
File operation flags.
ProjectCapability
Flags which control project capabilities.
Q_ENUM(VectorProfileType)
AttributeActionType
Map layer action flags.
FieldDomainMergePolicy
Merge policy for field domains.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
SqlKeywordCategory
SQL layer definition capabilities.
GraduatedMethod
Methods for modifying symbols by range in a graduated symbol renderer.
TextLayoutMode
Text layout modes.
RasterRendererFlag
Flags which control behavior of raster renderers.
MeshEditingErrorType
Type of error that can occur during mesh frame editing.
FieldDomainSplitPolicy
Split policy for field domains.
ArcGisRestServiceType
Available ArcGIS REST service types.
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
MapRecenteringMode
Modes for recentering map canvases.
ActionStart
Enum to determine when an operation would begin.
AvoidIntersectionsMode
Flags which control how intersections of pre-existing feature are handled when digitizing new feature...
MarkerShape
Marker shapes.
BlendMode
Blending modes defining the available composition modes that can be used when painting.
Capitalization
String capitalization options.
TemporalIntervalMatchMethod
Method to use when resolving a temporal range to a data provider layer or band.
LabelQuadrantPosition
Label quadrant positions.
ScaleToTileZoomLevelMethod
Available methods for converting map scales to tile zoom levels.
SublayerQueryFlag
Flags which control how data providers will scan for sublayers in a dataset.
TextOrientation
Text orientations.
PythonMacroMode
Vector layer type flags.
TemporalUnit
Temporal units.
UnplacedLabelVisibility
Unplaced label visibility.
CrsDefinitionFormat
CRS definition formats.
SpatialFilterType
Feature request spatial filter types.
ProjectFlag
Flags which control the behavior of QgsProjects.
BrowserItemType
Symbol layer flags.
SettingsType
Types of settings entries.
RasterTemporalMode
Raster layer temporal modes.
RasterAttributeTableType
The RasterAttributeTableType enum represents the type of RAT.
LabelingFlag
Various flags that affect drawing and placement of labels.
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
RelationshipType
Relationship types.
JoinStyle
Join styles for buffers.
PointCloudDrawOrder
Pointcloud rendering order for 2d views.
TextCharacterVerticalAlignment
Text vertical alignment for characters.
BrowserLayerType
Browser item layer types.
AltitudeBinding
Altitude binding.
MapLayerActionTarget
Map layer action targets.
ScriptLanguage
Scripting languages.
LabelMultiLineAlignment
Text alignment for multi-line labels.
VectorDataProviderTemporalMode
Vector data provider temporal handling modes.
TextRenderFormat
Options for rendering text.
DataType
Raster data types.
Q_ENUM(ProfileSurfaceSymbology)
SystemOfMeasurement
Systems of unit measurement.
RasterAttributeTableFieldUsage
Flags which control behavior of raster renderers.
VerticalAxisInversion
Vertical axis inversion options for 3D views.
RelationshipCapability
Relationship capabilities.
RasterBuildPyramidOption
Raster pyramid building options.
NavigationMode
The navigation mode used by 3D cameras.
LayerType
Types of layers that can be added to a map.
Q_DECLARE_FLAGS(RenderContextFlags, RenderContextFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsRenderContext
Render context flags.
PlotToolFlag
Flags that control the way the QgsPlotTools operate.
RenderUnit
Rendering size units.
CoordinateOrder
Order of coordinates.
SelectionFlag
Flags which control feature selection behavior.
EndCapStyle
End cap styles for buffers.
BabelCommandFlag
Babel GPS format capabilities.
FieldDomainType
Types of field domain.
RenderContextFlag
Flags which affect rendering operations.
RasterPipeInterfaceRole
Sublayer flags.
SymbolPreviewFlag
Symbol flags.
AnnotationItemGuiFlag
Annotation item flags.
MapBoxGlStyleSourceType
Flags which control project capabilities.
LayoutUnitType
Types of layout units.
DashPatternLineEndingRule
Dash pattern line ending rules.
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
HistoryProviderBackend
History provider backends.
SublayerPromptMode
Specifies how to handle layer sources with multiple sublayers.
TextVerticalAlignment
Text vertical alignment.
RelationshipCardinality
Relationship cardinality.
GradientType
Gradient types.
VectorProfileType
Types of elevation profiles to generate for vector sources.
GpsFeatureType
Babel command flags.
VectorLayerTypeFlag
Vector layer type flags.
MakeValidMethod
Algorithms to use when repairing invalid geometries.
VectorTemporalLimitMode
Mode for the handling of the limits of the filtering timeframe for vector features.
SqlLayerDefinitionCapability
SqlLayerDefinitionCapability enum lists the arguments supported by the provider when creating SQL que...
VectorEditResult
Flags which control feature selection behavior.
Q_DECLARE_FLAGS(GeometryValidityFlags, GeometryValidityFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsGeometry
Geometry validity flags.
VolumeUnit
Units of volume.
ProjectFileFormat
Flags which control project read behavior.
SnappingMode
SnappingMode defines on which layer the snapping is performed.
RasterColorInterpretation
Raster color interpretation.
ProfileSurfaceSymbology
Surface symbology type for elevation profile plots.
LabelPlacementEngineVersion
Labeling placement engine version.
RendererUsage
Usage of the renderer.
SettingsTreeNodeOption
Options for named list nodes.
BabelFormatCapability
GPS information component.
GpsConnectionType
GPS connection types.
GpsConnectionStatus
GPS connection status.
BetweenLineConstraint
Between line constraints which can be enabled.
MetadataDateType
Date types for metadata.
RasterIdentifyFormat
Raster identify formats.
TextHorizontalAlignment
Text horizontal alignment.
SymbolFlag
Flags controlling behavior of symbols.
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
HttpMethod
Different methods of HTTP requests.
WkbType
The WKB type describes the number of dimensions a geometry has.
SymbolCoordinateReference
Symbol coordinate reference modes.
TextRendererFlag
Flags which control the behavior of rendering text.
SelectGeometryRelationship
Geometry relationship test to apply for selecting features.
CrsAxisDirection
Data provider flags.
SettingsOrigin
The setting origin describes where a setting is stored.
LabelOverlapHandling
Label overlap handling.
CoordinateTransformationFlag
Flags which adjust the coordinate transformations behave.
TextComponent
Text components.
TransformDirection
Flags for raster layer temporal capabilities.
LightSourceType
Light source types for 3D scenes.
LabelPredefinedPointPosition
Positions for labels when using the Qgis::LabelPlacement::OrderedPositionsAroundPoint placement mode.
UpsideDownLabelHandling
Handling techniques for upside down labels.
Q_DECLARE_FLAGS(MapSettingsFlags, MapSettingsFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsMapSettings
Map settings flags.
MapSettingsFlag
Coordinate transformation flags.
SelectBehavior
Specifies how a selection should be applied.
Utility class that encapsulates an action based on vector attributes.
Utility functions for working with ArcGIS REST services.
This class represents a coordinate reference system (CRS).
Abstract base class for curved geometry type.
Base class for all items in the model.
A geometry is the spatial representation of a feature.
Stores global configuration for labeling engine.
Item that represents a layer that can be opened with one of the providers.
Base class for all map layer types.
The QgsMapSettings class contains configuration for rendering of the map.
Registry for temporary fetched files.
Misc painting enums and functions.
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,...
A fill symbol layer which places markers at random locations within polygons.
Implementation of data provider temporal properties for QgsRasterDataProviders.
Implementation of map layer temporal properties for raster layers.
Represents a raster layer.
Contains a pipeline of raster interfaces for sequential raster processing.
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.
Object * operator->()
Returns pointer to blocked QObject.
QgsSignalBlocker(Object *object)
Constructor for QgsSignalBlocker.
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.
Base class for templated line symbols, e.g.
Container for all settings relating to text rendering.
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.
Helper functions for various unit types.
Implementation of data provider temporal properties for QgsVectorDataProviders.
This is the base class for vector data providers.
A convenience class for exporting vector layers to a destination data provider.
Implementation of map layer temporal properties for vector layers.
Represents a vector layer which manages a vector based data sets.
Handles storage of information regarding WKB types and their properties.
FeatureCountState
Enumeration of feature count states.
@ 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
CONSTLATIN1STRING geoNone()
Constant that holds the string representation for "No ellips/No CRS".
const double DEFAULT_LINE_WIDTH
CORE_EXPORT uint qHash(const QVariant &variant)
Hash for QVariant.
bool operator>(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is greater than the second.
CORE_EXPORT QString qgsVsiPrefix(const QString &path)
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...
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.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
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.
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.
QString qgsFlagValueToKeys(const T &value, bool *returnOk=nullptr)
Returns the value for the given keys of a flag.
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
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.
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.
CORE_EXPORT bool qgsVariantGreaterThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is greater than the second.
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...
const QMap< T, QString > qgsEnumMap()
Returns a map of all enum entries.
bool qgsFloatNear(float a, float b, float epsilon=4 *FLT_EPSILON)
Compare two floats (but allow some difference)
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.
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...
const QList< T > qgsEnumList()
Returns a list all enum entries.
double qgsRound(double number, int places)
Returns a double number, rounded (as close as possible) to the specified number of places.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
CONSTLATIN1STRING geoProj4()
PROJ4 string that represents a geographic coord sys.
bool qgsNanCompatibleEquals(double a, double b)
Compare two doubles, treating nan values as equal.
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
QMap< QString, QString > QgsStringMap
#define CONSTLATIN1STRING
CONSTLATIN1STRING geoWkt()
Wkt string that represents a geographic coord sys.
bool qgsDoubleNearSig(double a, double b, int significantDigits=10)
Compare two doubles using specified number of significant digits.
const int USER_CRS_START_ID
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/....
void CORE_EXPORT qgsFree(void *ptr)
Frees the memory space pointed to by ptr.
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...
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...
CORE_EXPORT bool qgsVariantLessThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is less than the second.
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
#define QHASH_FOR_CLASS_ENUM(T)
bool operator<(const QVariant &v1, const QVariant &v2)
Compares two QVariant values and returns whether the first is less than the second.
CONSTLATIN1STRING geoEpsgCrsAuthId()
Geographic coord sys from EPSG authority.
const long GEOCRS_ID
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_MONKEYPATCH_FLAGS_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_MONKEYPATCH_SCOPEENUM
#define SIP_MONKEYPATCH_COMPAT_NAME(FORMERNAME)
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.
Utility class for identifying a unique vertex within a geometry.