#include <QEvent>
#include <QString>
#include <QRegExp>
#include <QMetaType>
#include <QVariant>
#include <stdlib.h>
#include <cfloat>
#include <cmath>
#include <qnumeric.h>
#include <qgswkbtypes.h>
Go to the source code of this file.
|
class | QGis |
| The QGis class provides global constants for use throughout the application. More...
|
|
|
typedef unsigned long long | qgssize |
| Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be hard to define size_t correctly in SIP. More...
|
|
typedef QMap< QString, QString > | QgsStringMap |
|
#define Q_NOWARN_DEPRECATED_POP |
#define Q_NOWARN_DEPRECATED_PUSH |
#define QGISEXTERN extern "C" |
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be hard to define size_t correctly in SIP.
Currently used "unsigned long long" was introduced in C++11 (2011) but it was supported already before C++11 on common platforms. "unsigned long long int" gives syntax error in SIP. KEEP IN SYNC WITH qgssize defined in SIP!
Definition at line 392 of file qgis.h.
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 allocated memory.
Works like C calloc() but prints debug message by QgsLogger if allocation fails.
- Parameters
-
nmemb | number of elements |
size | size of element in bytes |
Definition at line 241 of file qgis.cpp.
bool qgsDoubleNear |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
epsilon = 4 * DBL_EPSILON |
|
) |
| |
|
inline |
bool qgsDoubleNearSig |
( |
double |
a, |
|
|
double |
b, |
|
|
int |
significantDigits = 10 |
|
) |
| |
|
inline |
QString qgsDoubleToString |
( |
double |
a, |
|
|
int |
precision = 17 |
|
) |
| |
|
inline |
void CORE_EXPORT qgsFree |
( |
void * |
ptr | ) |
|
Frees the memory space pointed to by ptr.
Works like C free().
- Parameters
-
ptr | pointer to memory space |
Definition at line 256 of file qgis.cpp.
void CORE_EXPORT* qgsMalloc |
( |
size_t |
size | ) |
|
Allocates size bytes and returns a pointer to the allocated memory.
Works like C malloc() but prints debug message by QgsLogger if allocation fails.
- Parameters
-
Definition at line 226 of file qgis.cpp.
double qgsRound |
( |
double |
x | ) |
|
|
inline |
void( *)() cast_to_fptr(void *p) |
|
inline |
const double DEFAULT_LINE_WIDTH = 0.26 |
const double DEFAULT_POINT_SIZE = 2.0 |
Magic number that determines the default point size for point symbols.
Definition at line 378 of file qgis.h.
const double DEFAULT_SEGMENT_EPSILON = 1e-8 |
Default snapping tolerance for segments.
Definition at line 382 of file qgis.h.
const int ELLPS_PREFIX_LEN = 7 |
The length of the string "+ellps=".
Definition at line 361 of file qgis.h.
CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID |
Geographic coord sys from EPSG authority.
Definition at line 74 of file qgis.cpp.
const long GEO_EPSG_CRS_ID = 4326 |
Magic number for a geographic coord sys in EpsgCrsId ID format.
Definition at line 355 of file qgis.h.
Constant that holds the string representation for "No ellips/No CRS".
Definition at line 76 of file qgis.cpp.
const long GEOCRS_ID = 3452 |
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
Definition at line 353 of file qgis.h.
PROJ4 string that represents a geographic coord sys.
Definition at line 54 of file qgis.cpp.
const long GEOSRID = 4326 |
Magic number for a geographic coord sys in POSTGIS SRID.
Definition at line 351 of file qgis.h.
Wkt string that represents a geographic coord sys.
- Note
- added to replace GEOWkt
Definition at line 57 of file qgis.cpp.
const int LAT_PREFIX_LEN = 7 |
The length of the string "+lat_1=".
Definition at line 363 of file qgis.h.
const double MINIMUM_POINT_SIZE = 0.1 |
Magic number that determines the minimum allowable point size for point symbols.
Definition at line 376 of file qgis.h.
const int PROJ_PREFIX_LEN = 6 |
The length of the string "+proj=".
Definition at line 359 of file qgis.h.
CORE_EXPORT const QString PROJECT_SCALES |
const int USER_CRS_START_ID = 100000 |
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/.qgis.qgis.db) defined projection.
Definition at line 366 of file qgis.h.