QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
QgsRelationManager Class Reference

This class manages a set of relations between layers. More...

#include <qgsrelationmanager.h>

Inheritance diagram for QgsRelationManager:
Inheritance graph
Collaboration diagram for QgsRelationManager:
Collaboration graph


void relationsLoaded ()

Public Member Functions

 QgsRelationManager (QgsProject *project)
void setRelations (const QList< QgsRelation > &relations)
const QMap< QString,
QgsRelation > & 
relations () const
void addRelation (const QgsRelation &relation)
void removeRelation (const QString &name)
void removeRelation (const QgsRelation &relation)
QgsRelation relation (const QString &id) const
void clear ()
QList< QgsRelationreferencingRelations (QgsVectorLayer *layer=0, int fieldIdx=-2) const
QList< QgsRelationreferencedRelations (QgsVectorLayer *layer=0) const

Private Slots

void readProject (const QDomDocument &doc)
void writeProject (QDomDocument &doc)
void layersRemoved (const QStringList &layers)

Private Attributes

QMap< QString, QgsRelationmRelations
 The references. More...

Detailed Description

This class manages a set of relations between layers.

Definition at line 32 of file qgsrelationmanager.h.

Constructor & Destructor Documentation

QgsRelationManager::QgsRelationManager ( QgsProject project)

Member Function Documentation

void QgsRelationManager::addRelation ( const QgsRelation relation)
void QgsRelationManager::clear ( )

Definition at line 72 of file qgsrelationmanager.cpp.

References mRelations.

Referenced by QgsProject::clear().

void QgsRelationManager::layersRemoved ( const QStringList &  layers)

Definition at line 176 of file qgsrelationmanager.cpp.

References mRelations.

Referenced by QgsRelationManager().

void QgsRelationManager::readProject ( const QDomDocument &  doc)
QList< QgsRelation > QgsRelationManager::referencedRelations ( QgsVectorLayer layer = 0) const

Definition at line 114 of file qgsrelationmanager.cpp.

References mRelations, QgsRelation::referencedLayer(), and relations().

QList< QgsRelation > QgsRelationManager::referencingRelations ( QgsVectorLayer layer = 0,
int  fieldIdx = -2 
) const
QgsRelation QgsRelationManager::relation ( const QString &  id) const
const QMap< QString, QgsRelation > & QgsRelationManager::relations ( ) const
void QgsRelationManager::relationsLoaded ( )

Referenced by readProject().

void QgsRelationManager::removeRelation ( const QString &  name)

Definition at line 57 of file qgsrelationmanager.cpp.

References mRelations.

void QgsRelationManager::removeRelation ( const QgsRelation relation)

Definition at line 62 of file qgsrelationmanager.cpp.

References QgsRelation::id(), and mRelations.

void QgsRelationManager::setRelations ( const QList< QgsRelation > &  relations)

Definition at line 33 of file qgsrelationmanager.cpp.

References addRelation(), and mRelations.

void QgsRelationManager::writeProject ( QDomDocument &  doc)

Definition at line 157 of file qgsrelationmanager.cpp.

References mRelations, QgsDebugMsg, relation(), and QgsRelation::writeXML().

Referenced by QgsRelationManager().

Member Data Documentation

QgsProject* QgsRelationManager::mProject

Definition at line 62 of file qgsrelationmanager.h.

Referenced by addRelation().

QMap<QString, QgsRelation> QgsRelationManager::mRelations

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