QGIS API Documentation  2.2.0-Valmiera
 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>

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)

Private Attributes

QMap< QString, QgsRelationmRelations
 The references.

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)

Definition at line 23 of file qgsrelationmanager.cpp.

References readProject(), and writeProject().

Member Function Documentation

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

Definition at line 70 of file qgsrelationmanager.cpp.

References mRelations.

Referenced by QgsProject::read().

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

Definition at line 112 of file qgsrelationmanager.cpp.

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

Referenced by QgsAttributeDialog::init().

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 55 of file qgsrelationmanager.cpp.

References mRelations.

void QgsRelationManager::removeRelation ( const QgsRelation relation)

Definition at line 60 of file qgsrelationmanager.cpp.

References QgsRelation::id(), and mRelations.

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

Definition at line 31 of file qgsrelationmanager.cpp.

References addRelation(), and mRelations.

void QgsRelationManager::writeProject ( QDomDocument &  doc)

Definition at line 155 of file qgsrelationmanager.cpp.

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

Referenced by QgsRelationManager().

Member Data Documentation

QgsProject* QgsRelationManager::mProject

Definition at line 63 of file qgsrelationmanager.h.

Referenced by addRelation().

QMap<QString, QgsRelation> QgsRelationManager::mRelations

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