QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Member Functions | Protected Attributes | List of all members
QgsDatumTransformStore Class Reference

The QgsDatumTransformStore class keeps track of datum transformations as chosen by the user. More...

#include <qgsdatumtransformstore.h>

Collaboration diagram for QgsDatumTransformStore:
Collaboration graph
[legend]

Classes

struct  Entry
 

Public Member Functions

 QgsDatumTransformStore (const QgsCoordinateReferenceSystem &destCrs)
 
void clear ()
 
void setDestinationCrs (const QgsCoordinateReferenceSystem &destCrs)
 
void addEntry (const QString &layerId, const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform, int destDatumTransform)
 
bool hasEntryForLayer (QgsMapLayer *layer) const
 
const QgsCoordinateTransformtransformation (QgsMapLayer *layer) const
 will return transform from layer's CRS to current destination CRS. More...
 
void readXML (const QDomNode &parentNode)
 
void writeXML (QDomNode &parentNode, QDomDocument &theDoc) const
 

Protected Attributes

QgsCoordinateReferenceSystem mDestCRS
 
QHash< QString, EntrymEntries
 key = layer ID More...
 

Detailed Description

The QgsDatumTransformStore class keeps track of datum transformations as chosen by the user.

Note
added in 2.4

Definition at line 32 of file qgsdatumtransformstore.h.

Constructor & Destructor Documentation

QgsDatumTransformStore::QgsDatumTransformStore ( const QgsCoordinateReferenceSystem destCrs)
explicit

Definition at line 22 of file qgsdatumtransformstore.cpp.

Member Function Documentation

void QgsDatumTransformStore::addEntry ( const QString &  layerId,
const QString &  srcAuthId,
const QString &  destAuthId,
int  srcDatumTransform,
int  destDatumTransform 
)
void QgsDatumTransformStore::clear ( )

Definition at line 28 of file qgsdatumtransformstore.cpp.

References mEntries.

Referenced by readXML(), and setDestinationCrs().

bool QgsDatumTransformStore::hasEntryForLayer ( QgsMapLayer layer) const

Definition at line 49 of file qgsdatumtransformstore.cpp.

References QgsMapLayer::id(), and mEntries.

Referenced by QgsMapCanvas::updateDatumTransformEntries().

void QgsDatumTransformStore::readXML ( const QDomNode &  parentNode)
void QgsDatumTransformStore::setDestinationCrs ( const QgsCoordinateReferenceSystem destCrs)

Definition at line 33 of file qgsdatumtransformstore.cpp.

References clear(), and mDestCRS.

Referenced by QgsMapSettings::setDestinationCrs().

const QgsCoordinateTransform * QgsDatumTransformStore::transformation ( QgsMapLayer layer) const

will return transform from layer's CRS to current destination CRS.

Will emit datumTransformInfoRequested signal if the layer has no entry. Returns an instance from QgsCoordinateTransformCache

Definition at line 54 of file qgsdatumtransformstore.cpp.

References QgsCoordinateReferenceSystem::authid(), QgsMapLayer::crs(), QgsMapLayer::id(), QgsCoordinateTransformCache::instance(), mDestCRS, mEntries, and QgsCoordinateTransformCache::transform().

Referenced by QgsMapSettings::layerTransfrom().

void QgsDatumTransformStore::writeXML ( QDomNode &  parentNode,
QDomDocument &  theDoc 
) const

Definition at line 103 of file qgsdatumtransformstore.cpp.

References mEntries.

Referenced by QgsMapSettings::writeXML().

Member Data Documentation

QgsCoordinateReferenceSystem QgsDatumTransformStore::mDestCRS
protected

Definition at line 64 of file qgsdatumtransformstore.h.

Referenced by setDestinationCrs(), and transformation().

QHash< QString, Entry > QgsDatumTransformStore::mEntries
protected

key = layer ID

Definition at line 67 of file qgsdatumtransformstore.h.

Referenced by addEntry(), clear(), hasEntryForLayer(), readXML(), transformation(), and writeXML().


The documentation for this class was generated from the following files: