28 #include "qgis_core.h"
37 int QgisEvent = QEvent::User + 1;
72 static QString version();
79 static int versionInt();
86 static QString releaseName();
96 static QString devVersion();
113 Q_ENUM( MessageLevel )
134 ARGB32_Premultiplied = 13
150 Q_ENUM( PythonMacroMode )
162 Q_ENUM( FeatureCountState )
187 Q_ENUM( ScaleMethod )
198 Q_ENUM( SymbolRenderHint )
210 RendererShouldUseSymbolLevels = 1 << 0,
214 Q_DECLARE_FLAGS( SymbolFlags, SymbolFlag )
223 FlagIncludeCrosshairsForMarkerSymbols = 1 << 0,
225 Q_ENUM( SymbolPreviewFlag )
236 DisableFeatureClipping = 1 << 0,
238 Q_ENUM( SymbolLayerFlag )
240 Q_DECLARE_FLAGS( SymbolLayerFlags, SymbolLayerFlag )
259 Q_ENUM( BrowserItemType )
272 Q_ENUM( BrowserItemState )
288 ItemRepresentsFile = 1 << 6,
290 Q_ENUM( BrowserItemCapability )
315 Q_ENUM( BrowserLayerType )
328 Q_ENUM( BrowserDirectoryMonitoring )
361 Q_ENUM( VectorExportResult )
369 SubsetStringFilter = 1 << 1,
370 GeometryColumn = 1 << 2,
371 PrimaryKeys = 1 << 3,
372 UnstableFeatureIds = 1 << 4
374 Q_ENUM( SqlLayerDefinitionCapability )
376 Q_DECLARE_FLAGS( SqlLayerDefinitionCapabilities, SqlLayerDefinitionCapability )
395 Q_ENUM( SqlKeywordCategory )
422 Q_ENUM( ActionStart )
434 Q_ENUM( UnplacedLabelVisibility )
444 ResolveGeometryType = 1 << 1,
445 CountFeatures = 1 << 2,
446 IncludeSystemTables = 1 << 3,
449 Q_DECLARE_FLAGS( SublayerQueryFlags, SublayerQueryFlag )
450 Q_ENUM( SublayerQueryFlag )
459 SystemTable = 1 << 0,
462 Q_DECLARE_FLAGS( SublayerFlags, SublayerFlag )
463 Q_ENUM( SublayerFlag )
481 Q_ENUM( RasterPipeInterfaceRole )
494 Q_ENUM( RasterResamplingStage )
505 TooManyVerticesInFace,
511 Q_ENUM( MeshEditingErrorType )
523 Q_ENUM( FilePathType )
533 AskExcludingRasterBands,
537 Q_ENUM( SublayerPromptMode )
551 Q_ENUM( SelectBehavior )
563 FetchFeatureFailed = 3,
566 Q_ENUM( VectorEditResult )
575 SemiTransparentCircle,
579 Q_ENUM( VertexMarkerType )
593 Q_ENUM( ContentStatus )
609 Q_DECLARE_FLAGS( BabelFormatCapabilities, BabelFormatCapability )
610 Q_ENUM( BabelFormatCapability )
620 QuoteFilePaths = 1 << 0,
623 Q_DECLARE_FLAGS( BabelCommandFlags, BabelCommandFlag )
624 Q_ENUM( BabelCommandFlag )
637 Q_ENUM( GpsFeatureType )
649 NothingHappened = 1000,
651 InvalidInputGeometryType,
653 SelectionIsGreaterThanOne,
657 AddPartSelectedGeometryNotFound,
658 AddPartNotMultiGeometry,
662 AddRingCrossesExistingRings,
663 AddRingNotInExistingFeature,
665 SplitCannotSplitPoint,
667 Q_ENUM( GeometryOperationResult )
691 Q_ENUM( GeometryValidationEngine )
716 Q_ENUM( EndCapStyle )
742 Q_ENUM( SpatialFilterType )
751 IncludeMetadataFile = 1 << 0,
752 IncludeStyleFile = 1 << 1,
755 Q_DECLARE_FLAGS( FileOperationFlags, FileOperationFlag )
756 Q_ENUM( FileOperationFlag )
765 UsersCannotToggleEditing = 1 << 0,
768 Q_DECLARE_FLAGS( MapLayerProperties, MapLayerProperty )
769 Q_ENUM( MapLayerProperty )
778 ScaleDependentBoundingBox = 1 << 0,
781 Q_DECLARE_FLAGS( AnnotationItemFlags, AnnotationItemFlag )
782 Q_ENUM( AnnotationItemFlag )
791 FlagNoCreationTools = 1 << 0,
794 Q_DECLARE_FLAGS( AnnotationItemGuiFlags, AnnotationItemGuiFlag )
795 Q_ENUM( AnnotationItemGuiFlag )
806 Q_ENUM( AnnotationItemNodeType )
819 Q_ENUM( AnnotationItemEditOperationResult )
835 Q_ENUM( VectorTemporalMode )
844 IncludeBeginExcludeEnd = 0,
845 IncludeBeginIncludeEnd,
847 Q_ENUM( VectorTemporalLimitMode )
858 StoresFeatureDateTimeStartAndEndInSeparateFields
SIP_MONKEYPATCH_COMPAT_NAME( ProviderStoresFeatureDateTimeStartAndEndInSeparateFields ),
860 Q_ENUM( VectorDataProviderTemporalMode )
873 Q_ENUM( RasterTemporalMode )
882 MatchUsingWholeRange,
883 MatchExactUsingStartOfRange,
884 MatchExactUsingEndOfRange,
885 FindClosestMatchToStartOfRange,
886 FindClosestMatchToEndOfRange
888 Q_ENUM( TemporalIntervalMatchMethod )
900 Q_ENUM( TransformDirection )
910 DrawEditingInfo = 0x02,
911 ForceVectorOutput = 0x04,
912 UseAdvancedEffects = 0x08,
914 UseRenderingOptimization = 0x20,
915 DrawSelection = 0x40,
916 DrawSymbolBounds = 0x80,
917 RenderMapTile = 0x100,
918 RenderPartialOutput = 0x200,
919 RenderPreviewJob = 0x400,
920 RenderBlocking = 0x800,
921 LosslessImageRendering = 0x1000,
922 Render3DMap = 0x2000,
935 DrawEditingInfo = 0x01,
936 ForceVectorOutput = 0x02,
937 UseAdvancedEffects = 0x04,
938 UseRenderingOptimization = 0x08,
939 DrawSelection = 0x10,
940 DrawSymbolBounds = 0x20,
941 RenderMapTile = 0x40,
943 RenderPartialOutput = 0x100,
944 RenderPreviewJob = 0x200,
945 RenderBlocking = 0x400,
946 RenderSymbolPreview = 0x800,
947 LosslessImageRendering = 0x1000,
948 ApplyScalingWorkaroundForTextRendering = 0x2000,
949 Render3DMap = 0x4000,
950 ApplyClipAfterReprojection = 0x8000,
951 RenderingSubSymbol = 0x10000,
969 Q_ENUM( TextRenderFormat )
983 Q_ENUM( RenderSubcomponentProperty )
1000 static const
double DEFAULT_SEARCH_RADIUS_MM;
1003 static const
float DEFAULT_MAPTOPIXEL_THRESHOLD;
1011 static const QColor DEFAULT_HIGHLIGHT_COLOR;
1017 static const
double DEFAULT_HIGHLIGHT_BUFFER_MM;
1023 static const
double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
1031 static const
double SCALE_PRECISION;
1038 static const
double DEFAULT_Z_COORDINATE;
1045 static const
double DEFAULT_M_COORDINATE;
1052 static const
double UI_SCALE_FACTOR;
1058 static const
double DEFAULT_SNAP_TOLERANCE;
1071 static QString defaultProjectScales();
1078 static
int geosVersionInt();
1085 static
int geosVersionMajor();
1092 static
int geosVersionMinor();
1099 static
int geosVersionPatch();
1106 static QString geosVersion();
1131 #define cast_to_fptr(f) f
1153 , mPreviousState( object->blockSignals( true ) )
1158 mObject->blockSignals( mPreviousState );
1166 Object *mObject =
nullptr;
1167 bool mPreviousState;
1191 CORE_EXPORT uint
qHash(
const QVariant &variant );
1203 if (
str.contains( QLatin1Char(
'.' ) ) )
1206 int idx =
str.length() - 1;
1207 while (
str.at( idx ) ==
'0' && idx > 1 )
1211 if ( idx <
str.length() - 1 )
1212 str.truncate(
str.at( idx ) ==
'.' ? idx : idx + 1 );
1217 if (
str == QLatin1String(
"-0" ) )
1219 return QLatin1String(
"0" );
1232 const bool aIsNan = std::isnan( a );
1233 const bool bIsNan = std::isnan( b );
1234 if ( aIsNan || bIsNan )
1235 return aIsNan && bIsNan;
1246 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * std::numeric_limits<double>::epsilon() )
1248 const bool aIsNan = std::isnan( a );
1249 const bool bIsNan = std::isnan( b );
1250 if ( aIsNan || bIsNan )
1251 return aIsNan && bIsNan;
1253 const double diff = a - b;
1254 return diff > -epsilon && diff <= epsilon;
1263 inline bool qgsFloatNear(
float a,
float b,
float epsilon = 4 * FLT_EPSILON )
1265 const bool aIsNan = std::isnan( a );
1266 const bool bIsNan = std::isnan( b );
1267 if ( aIsNan || bIsNan )
1268 return aIsNan && bIsNan;
1270 const float diff = a - b;
1271 return diff > -epsilon && diff <= epsilon;
1277 const bool aIsNan = std::isnan( a );
1278 const bool bIsNan = std::isnan( b );
1279 if ( aIsNan || bIsNan )
1280 return aIsNan && bIsNan;
1288 const double ar = std::frexp( a, &aexp );
1289 const double br = std::frexp( b, &bexp );
1291 return aexp == bexp &&
1302 const double m = ( number < 0.0 ) ? -1.0 : 1.0;
1303 const double scaleFactor = std::pow( 10.0, places );
1304 return ( std::round( number * m * scaleFactor ) / scaleFactor ) * m;
1336 template<
typename To,
typename From>
inline To down_cast( From *f )
1339 ( std::is_base_of<From,
1340 typename std::remove_pointer<To>::type>::value ),
1341 "target type not derived from source type" );
1342 Q_ASSERT( f ==
nullptr ||
dynamic_cast<To
>( f ) !=
nullptr );
1343 return static_cast<To
>( f );
1347 QSet<T> listToSet(
const QList<T> &list )
1349 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
1350 return list.toSet();
1352 return QSet<T>( list.begin(), list.end() );
1357 QList<T> setToList(
const QSet<T> &set )
1359 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
1360 return set.toList();
1362 return QList<T>( set.begin(), set.end() );
1367 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
1370 template<>
struct hash<QString>
1372 std::size_t operator()(
const QString &s )
const noexcept
1374 return (
size_t )
qHash( s );
1390 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
1391 Q_ASSERT( metaEnum.isValid() );
1392 QMap<T, QString> enumMap;
1393 for (
int idx = 0; idx < metaEnum.keyCount(); ++idx )
1395 const char *enumKey = metaEnum.key( idx );
1396 enumMap.insert(
static_cast<T
>( metaEnum.keyToValue( enumKey ) ), QString( enumKey ) );
1407 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
1408 Q_ASSERT( metaEnum.isValid() );
1409 return QString::fromUtf8( metaEnum.valueToKey(
static_cast<int>( value ) ) );
1420 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
1421 Q_ASSERT( metaEnum.isValid() );
1423 T v =
static_cast<T
>( metaEnum.keyToValue( key.toUtf8().data(), &ok ) );
1431 if ( tryValueAsKey )
1433 bool canConvert =
false;
1434 const int intValue = key.toInt( &canConvert );
1435 if ( canConvert && metaEnum.valueToKey( intValue ) )
1437 return static_cast<T
>( intValue );
1441 return defaultValue;
1450 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
1451 Q_ASSERT( metaEnum.isValid() );
1452 return QString::fromUtf8( metaEnum.valueToKeys(
static_cast<int>( value ) ) );
1462 const QMetaEnum metaEnum = QMetaEnum::fromType<T>();
1463 Q_ASSERT( metaEnum.isValid() );
1465 T v =
static_cast<T
>( metaEnum.keysToValue( keys.toUtf8().constData(), &ok ) );
1469 return defaultValue;
1525 CORE_EXPORT
bool qgsVariantEqual(
const QVariant &lhs,
const QVariant &rhs );
1535 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
1543 inline bool operator> (
const QVariant &v1,
const QVariant &v2 )
1557 inline bool operator< (
const QVariant &v1,
const QVariant &v2 )
1564 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1569 template<> CORE_EXPORT
bool qMapLessThanKey<QVariantList>(
const QVariantList &key1,
const QVariantList &key2 )
SIP_SKIP;
1572 CORE_EXPORT QString
qgsVsiPrefix(
const QString &path );
1599 #define CONSTLATIN1STRING inline const QLatin1String
1601 #define CONSTLATIN1STRING constexpr QLatin1String
1605 class ScopedIntIncrementor
1609 ScopedIntIncrementor(
int *variable )
1610 : mVariable( variable )
1615 ScopedIntIncrementor(
const ScopedIntIncrementor &other ) =
delete;
1616 ScopedIntIncrementor &operator=(
const ScopedIntIncrementor &other ) =
delete;
1623 mVariable =
nullptr;
1626 ~ScopedIntIncrementor()
1632 int *mVariable =
nullptr;
1642 return QLatin1String(
1643 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]] )"""
1650 return QLatin1String(
"+proj=longlat +datum=WGS84 +no_defs" );
1656 return QLatin1String(
"EPSG:4326" );
1662 return QLatin1String(
"NONE" );
1668 const int PREVIEW_JOB_DELAY_MS = 250;
1671 const int MAXIMUM_LAYER_PREVIEW_TIME_MS = 250;
1716 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
1718 #define Q_NOWARN_DEPRECATED_PUSH \
1719 _Pragma("GCC diagnostic push") \
1720 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
1721 #define Q_NOWARN_DEPRECATED_POP \
1722 _Pragma("GCC diagnostic pop");
1723 #define Q_NOWARN_UNREACHABLE_PUSH
1724 #define Q_NOWARN_UNREACHABLE_POP
1726 #elif defined(_MSC_VER)
1728 #define Q_NOWARN_DEPRECATED_PUSH \
1729 __pragma(warning(push)) \
1730 __pragma(warning(disable:4996))
1731 #define Q_NOWARN_DEPRECATED_POP \
1732 __pragma(warning(pop))
1733 #define Q_NOWARN_UNREACHABLE_PUSH \
1734 __pragma(warning(push)) \
1735 __pragma(warning(disable:4702))
1736 #define Q_NOWARN_UNREACHABLE_POP \
1737 __pragma(warning(pop))
1741 #define Q_NOWARN_DEPRECATED_PUSH
1742 #define Q_NOWARN_DEPRECATED_POP
1743 #define Q_NOWARN_UNREACHABLE_PUSH
1744 #define Q_NOWARN_UNREACHABLE_POP
1751 # define QGISEXTERN extern "C" __declspec( dllexport )
1753 # if defined(__GNUC__) || defined(__clang__)
1754 # define QGISEXTERN extern "C" __attribute__ ((visibility ("default")))
1756 # define QGISEXTERN extern "C"
1762 #if __cplusplus >= 201500
1763 #define FALLTHROUGH [[fallthrough]];
1764 #elif defined(__clang__)
1765 #define FALLTHROUGH [[clang::fallthrough]];
1766 #elif defined(__GNUC__) && __GNUC__ >= 7
1767 #define FALLTHROUGH [[gnu::fallthrough]];
1773 #if __cplusplus >= 201703L
1774 #define NODISCARD [[nodiscard]]
1775 #elif defined(__clang__)
1776 #define NODISCARD [[nodiscard]]
1777 #elif defined(_MSC_VER)
1779 #elif defined(__has_cpp_attribute)
1780 #if __has_cpp_attribute(nodiscard)
1781 #define NODISCARD [[nodiscard]]
1782 #elif __has_cpp_attribute(gnu::warn_unused_result)
1783 #define NODISCARD [[gnu::warn_unused_result]]
1785 #define NODISCARD Q_REQUIRED_RESULT
1788 #define NODISCARD Q_REQUIRED_RESULT
1791 #if __cplusplus >= 201703L
1792 #define MAYBE_UNUSED [[maybe_unused]]
1793 #elif defined(__clang__)
1794 #define MAYBE_UNUSED [[maybe_unused]]
1795 #elif defined(_MSC_VER)
1796 #define MAYBE_UNUSED
1797 #elif defined(__has_cpp_attribute)
1798 #if __has_cpp_attribute(gnu::unused)
1799 #define MAYBE_UNUSED [[gnu::unused]]
1801 #define MAYBE_UNUSED
1804 #define MAYBE_UNUSED
1813 #define BUILTIN_UNREACHABLE \
1815 #elif defined(__GNUC__) && !defined(__clang__)
1826 #define BUILTIN_UNREACHABLE \
1827 __builtin_unreachable();
1829 #define BUILTIN_UNREACHABLE
1839 QString CORE_EXPORT
geoWkt();
1848 QString CORE_EXPORT
geoNone();
The Qgis class provides global constants for use throughout the application.
GeometryValidityFlag
Geometry validity check flags.
MapLayerProperty
File operation flags.
BufferSide
Side of line to buffer.
RasterResamplingStage
Stage at which raster resampling occurs.
VectorTemporalMode
Vector layer temporal feature modes.
SublayerFlag
Sublayer query flags.
AnnotationItemNodeType
Annotation item GUI flags.
static const char * QGIS_DEV_VERSION
The development version.
ContentStatus
Status for fetched or stored content.
GeometryOperationResult
Success or failure of a geometry operation.
BrowserItemState
Browser item states.
AnnotationItemFlag
Map layer properties.
RenderSubcomponentProperty
Rendering subcomponent properties.
SymbolRenderHint
Flags controlling behavior of symbols during rendering.
BrowserItemCapability
Browser item capabilities.
BrowserDirectoryMonitoring
Browser directory item monitoring switches.
VectorExportResult
Vector layer export result codes.
SymbolLayerFlag
Flags controlling behavior of symbol layers.
ScaleMethod
Scale methods.
FilePathType
File path types.
VertexType
Types of vertex.
GeometryValidationEngine
Available engines for validating geometries.
FileOperationFlag
File operation flags.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
SqlKeywordCategory
SQL layer definition capabilities.
MeshEditingErrorType
Type of error that can occur during mesh frame editing.
AnnotationItemEditOperationResult
Results from an edit operation on an annotation item.
ActionStart
Enum to determine when an operation would begin.
TemporalIntervalMatchMethod
Method to use when resolving a temporal range to a data provider layer or band.
SublayerQueryFlag
Flags which control how data providers will scan for sublayers in a dataset.
PythonMacroMode
Authorisation to run Python Macros.
UnplacedLabelVisibility
Unplaced label visibility.
SpatialFilterType
Feature request spatial filter types.
BrowserItemType
Symbol layer flags.
RasterTemporalMode
Raster layer temporal modes.
JoinStyle
Join styles for buffers.
BrowserLayerType
Browser item layer types.
VectorDataProviderTemporalMode
Vector data provider temporal handling modes.
TextRenderFormat
Options for rendering text.
DataType
Raster data types.
Q_DECLARE_FLAGS(RenderContextFlags, RenderContextFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsRenderContext
Render context flags.
EndCapStyle
End cap styles for buffers.
BabelCommandFlag
Babel GPS format capabilities.
RenderContextFlag
Flags which affect rendering operations.
RasterPipeInterfaceRole
Sublayer flags.
SymbolPreviewFlag
Symbol flags.
AnnotationItemGuiFlag
Annotation item flags.
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
SublayerPromptMode
Specifies how to handle layer sources with multiple sublayers.
GpsFeatureType
Babel command flags.
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
Specifies the result of a vector layer edit operation.
Q_DECLARE_FLAGS(GeometryValidityFlags, GeometryValidityFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsGeometry
Geometry validity flags.
BabelFormatCapability
Babel GPS format capabilities.
SymbolFlag
Flags controlling behavior of symbols.
HttpMethod
Different methods of HTTP requests.
TransformDirection
Indicates the direction (forward or inverse) of a transform.
Q_DECLARE_FLAGS(MapSettingsFlags, MapSettingsFlag) SIP_MONKEYPATCH_FLAGS_UNNEST(QgsMapSettings
Map settings flags.
MapSettingsFlag
Flags which adjust the way maps are rendered.
SelectBehavior
Specifies how a selection should be applied.
Base class for all items in the model.
A geometry is the spatial representation of a feature.
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.
Implementation of data provider temporal properties for QgsRasterDataProviders.
Implementation of map layer temporal properties for raster layers.
Contains a pipeline of raster interfaces for sequential raster processing.
Contains information about the context of a rendering operation.
RAII signal blocking class.
QgsSignalBlocker(Object *object)
Constructor for QgsSignalBlocker.
Object * operator->()
Returns pointer to blocked QObject.
Abstract base class for all rendered symbols.
This is the class is providing tolerance value in map unit values.
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.
FeatureCountState
Enumeration of feature count states.
QgsMapLayerType
Types of layers that can be added to a map.
@ PointCloudLayer
Added in 3.18.
@ VectorTileLayer
Added in 3.14.
@ AnnotationLayer
Contains freeform, georeferenced annotations. Added in QGIS 3.16.
int significantDigits(const Qgis::DataType rasterDataType)
Returns the maximum number of significant digits a for the given rasterDataType.
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.
void CORE_EXPORT * qgsCalloc(size_t nmemb, size_t size)
Allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the alloc...
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...
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
QString qgsEnumValueToKey(const T &value)
Returns the value for the given key of an enum.
const QMap< T, QString > qgsEnumMap()
Returns a map of all enum entries.
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
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...
bool qgsFloatNear(float a, float b, float epsilon=4 *FLT_EPSILON)
Compare two floats (but allow some difference)
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...
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.
T qgsFlagKeysToValue(const QString &keys, const T &defaultValue)
Returns the value corresponding to the given keys of a flag.
bool qgsNanCompatibleEquals(double a, double b)
Compare two doubles, treating nan values as equal.
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
QMap< QString, QString > QgsStringMap
#define CONSTLATIN1STRING
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
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 (~/....
QString qgsFlagValueToKeys(const T &value)
Returns the value for the given keys of a flag.
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.
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.
T qgsEnumKeyToValue(const QString &key, const T &defaultValue, bool tryValueAsKey=true)
Returns the value corresponding to the given key of an enum.
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_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.