71 WKBPoint25D = 0x80000001,
97 static bool isSingleType(
WkbType type );
102 static bool isMultiType(
WkbType type );
107 static int wkbDimensions(
WkbType type );
125 static const char *vectorGeometryType(
GeometryType type );
128 static const char *featureType(
WkbType type );
134 { UnknownDataType = 0, Byte = 1, UInt16 = 2, Int16 = 3, UInt32 = 4, Int32 = 5, Float32 = 6, Float64 = 7, CInt16 = 8, CInt32 = 9, CFloat32 = 10, CFloat64 = 11, ARGB32 = 12, ARGB32_Premultiplied = 13
173 DegreesMinutesSeconds = 2,
174 DegreesDecimalMinutes = 2,
205 static double permissiveToDouble(
QString string,
bool& ok );
215 static int permissiveToInt(
QString string,
bool& ok );
223 ProviderExtentCalcEvent = ( QEvent::User + 1 ),
226 ProviderCountCalcEvent
261 static const char *qgisUnitTypes[];
269 #if QT_VERSION >= 0x050000 270 #define cast_to_fptr(f) f 302 , mPreviousState( object->blockSignals( true ) )
307 mObject->blockSignals( mPreviousState );
353 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * DBL_EPSILON )
355 const double diff = a - b;
356 return diff > -epsilon && diff <= epsilon;
363 inline bool qgsFloatNear(
float a,
float b,
float epsilon = 4 * FLT_EPSILON )
365 const float diff = a - b;
366 return diff > -epsilon && diff <= epsilon;
378 double ar = frexp( a, &aexp );
379 double br = frexp( b, &bexp );
381 return aexp == bexp &&
382 qRound( ar * pow( 10.0, significantDigits ) ) == qRound( br * pow( 10.0, significantDigits ) );
388 return x < 0.0 ? std::ceil( x - 0.5 ) : std::floor( x + 0.5 );
393 #if QT_VERSION < 0x050000 435 void CORE_EXPORT *
qgsMalloc(
size_t size );
443 void CORE_EXPORT *
qgsCalloc(
size_t nmemb,
size_t size );
448 void CORE_EXPORT
qgsFree(
void *ptr );
502 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__) 503 #define Q_NOWARN_DEPRECATED_PUSH \ 504 _Pragma("GCC diagnostic push") \ 505 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\""); 506 #define Q_NOWARN_DEPRECATED_POP \ 507 _Pragma("GCC diagnostic pop"); 508 #elif defined(_MSC_VER) 509 #define Q_NOWARN_DEPRECATED_PUSH \ 510 __pragma(warning(push)) \ 511 __pragma(warning(disable:4996)) 512 #define Q_NOWARN_DEPRECATED_POP \ 513 __pragma(warning(pop)) 515 #define Q_NOWARN_DEPRECATED_PUSH 516 #define Q_NOWARN_DEPRECATED_POP 521 # define QGISEXTERN extern "C" __declspec( dllexport ) 524 # pragma warning(disable:4190) 527 # if defined(__GNUC__) || defined(__clang__) 528 # define QGISEXTERN extern "C" __attribute__ ((visibility ("default"))) 530 # define QGISEXTERN extern "C" 536 #if defined(__clang__) 537 #define FALLTHROUGH [[clang::fallthrough]]
CORE_EXPORT QString qgsVsiPrefix(const QString &path)
static double DEFAULT_HIGHLIGHT_BUFFER_MM
Default highlight buffer in mm.
static const QColor DEFAULT_HIGHLIGHT_COLOR
Default highlight color.
qint64 toMSecsSinceEpoch() const
bool qgsFloatNear(float a, float b, float epsilon=4 *FLT_EPSILON)
Compare two floats (but allow some difference)
uint qHash(const QDateTime &key)
Hash implementation for QDateTime.
int msecsTo(const QTime &t) const
WkbType
Used for symbology operations.
static Q_DECL_DEPRECATED const double DEFAULT_IDENTIFY_RADIUS
Old search radius in % of canvas width.
The QGis class provides global constants for use throughout the application.
QString & remove(int position, int n)
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...
QMap< QString, QString > QgsStringMap
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
Compare two doubles (but allow some difference)
CORE_EXPORT bool qgsVariantLessThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is less than the second.
double qgsRound(double x)
A round function which returns a double to guard against overflows.
QgsSignalBlocker(Object *object)
Constructor for QgsSignalBlocker.
QString number(int n, int base)
CORE_EXPORT const QString GEO_NONE
Constant that holds the string representation for "No ellips/No CRS".
const double DEFAULT_SEGMENT_EPSILON
Default snapping tolerance for segments.
static const char * QGIS_DEV_VERSION
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
const int ELLPS_PREFIX_LEN
The length of the string "+ellps=".
static const float DEFAULT_MAPTOPIXEL_THRESHOLD
Default threshold between map coordinates and device coordinates for map2pixel simplification.
const long GEOCRS_ID
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
CORE_EXPORT const QString GEOPROJ4
PROJ4 string that represents a geographic coord sys.
RAII signal blocking class.
void CORE_EXPORT qgsFree(void *ptr)
Frees the memory space pointed to by ptr.
UserEvent
User defined event types.
static QString QGIS_VERSION
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...
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
const int USER_CRS_START_ID
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/...
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
const double MINIMUM_POINT_SIZE
Magic number that determines the minimum allowable point size for point symbols.
bool qgsDoubleNearSig(double a, double b, int significantDigits=10)
Compare two doubles using specified number of significant digits.
const double DEFAULT_LINE_WIDTH
CORE_EXPORT const QString PROJECT_SCALES
DataType
Raster data types.
const int LAT_PREFIX_LEN
The length of the string "+lat_1=".
UnitType
Map units that qgis supports.
void(*)() cast_to_fptr(void *p)
const int PROJ_PREFIX_LEN
The length of the string "+proj=".
CORE_EXPORT bool qgsVariantGreaterThan(const QVariant &lhs, const QVariant &rhs)
Compares two QVariant values and returns whether the first is greater than the second.
static QString QGIS_RELEASE_NAME
static double SCALE_PRECISION
Fudge factor used to compare two scales.
static const int QGIS_VERSION_INT
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
static double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM
Default highlight line/outline minimum width in mm.
Object * operator->()
Returns pointer to blocked QObject.
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID
Geographic coord sys from EPSG authority.
CORE_EXPORT const QString GEOWKT
Wkt string that represents a geographic coord sys.