28 #include "qgis_core.h"
37 int QgisEvent = QEvent::User + 1;
61 #define QHASH_FOR_CLASS_ENUM(T) \
62 inline uint qHash(const T &t, uint seed) { \
63 return ::qHash(static_cast<typename std::underlying_type<T>::type>(t), seed); \
81 static QString version();
88 static int versionInt();
95 static QString releaseName();
105 static QString devVersion();
122 Q_ENUM( MessageLevel )
143 ARGB32_Premultiplied = 13
159 Q_ENUM( CaptureTechnique )
170 Q_ENUM( VectorLayerTypeFlag )
172 Q_DECLARE_FLAGS( VectorLayerTypeFlags, VectorLayerTypeFlag )
173 Q_FLAG( VectorLayerTypeFlags )
187 Q_ENUM( PythonMacroMode )
199 Q_ENUM( FeatureCountState )
224 Q_ENUM( ScaleMethod )
241 Q_ENUM( SettingsType )
249 SaveFormerValue = 1 << 1,
250 SaveEnumFlagAsInt = 1 << 2,
252 Q_ENUM( SettingsOption )
253 Q_DECLARE_FLAGS( SettingsOptions, SettingsOption )
254 Q_FLAG( SettingsOptions )
264 AdvancedConfiguration = 3,
266 Q_ENUM( SnappingMode )
282 Q_ENUM( SnappingType )
285 Q_FLAG( SnappingTypes )
296 Q_ENUM( SymbolRenderHint )
299 Q_FLAG( SymbolRenderHints )
308 RendererShouldUseSymbolLevels = 1 << 0,
312 Q_DECLARE_FLAGS( SymbolFlags, SymbolFlag )
313 Q_FLAG( SymbolFlags )
322 FlagIncludeCrosshairsForMarkerSymbols = 1 << 0,
324 Q_ENUM( SymbolPreviewFlag )
327 Q_FLAG( SymbolPreviewFlags )
336 DisableFeatureClipping = 1 << 0,
338 Q_ENUM( SymbolLayerFlag )
340 Q_DECLARE_FLAGS( SymbolLayerFlags, SymbolLayerFlag )
341 Q_FLAG( SymbolLayerFlags )
360 Q_ENUM( BrowserItemType )
373 Q_ENUM( BrowserItemState )
389 ItemRepresentsFile = 1 << 6,
390 RefreshChildrenWhenItemIsRefreshed = 1 << 7,
392 Q_ENUM( BrowserItemCapability )
395 Q_FLAG( BrowserItemCapabilities )
418 Q_ENUM( BrowserLayerType )
431 Q_ENUM( BrowserDirectoryMonitoring )
464 Q_ENUM( VectorExportResult )
472 SubsetStringFilter = 1 << 1,
473 GeometryColumn = 1 << 2,
474 PrimaryKeys = 1 << 3,
475 UnstableFeatureIds = 1 << 4
477 Q_ENUM( SqlLayerDefinitionCapability )
479 Q_DECLARE_FLAGS( SqlLayerDefinitionCapabilities, SqlLayerDefinitionCapability )
480 Q_FLAG( SqlLayerDefinitionCapabilities )
499 Q_ENUM( SqlKeywordCategory )
526 Q_ENUM( ActionStart )
538 Q_ENUM( UnplacedLabelVisibility )
548 AllowOverlapIfRequired,
549 AllowOverlapAtNoCost,
551 Q_ENUM( LabelOverlapHandling )
568 OrderedPositionsAroundPoint,
572 Q_ENUM( LabelPlacement )
597 Q_ENUM( LabelPredefinedPointPosition )
612 Q_ENUM( LabelOffsetType )
633 Q_ENUM( LabelQuadrantPosition )
648 Q_ENUM( UpsideDownLabelHandling )
665 Q_ENUM( LabelMultiLineAlignment )
675 ResolveGeometryType = 1 << 1,
676 CountFeatures = 1 << 2,
677 IncludeSystemTables = 1 << 3,
680 Q_DECLARE_FLAGS( SublayerQueryFlags, SublayerQueryFlag )
681 Q_ENUM( SublayerQueryFlag )
682 Q_FLAG( SublayerQueryFlags )
691 SystemTable = 1 << 0,
694 Q_DECLARE_FLAGS( SublayerFlags, SublayerFlag )
695 Q_ENUM( SublayerFlag )
696 Q_FLAG( SublayerFlags )
714 Q_ENUM( RasterPipeInterfaceRole )
727 Q_ENUM( RasterResamplingStage )
738 TooManyVerticesInFace,
744 Q_ENUM( MeshEditingErrorType )
756 Q_ENUM( FilePathType )
766 AskExcludingRasterBands,
770 Q_ENUM( SublayerPromptMode )
784 Q_ENUM( SelectBehavior )
796 FetchFeatureFailed = 3,
799 Q_ENUM( VectorEditResult )
808 SemiTransparentCircle,
812 Q_ENUM( VertexMarkerType )
826 Q_ENUM( ContentStatus )
846 Q_ENUM( GpsQualityIndicator )
862 Q_DECLARE_FLAGS( BabelFormatCapabilities, BabelFormatCapability )
863 Q_ENUM( BabelFormatCapability )
864 Q_FLAG( BabelFormatCapabilities )
874 QuoteFilePaths = 1 << 0,
877 Q_DECLARE_FLAGS( BabelCommandFlags, BabelCommandFlag )
878 Q_ENUM( BabelCommandFlag )
879 Q_FLAG( BabelCommandFlags )
892 Q_ENUM( GpsFeatureType )
904 NothingHappened = 1000,
906 InvalidInputGeometryType,
908 SelectionIsGreaterThanOne,
912 AddPartSelectedGeometryNotFound,
913 AddPartNotMultiGeometry,
917 AddRingCrossesExistingRings,
918 AddRingNotInExistingFeature,
920 SplitCannotSplitPoint,
922 Q_ENUM( GeometryOperationResult )
935 Q_ENUM( GeometryValidityFlag )
936 Q_FLAG( GeometryValidityFlags )
947 Q_ENUM( GeometryValidationEngine )
972 Q_ENUM( EndCapStyle )
998 Q_ENUM( SpatialFilterType )
1007 IncludeMetadataFile = 1 << 0,
1008 IncludeStyleFile = 1 << 1,
1011 Q_DECLARE_FLAGS( FileOperationFlags, FileOperationFlag )
1012 Q_ENUM( FileOperationFlag )
1013 Q_FLAG( FileOperationFlags )
1022 UsersCannotToggleEditing = 1 << 0,
1023 IsBasemapLayer = 1 << 1,
1026 Q_DECLARE_FLAGS( MapLayerProperties, MapLayerProperty )
1027 Q_ENUM( MapLayerProperty )
1028 Q_FLAG( MapLayerProperties )
1037 IsBasemapSource = 1 << 1,
1040 Q_DECLARE_FLAGS( DataProviderFlags, DataProviderFlag )
1041 Q_ENUM( DataProviderFlag )
1042 Q_FLAG( DataProviderFlags )
1094 Q_ENUM( CrsAxisDirection )
1107 Q_ENUM( CoordinateOrder )
1116 ScaleDependentBoundingBox = 1 << 0,
1119 Q_DECLARE_FLAGS( AnnotationItemFlags, AnnotationItemFlag )
1120 Q_ENUM( AnnotationItemFlag )
1121 Q_FLAG( AnnotationItemFlags )
1130 FlagNoCreationTools = 1 << 0,
1133 Q_DECLARE_FLAGS( AnnotationItemGuiFlags, AnnotationItemGuiFlag )
1134 Q_ENUM( AnnotationItemGuiFlag )
1135 Q_FLAG( AnnotationItemGuiFlags )
1146 Q_ENUM( AnnotationItemNodeType )
1159 Q_ENUM( AnnotationItemEditOperationResult )
1175 Q_ENUM( VectorTemporalMode )
1184 IncludeBeginExcludeEnd = 0,
1185 IncludeBeginIncludeEnd,
1187 Q_ENUM( VectorTemporalLimitMode )
1198 StoresFeatureDateTimeStartAndEndInSeparateFields
SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeStartAndEndInSeparateFields ),
1200 Q_ENUM( VectorDataProviderTemporalMode )
1213 Q_ENUM( RasterTemporalMode )
1222 MatchUsingWholeRange,
1223 MatchExactUsingStartOfRange,
1224 MatchExactUsingEndOfRange,
1225 FindClosestMatchToStartOfRange,
1226 FindClosestMatchToEndOfRange
1228 Q_ENUM( TemporalIntervalMatchMethod )
1240 Q_ENUM( TransformDirection )
1249 BallparkTransformsAreAppropriate = 1 << 0,
1250 IgnoreImpossibleTransformations = 1 << 1,
1252 Q_ENUM( CoordinateTransformationFlag )
1259 Q_DECLARE_FLAGS( CoordinateTransformationFlags, CoordinateTransformationFlag )
1260 Q_ENUM( CoordinateTransformationFlags )
1269 Antialiasing = 0x01,
1270 DrawEditingInfo = 0x02,
1271 ForceVectorOutput = 0x04,
1272 UseAdvancedEffects = 0x08,
1273 DrawLabeling = 0x10,
1274 UseRenderingOptimization = 0x20,
1275 DrawSelection = 0x40,
1276 DrawSymbolBounds = 0x80,
1277 RenderMapTile = 0x100,
1278 RenderPartialOutput = 0x200,
1279 RenderPreviewJob = 0x400,
1280 RenderBlocking = 0x800,
1281 LosslessImageRendering = 0x1000,
1282 Render3DMap = 0x2000,
1283 HighQualityImageTransforms = 0x4000,
1284 SkipSymbolRendering = 0x8000,
1285 ForceRasterMasks = 0x10000,
1289 Q_ENUM( MapSettingsFlag )
1290 Q_FLAG( MapSettingsFlags )
1299 DrawEditingInfo = 0x01,
1300 ForceVectorOutput = 0x02,
1301 UseAdvancedEffects = 0x04,
1302 UseRenderingOptimization = 0x08,
1303 DrawSelection = 0x10,
1304 DrawSymbolBounds = 0x20,
1305 RenderMapTile = 0x40,
1306 Antialiasing = 0x80,
1307 RenderPartialOutput = 0x100,
1308 RenderPreviewJob = 0x200,
1309 RenderBlocking = 0x400,
1310 RenderSymbolPreview = 0x800,
1311 LosslessImageRendering = 0x1000,
1312 ApplyScalingWorkaroundForTextRendering = 0x2000,
1313 Render3DMap = 0x4000,
1314 ApplyClipAfterReprojection = 0x8000,
1315 RenderingSubSymbol = 0x10000,
1316 HighQualityImageTransforms = 0x20000,
1317 SkipSymbolRendering = 0x40000,
1321 Q_ENUM( RenderContextFlag )
1322 Q_FLAG( RenderContextFlags )
1336 Q_ENUM( TextRenderFormat )
1350 Q_ENUM( RenderSubcomponentProperty )
1361 Q_ENUM( VertexType )
1377 EquilateralTriangle,
1402 Q_ENUM( MarkerShape )
1415 LastVertex = 1 << 2,
1416 FirstVertex = 1 << 3,
1417 CentralPoint = 1 << 4,
1418 CurvePoint = 1 << 5,
1419 SegmentCenter = 1 << 6,
1420 InnerVertices = 1 << 7,
1422 Q_ENUM( MarkerLinePlacement )
1423 Q_DECLARE_FLAGS( MarkerLinePlacements, MarkerLinePlacement )
1424 Q_FLAG( MarkerLinePlacements )
1438 Q_ENUM( GradientColorSource )
1453 Q_ENUM( GradientType )
1467 Q_ENUM( SymbolCoordinateReference )
1483 Q_ENUM( GradientSpread )
1497 Q_ENUM( PointCountMethod )
1511 Q_ENUM( MarkerClipMode )
1524 Q_ENUM( LineClipMode )
1539 Q_ENUM( DashPatternLineEndingRule )
1548 ScaleBothDashAndGap,
1552 Q_ENUM( DashPatternSizeAdjustment )
1566 Q_ENUM( GraduatedMethod )
1597 ForceFirstLetterToCapital = 4,
1600 UpperCamelCase = 1005,
1601 AllSmallCaps = 1006,
1603 Q_ENUM( Capitalization )
1614 Q_ENUM( TextRendererFlag )
1615 Q_DECLARE_FLAGS( TextRendererFlags, TextRendererFlag )
1616 Q_FLAG( TextRendererFlags )
1628 Q_ENUM( ScaleToTileZoomLevelMethod );
1640 Q_ENUM( AngularDirection )
1653 Q_ENUM( RendererUsage )
1662 Sync3DTo2D = 1 << 0,
1663 Sync2DTo3D = 1 << 1,
1665 Q_ENUM( ViewSyncModeFlag )
1666 Q_DECLARE_FLAGS( ViewSyncModeFlags, ViewSyncModeFlag )
1675 LocalProfile = 1 << 0,
1678 Q_ENUM( HistoryProviderBackend )
1679 Q_DECLARE_FLAGS( HistoryProviderBackends, HistoryProviderBackend )
1680 Q_FLAG( HistoryProviderBackends )
1692 Q_ENUM( CrsDefinitionFormat )
1708 Q_ENUM( FieldDomainSplitPolicy )
1724 Q_ENUM( FieldDomainMergePolicy )
1737 Q_ENUM( FieldDomainType )
1747 AutomaticGroups = 1,
1750 Q_ENUM( TransactionMode )
1763 Q_ENUM( AltitudeClamping )
1775 Q_ENUM( AltitudeBinding )
1788 Q_ENUM( BetweenLineConstraint )
1801 Q_ENUM( LineExtensionSide )
1810 EvaluateDefaultValuesOnProviderSide = 1 << 0,
1811 TrustStoredLayerStatistics = 1 << 1,
1812 RememberLayerEditStatusBetweenSessions = 1 << 2,
1813 RememberAttributeTableWindowsBetweenSessions = 1 << 3,
1815 Q_ENUM( ProjectFlag )
1816 Q_DECLARE_FLAGS( ProjectFlags, ProjectFlag )
1817 Q_FLAG( ProjectFlags )
1826 ShowContextMenu = 1 << 0,
1828 Q_ENUM( PlotToolFlag )
1829 Q_DECLARE_FLAGS( PlotToolFlags, PlotToolFlag )
1830 Q_FLAG( PlotToolFlags )
1842 Q_ENUM( LightSourceType )
1854 Q_ENUM( ProfileSurfaceSymbology );
1866 Q_ENUM( VectorProfileType );
1875 RespectsMaximumErrorMapUnit = 1 << 0,
1876 RespectsDistanceRange = 1 << 1,
1877 RespectsElevationRange = 1 << 2,
1879 Q_ENUM( ProfileGeneratorFlag )
1880 Q_DECLARE_FLAGS( ProfileGeneratorFlags, ProfileGeneratorFlag )
1881 Q_FLAG( ProfileGeneratorFlags )
1893 Q_ENUM( PointCloudSymbol )
1906 Q_ENUM( PointCloudDrawOrder )
1918 AvoidIntersectionsCurrentLayer,
1919 AvoidIntersectionsLayers,
1921 Q_ENUM( AvoidIntersectionsMode )
1935 Q_ENUM( ProjectFileFormat )
1951 DontLoadProjectStyles = 1 << 5,
1953 Q_ENUM( ProjectReadFlag )
1963 Q_FLAG( ProjectReadFlags )
1975 ProjectStyles = 1 << 0,
1977 Q_ENUM( ProjectCapability )
1984 Q_DECLARE_FLAGS( ProjectCapabilities, ProjectCapability )
1985 Q_FLAG( ProjectCapabilities )
1991 static const
double DEFAULT_SEARCH_RADIUS_MM;
1994 static const
float DEFAULT_MAPTOPIXEL_THRESHOLD;
2002 static const QColor DEFAULT_HIGHLIGHT_COLOR;
2008 static const
double DEFAULT_HIGHLIGHT_BUFFER_MM;
2014 static const
double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
2022 static const
double SCALE_PRECISION;
2029 static const
double DEFAULT_Z_COORDINATE;
2036 static const
double DEFAULT_M_COORDINATE;
2043 static const
double UI_SCALE_FACTOR;
2049 static const
double DEFAULT_SNAP_TOLERANCE;
2062 static QString defaultProjectScales();
2069 static
int geosVersionInt();
2076 static
int geosVersionMajor();
2083 static
int geosVersionMinor();
2090 static
int geosVersionPatch();
2097 static QString geosVersion();
2137 #define cast_to_fptr(f) f
2159 , mPreviousState( object->blockSignals( true ) )
2164 mObject->blockSignals( mPreviousState );
2172 Object *mObject =
nullptr;
2173 bool mPreviousState;
2197 CORE_EXPORT uint
qHash(
const QVariant &variant );
2211 const double roundFactor = std::pow( 10, -
precision );
2212 str = QString::number(
static_cast< long long >( std::round( a / roundFactor ) * roundFactor ) );
2217 if (
str.contains( QLatin1Char(
'.' ) ) )
2220 int idx =
str.length() - 1;
2221 while (
str.at( idx ) ==
'0' && idx > 1 )
2225 if ( idx <
str.length() - 1 )
2226 str.truncate(
str.at( idx ) ==
'.' ? idx : idx + 1 );
2236 if (
str == QLatin1String(
"-0" ) )
2238 return QLatin1String(
"0" );
2251 const bool aIsNan = std::isnan( a );
2252 const bool bIsNan = std::isnan( b );
2253 if ( aIsNan || bIsNan )
2254 return aIsNan && bIsNan;
2265 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * std::numeric_limits<double>::epsilon() )
2267 const bool aIsNan = std::isnan( a );
2268 const bool bIsNan = std::isnan( b );
2269 if ( aIsNan || bIsNan )
2270 return aIsNan && bIsNan;
2272 const double diff = a - b;
2273 return diff > -epsilon && diff <= epsilon;
2282 inline bool qgsFloatNear(
float a,
float b,
float epsilon = 4 * FLT_EPSILON )
2284 const bool aIsNan = std::isnan( a );
2285 const bool bIsNan = std::isnan( b );
2286 if ( aIsNan || bIsNan )
2287 return aIsNan && bIsNan;
2289 const float diff = a - b;
2290 return diff > -epsilon && diff <= epsilon;
2296 const bool aIsNan = std::isnan( a );
2297 const bool bIsNan = std::isnan( b );
2298 if ( aIsNan || bIsNan )
2299 return aIsNan && bIsNan;
2307 const double ar = std::frexp( a, &aexp );
2308 const double br = std::frexp( b, &bexp );
2310 return aexp == bexp &&
2321 const double m = ( number < 0.0 ) ? -1.0 : 1.0;
2322 const double scaleFactor = std::pow( 10.0, places );
2323 return ( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
2355 template<
typename To,
typename From>
inline To down_cast( From *f )
2358 ( std::is_base_of<From,
2359 typename std::remove_pointer<To>::type>::value ),
2360 "target type not derived from source type" );
2361 Q_ASSERT( f ==
nullptr ||
dynamic_cast<To
>( f ) !=
nullptr );
2362 return static_cast<To
>( f );
2366 QSet<T> listToSet(
const QList<T> &list )
2368 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
2369 return list.toSet();
2371 return QSet<T>( list.begin(), list.end() );
2376 QList<T> setToList(
const QSet<T> &set )
2378 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
2379 return set.toList();
2381 return QList<T>( set.begin(), set.end() );
2386 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
2389 template<>
struct hash<QString>
2391 std::size_t operator()(
const QString &s )
const noexcept
2393 return (
size_t )
qHash( s );
2408 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2409 Q_ASSERT( metaEnum.isValid() );
2411 for (
int idx = 0; idx < metaEnum.keyCount(); ++idx )
2413 enumList.append(
static_cast<T
>( metaEnum.value( idx ) ) );
2425 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2426 Q_ASSERT( metaEnum.isValid() );
2427 QMap<T, QString> enumMap;
2428 for (
int idx = 0; idx < metaEnum.keyCount(); ++idx )
2430 enumMap.insert(
static_cast<T
>( metaEnum.value( idx ) ), QString( metaEnum.key( idx ) ) );
2442 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2443 Q_ASSERT( metaEnum.isValid() );
2444 const char *key = metaEnum.valueToKey(
static_cast<int>( value ) );
2447 *returnOk = key ? true :
false;
2449 return QString::fromUtf8( key );
2459 template<
class T> T
qgsEnumKeyToValue(
const QString &key,
const T &defaultValue,
bool tryValueAsKey =
true,
bool *returnOk =
nullptr )
SIP_SKIP
2461 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2462 Q_ASSERT( metaEnum.isValid() );
2464 T v =
static_cast<T
>( metaEnum.keyToValue( key.toUtf8().data(), &ok ) );
2476 if ( tryValueAsKey )
2478 bool canConvert =
false;
2479 const int intValue = key.toInt( &canConvert );
2480 if ( canConvert && metaEnum.valueToKey( intValue ) )
2486 return static_cast<T
>( intValue );
2490 return defaultValue;
2500 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2501 Q_ASSERT( metaEnum.isValid() );
2502 int intValue =
static_cast<int>( value );
2503 const QByteArray ba = metaEnum.valueToKeys( intValue );
2506 const int intValueCheck = metaEnum.keysToValue( ba );
2507 bool ok = intValue == intValueCheck;
2510 return ok ? QString::fromUtf8( ba ) : QString();
2520 template<
class T> T
qgsFlagKeysToValue(
const QString &keys,
const T &defaultValue,
bool tryValueAsKey =
true,
bool *returnOk =
nullptr )
SIP_SKIP
2522 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
2523 Q_ASSERT( metaEnum.isValid() );
2525 T v =
static_cast<T
>( metaEnum.keysToValue( keys.toUtf8().constData(), &ok ) );
2537 if ( tryValueAsKey )
2539 bool canConvert =
false;
2540 const int intValue = keys.toInt( &canConvert );
2543 const QByteArray keys = metaEnum.valueToKeys( intValue );
2544 const int intValueCheck = metaEnum.keysToValue( keys );
2545 if ( intValue == intValueCheck )
2551 return T( intValue );
2556 return defaultValue;
2612 CORE_EXPORT
bool qgsVariantEqual(
const QVariant &lhs,
const QVariant &rhs );
2622 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
2630 inline bool operator> (
const QVariant &v1,
const QVariant &v2 )
2644 inline bool operator< (
const QVariant &v1,
const QVariant &v2 )
2651 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
2656 template<> CORE_EXPORT
bool qMapLessThanKey<QVariantList>(
const QVariantList &key1,
const QVariantList &key2 )
SIP_SKIP;
2659 CORE_EXPORT QString
qgsVsiPrefix(
const QString &path );
2677 #define CONSTLATIN1STRING inline const QLatin1String
2679 #define CONSTLATIN1STRING constexpr QLatin1String
2683 class ScopedIntIncrementor
2687 ScopedIntIncrementor(
int *variable )
2688 : mVariable( variable )
2693 ScopedIntIncrementor(
const ScopedIntIncrementor &other ) =
delete;
2694 ScopedIntIncrementor &operator=(
const ScopedIntIncrementor &other ) =
delete;
2701 mVariable =
nullptr;
2704 ~ScopedIntIncrementor()
2710 int *mVariable =
nullptr;
2720 return QLatin1String(
2721 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]] )"""
2728 return QLatin1String(
"+proj=longlat +datum=WGS84 +no_defs" );
2734 return QLatin1String(
"EPSG:4326" );
2740 return QLatin1String(
"NONE" );
2746 const int PREVIEW_JOB_DELAY_MS = 250;
2749 const int MAXIMUM_LAYER_PREVIEW_TIME_MS = 250;
2794 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
2796 #define Q_NOWARN_DEPRECATED_PUSH \
2797 _Pragma("GCC diagnostic push") \
2798 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
2799 #define Q_NOWARN_DEPRECATED_POP \
2800 _Pragma("GCC diagnostic pop");
2801 #define Q_NOWARN_UNREACHABLE_PUSH
2802 #define Q_NOWARN_UNREACHABLE_POP
2804 #elif defined(_MSC_VER)
2806 #define Q_NOWARN_DEPRECATED_PUSH \
2807 __pragma(warning(push)) \
2808 __pragma(warning(disable:4996))
2809 #define Q_NOWARN_DEPRECATED_POP \
2810 __pragma(warning(pop))
2811 #define Q_NOWARN_UNREACHABLE_PUSH \
2812 __pragma(warning(push)) \
2813 __pragma(warning(disable:4702))
2814 #define Q_NOWARN_UNREACHABLE_POP \
2815 __pragma(warning(pop))
2819 #define Q_NOWARN_DEPRECATED_PUSH
2820 #define Q_NOWARN_DEPRECATED_POP
2821 #define Q_NOWARN_UNREACHABLE_PUSH
2822 #define Q_NOWARN_UNREACHABLE_POP
2829 # define QGISEXTERN extern "C" __declspec( dllexport )
2831 # if defined(__GNUC__) || defined(__clang__)
2832 # define QGISEXTERN extern "C" __attribute__ ((visibility ("default")))
2834 # define QGISEXTERN extern "C"
2840 #if __cplusplus >= 201500
2841 #define FALLTHROUGH [[fallthrough]];
2842 #elif defined(__clang__)
2843 #define FALLTHROUGH [[clang::fallthrough]];
2844 #elif defined(__GNUC__) && __GNUC__ >= 7
2845 #define FALLTHROUGH [[gnu::fallthrough]];
2851 #if __cplusplus >= 201703L
2852 #define NODISCARD [[nodiscard]]
2853 #elif defined(__clang__)
2854 #define NODISCARD [[nodiscard]]
2855 #elif defined(_MSC_VER)
2856 #define NODISCARD // no support
2857 #elif defined(__has_cpp_attribute)
2858 #if __has_cpp_attribute(nodiscard)
2859 #define NODISCARD [[nodiscard]]
2860 #elif __has_cpp_attribute(gnu::warn_unused_result)
2861 #define NODISCARD [[gnu::warn_unused_result]]
2863 #define NODISCARD Q_REQUIRED_RESULT
2866 #define NODISCARD Q_REQUIRED_RESULT
2869 #if __cplusplus >= 201703L
2870 #define MAYBE_UNUSED [[maybe_unused]]
2871 #elif defined(__clang__)
2872 #define MAYBE_UNUSED [[maybe_unused]]
2873 #elif defined(_MSC_VER)
2874 #define MAYBE_UNUSED // no support
2875 #elif defined(__has_cpp_attribute)
2876 #if __has_cpp_attribute(gnu::unused)
2877 #define MAYBE_UNUSED [[gnu::unused]]
2879 #define MAYBE_UNUSED
2882 #define MAYBE_UNUSED
2891 #define BUILTIN_UNREACHABLE \
2893 #elif defined(__GNUC__) && !defined(__clang__)
2904 #define BUILTIN_UNREACHABLE \
2905 __builtin_unreachable();
2907 #define BUILTIN_UNREACHABLE
2917 QString CORE_EXPORT
geoWkt();
2926 QString CORE_EXPORT
geoNone();