QGIS API Documentation
2.2.0-Valmiera
|
#include <QEvent>
#include <QString>
#include <QRegExp>
#include <QMetaType>
#include <QVariant>
#include <stdlib.h>
#include <cfloat>
#include <cmath>
#include <qnumeric.h>
Go to the source code of this file.
Classes | |
class | QGis |
The QGis class provides global constants for use throughout the application. More... |
Macros | |
#define | QGISEXTERN extern "C" |
Typedefs | |
typedef QMap< QString, QString > | QgsStringMap |
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. |
Functions | |
QString | qgsDoubleToString (const double &a) |
bool | qgsDoubleNear (double a, double b, double epsilon=4 *DBL_EPSILON) |
bool | qgsDoubleNearSig (double a, double b, int significantDigits=10) |
bool | qgsVariantLessThan (const QVariant &lhs, const QVariant &rhs) |
bool | qgsVariantGreaterThan (const QVariant &lhs, const QVariant &rhs) |
QString | qgsVsiPrefix (QString path) |
void CORE_EXPORT * | qgsMalloc (size_t size) |
Allocates size bytes and returns a pointer to the allocated memory. | |
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. | |
void CORE_EXPORT | qgsFree (void *ptr) |
Frees the memory space pointed to by ptr. |
Variables | |
void(*)() | cast_to_fptr (void *p) |
CORE_EXPORT const QString | GEOWKT |
Wkt string that represents a geographic coord sys. | |
CORE_EXPORT const QString | PROJECT_SCALES |
CORE_EXPORT const QString | GEOPROJ4 |
PROJ4 string that represents a geographic coord sys. | |
const long | GEOSRID = 4326 |
Magic number for a geographic coord sys in POSTGIS SRID. | |
const long | GEOCRS_ID = 3452 |
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id. | |
const long | GEO_EPSG_CRS_ID = 4326 |
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. | |
const int | PROJ_PREFIX_LEN = 6 |
The length of the string "+proj=". | |
const int | ELLPS_PREFIX_LEN = 7 |
The length of the string "+ellps=". | |
const int | LAT_PREFIX_LEN = 7 |
The length of the string "+lat_1=". | |
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. | |
CORE_EXPORT const QString | GEO_NONE |
Constant that holds the string representation for "No ellips/No CRS". | |
const double | MINIMUM_POINT_SIZE = 0.1 |
Magic number that determines the minimum allowable point size for point symbols. | |
const double | DEFAULT_POINT_SIZE = 2.0 |
Magic number that determines the default point size for point symbols. | |
const double | DEFAULT_LINE_WIDTH = 0.26 |
const double | DEFAULT_SEGMENT_EPSILON = 1e-8 |
default snapping tolerance for segments ( |
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.
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!
typedef QMap<QString, QString> QgsStringMap |
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.
nmemb | number of elements |
size | size of element in bytes |
Definition at line 182 of file qgis.cpp.
References QgsDebugMsg, and qgsMalloc().
|
inline |
Definition at line 305 of file qgis.h.
Referenced by QgsRasterTransparency::alphaValue(), QgsSVGFillSymbolLayer::applyPattern(), QgsLinePatternFillSymbolLayer::applyPattern(), QgsPointPatternFillSymbolLayer::applyPattern(), QgsMultiBandColorRenderer::block(), QgsSingleBandGrayRenderer::block(), QgsRasterResampleFilter::block(), QgsRasterDataProvider::block(), QgsSvgCache::cacheEntry(), QgsSvgCache::cachePicture(), QgsTransectSample::closestSegmentPoints(), QgsComposerMouseHandles::collectAlignCoordinates(), compareWkt(), QgsClipper::connectSeparatedLines(), QgsRasterRange::contains(), QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker(), QgsEllipseSymbolLayerV2::createFromSld(), QgsSymbolLayerV2Utils::externalMarkerToSld(), QgsComposerItem::imageSizeConsideringRotation(), QgsClipper::intersectRect(), QgsRasterBlock::isNoDataValue(), QgsSymbolLayerV2Utils::lineToSld(), QgsGeometryAnalyzer::locateAlongSegment(), QgsComposition::nearestSnapLine(), QgsSymbolLayerV2Utils::ogrFeatureStylePen(), QgsRelief::optimiseClassBreaks(), QgsComposerRuler::paintEvent(), QgsEllipseSymbolLayerV2::renderPoint(), QgsSvgMarkerSymbolLayerV2::renderPoint(), QgsImageFillSymbolLayer::renderPolygon(), QgsCoordinateReferenceSystem::setMapUnits(), QgsPoint::sqrDistToSegment(), QgsMarkerLineSymbolLayerV2::toSld(), QgsRasterCalculator::transformationsEqual(), QgsRasterRenderer::usesTransparency(), QgsSymbolLayerV2Utils::wellKnownMarkerToSld(), QgsEllipseSymbolLayerV2::writeDxf(), QgsSvgMarkerSymbolLayerV2::writeDxf(), QgsEllipseSymbolLayerV2::writeSldMarker(), QgsComposerMap::xGridLines(), and QgsComposerMap::yGridLines().
|
inline |
|
inline |
Definition at line 297 of file qgis.h.
Referenced by QgsMapRenderer::adjustExtentToSize(), QgsRectangle::asWktCoordinates(), QgsRectangle::asWktPolygon(), QgsOgcUtils::createGMLCoordinates(), QgsOgcUtils::createGMLPositions(), QgsGeometry::exportToGeoJSON(), QgsGeometry::exportToWkt(), QgsOgcUtils::geometryToGML(), QgsOgcUtils::rectangleToGMLBox(), QgsOgcUtils::rectangleToGMLEnvelope(), QgsRenderChecker::runTest(), QgsMapCanvas::saveAsImage(), QgsCoordinateReferenceSystem::syncDatumTransform(), QgsPoint::wellKnownText(), QgsComposerMap::writeXML(), and QgsMapRenderer::writeXML().
void CORE_EXPORT qgsFree | ( | void * | ptr | ) |
Frees the memory space pointed to by ptr.
Works like C free().
ptr | pointer to memory space |
Definition at line 197 of file qgis.cpp.
Referenced by QgsRasterBlock::convert(), QgsRasterBlock::reset(), QgsRasterBlock::setImage(), QgsRasterFileWriter::writeImageRaster(), and QgsRasterBlock::~QgsRasterBlock().
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.
size | size in bytes |
Definition at line 167 of file qgis.cpp.
References QgsDebugMsg.
Referenced by QgsRasterBlock::convert(), QgsRasterBlock::createNoDataBitmap(), qgsCalloc(), QgsRasterBlock::reset(), and QgsRasterFileWriter::writeImageRaster().
bool qgsVariantGreaterThan | ( | const QVariant & | lhs, |
const QVariant & | rhs | ||
) |
Definition at line 229 of file qgis.cpp.
References qgsVariantLessThan().
Referenced by QgsSymbolLayerV2Utils::sortVariantList(), and valueGreaterThan().
bool qgsVariantLessThan | ( | const QVariant & | lhs, |
const QVariant & | rhs | ||
) |
Definition at line 202 of file qgis.cpp.
Referenced by qgsVariantGreaterThan(), QgsSymbolLayerV2Utils::sortVariantList(), and valueLessThan().
QString qgsVsiPrefix | ( | QString | path | ) |
Definition at line 234 of file qgis.cpp.
Referenced by QgsProject::readPath(), QgsZipItem::vsiPrefix(), and QgsProject::writePath().
void( *)() cast_to_fptr(void *p) |
Definition at line 282 of file qgis.h.
Referenced by QgsBrowserModel::addRootItems(), QgsRasterDataProvider::create(), QgsDirectoryItem::createChildren(), QgsVectorLayer::getStyleFromDatabase(), QgsRasterFormatSaveOptionsWidget::helpOptions(), QgsRasterLayer::isValidRasterFileName(), QgsVectorLayer::listStylesInDatabase(), QgsVectorLayer::loadNamedStyle(), QgsProviderRegistry::provider(), QgsRasterDataProvider::pyramidResamplingMethods(), QgsDirectoryItem::QgsDirectoryItem(), QgsProviderRegistry::QgsProviderRegistry(), QgsVectorLayerImport::QgsVectorLayerImport(), QgsZipItem::QgsZipItem(), QgsProviderRegistry::registerGuis(), QgsNewVectorLayerDialog::runAndCreateLayer(), QgsVectorLayer::saveStyleToDatabase(), QgsProviderRegistry::selectWidget(), QgsRasterFormatSaveOptionsWidget::validateOptions(), and QgsProviderRegistry::~QgsProviderRegistry().
const double DEFAULT_POINT_SIZE = 2.0 |
Magic number that determines the default point size for point symbols.
Definition at line 391 of file qgis.h.
Referenced by readMarkerSymbolSize().
const double DEFAULT_SEGMENT_EPSILON = 1e-8 |
const int ELLPS_PREFIX_LEN = 7 |
CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID |
Geographic coord sys from EPSG authority.
Definition at line 70 of file qgis.cpp.
Referenced by QgsOWSSourceSelect::on_mChangeCRSButton_clicked(), QgsOWSSourceSelect::populateCRS(), QgsNewVectorLayerDialog::QgsNewVectorLayerDialog(), QgsVectorLayer::setCoordinateSystem(), and QgsCoordinateReferenceSystem::validate().
const long GEO_EPSG_CRS_ID = 4326 |
CORE_EXPORT const QString GEO_NONE |
Constant that holds the string representation for "No ellips/No CRS".
Definition at line 72 of file qgis.cpp.
Referenced by QgsDistanceArea::bearing(), QgsDistanceArea::computePolygonArea(), QgsDistanceArea::convertMeasurement(), QgsMapToolIdentify::featureDerivedAttributes(), QgsAttributeDialog::init(), QgsDistanceArea::measureLine(), QgsDistanceArea::measurePolygon(), QgsDistanceArea::QgsDistanceArea(), and QgsDistanceArea::setEllipsoid().
const long GEOCRS_ID = 3452 |
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
Definition at line 365 of file qgis.h.
Referenced by QgsDistanceArea::QgsDistanceArea(), QgsMapRenderer::QgsMapRenderer(), and QgsCoordinateReferenceSystem::readXML().
CORE_EXPORT const QString GEOPROJ4 |
const long GEOSRID = 4326 |
CORE_EXPORT const QString GEOWKT |
const int LAT_PREFIX_LEN = 7 |
The length of the string "+lat_1=".
Definition at line 375 of file qgis.h.
Referenced by QgsCoordinateReferenceSystem::createFromProj4().
const double MINIMUM_POINT_SIZE = 0.1 |
const int PROJ_PREFIX_LEN = 6 |
CORE_EXPORT const QString PROJECT_SCALES |
Definition at line 66 of file qgis.cpp.
Referenced by QgsScaleComboBox::updateScales().
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 378 of file qgis.h.
Referenced by QgsCoordinateReferenceSystem::createFromSrsId(), QgsProjectionSelector::getSelectedExpression(), QgsCoordinateReferenceSystem::loadFromDb(), QgsCoordinateReferenceSystem::proj4FromSrsId(), QgsCoordinateReferenceSystem::readXML(), QgsCoordinateReferenceSystem::saveAsUserCRS(), QgsProjectionSelector::selectedAuthId(), and QgsProjectionSelector::selectedProj4String().