Quantum GIS API Documentation  master-693a1fe
src/core/qgis.h File Reference
#include <QEvent>
#include <QString>
#include <QMetaType>
#include <QVariant>
#include <stdlib.h>
#include <cfloat>
#include <cmath>
#include <qnumeric.h>
+ Include dependency graph for qgis.h:

Go to the source code of this file.

Classes

class  QGis
 The QGis class provides global constants for use throughout the application. More...

Typedefs

typedef QMap< QString, QString > QgsStringMap

Functions

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.
bool qgsDoubleNear (double a, double b, double epsilon=4 *DBL_EPSILON)
bool qgsDoubleNearSig (double a, double b, int significantDigits=10)
void CORE_EXPORT qgsFree (void *ptr)
 Frees the memory space pointed to by ptr.
void CORE_EXPORT * qgsMalloc (size_t size)
 Allocates size bytes and returns a pointer to the allocated memory.
bool qgsVariantGreaterThan (const QVariant &lhs, const QVariant &rhs)
bool qgsVariantLessThan (const QVariant &lhs, const QVariant &rhs)

Variables

void(*)() cast_to_fptr (void *p)
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.
const double DEFAULT_SEGMENT_EPSILON = 1e-8
 default snapping tolerance for segments (
const int ELLPS_PREFIX_LEN = 7
 The length of the string "+ellps=".
CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID
 Geographic coord sys from EPSG authority.
const long GEO_EPSG_CRS_ID = 4326
 Magic number for a geographic coord sys in EpsgCrsId ID format.
CORE_EXPORT const QString GEO_NONE
 Constant that holds the string representation for "No ellips/No CRS".
const long GEOCRS_ID = 3452
 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.
const long GEOSRID = 4326
 Magic number for a geographic coord sys in POSTGIS SRID.
CORE_EXPORT const QString GEOWKT
 Wkt string that represents a geographic coord sys.
const int LAT_PREFIX_LEN = 7
 The length of the string "+lat_1=".
const double MINIMUM_POINT_SIZE = 0.1
 Magic number that determines the minimum allowable point size for point symbols.
const int PROJ_PREFIX_LEN = 6
 The length of the string "+proj=".
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.

Typedef Documentation

typedef QMap<QString, QString> QgsStringMap

Definition at line 339 of file qgis.h.


Function Documentation

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:
nmembnumber of elements
sizesize of element in bytes

Definition at line 126 of file qgis.cpp.

References QgsDebugMsg, and qgsMalloc().

bool qgsDoubleNear ( double  a,
double  b,
double  epsilon = 4 * DBL_EPSILON 
) [inline]

Definition at line 249 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(), QgsComposition::collectAlignCoordinates(), QgsClipper::connectSeparatedLines(), QgsRasterRange::contains(), QgsSymbolLayerV2Utils::convertPolygonSymbolizerToPointMarker(), QgsEllipseSymbolLayerV2::createFromSld(), QgsPalLabeling::drawLabel(), QgsSymbolLayerV2Utils::externalMarkerToSld(), QgsGraduatedSymbolRendererV2Widget::findSymbolForRange(), 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::writeSldMarker(), QgsComposerMap::xGridLines(), and QgsComposerMap::yGridLines().

bool qgsDoubleNearSig ( double  a,
double  b,
int  significantDigits = 10 
) [inline]

Definition at line 258 of file qgis.h.

void CORE_EXPORT qgsFree ( void *  ptr)

Frees the memory space pointed to by ptr.

Works like C free().

Parameters:
ptrpointer to memory space

Definition at line 141 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.

Parameters:
sizesize in bytes

Definition at line 111 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 173 of file qgis.cpp.

References qgsVariantLessThan().

Referenced by QgsSymbolLayerV2Utils::sortVariantList(), and valueGreaterThan().

bool qgsVariantLessThan ( const QVariant &  lhs,
const QVariant &  rhs 
)

Variable Documentation

const double DEFAULT_LINE_WIDTH = 0.26

Definition at line 334 of file qgis.h.

const double DEFAULT_POINT_SIZE = 2.0

Magic number that determines the default point size for point symbols.

Definition at line 333 of file qgis.h.

Referenced by QgsSimpleMarkerSymbolLayerV2Widget::QgsSimpleMarkerSymbolLayerV2Widget(), and readMarkerSymbolSize().

const double DEFAULT_SEGMENT_EPSILON = 1e-8

default snapping tolerance for segments (

Note:
added in 1.8)

Definition at line 337 of file qgis.h.

const int ELLPS_PREFIX_LEN = 7

The length of the string "+ellps=".

Definition at line 315 of file qgis.h.

const long GEO_EPSG_CRS_ID = 4326

Magic number for a geographic coord sys in EpsgCrsId ID format.

Definition at line 309 of file qgis.h.

const long GEOCRS_ID = 3452

Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.

Definition at line 307 of file qgis.h.

Referenced by QgsDistanceArea::QgsDistanceArea(), QgsMapRenderer::QgsMapRenderer(), and QgsCoordinateReferenceSystem::readXML().

CORE_EXPORT const QString GEOPROJ4

PROJ4 string that represents a geographic coord sys.

Definition at line 50 of file qgis.cpp.

const long GEOSRID = 4326

Magic number for a geographic coord sys in POSTGIS SRID.

Definition at line 305 of file qgis.h.

CORE_EXPORT const QString GEOWKT

Wkt string that represents a geographic coord sys.

Note:
added in 1.8 to replace GEOWkt

Definition at line 53 of file qgis.cpp.

const int LAT_PREFIX_LEN = 7

The length of the string "+lat_1=".

Definition at line 317 of file qgis.h.

Referenced by QgsCoordinateReferenceSystem::createFromProj4().

const double MINIMUM_POINT_SIZE = 0.1

Magic number that determines the minimum allowable point size for point symbols.

Definition at line 331 of file qgis.h.

const int PROJ_PREFIX_LEN = 6

The length of the string "+proj=".

Definition at line 313 of file qgis.h.

CORE_EXPORT const QString PROJECT_SCALES

Definition at line 66 of file qgis.cpp.

Referenced by QgsScaleComboBox::updateScales().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines