QGIS API Documentation
2.4.0-Chugiak
|
This class manages a set of relations between layers. More...
#include <qgsrelationmanager.h>
Signals | |
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< QgsRelation > | referencingRelations (QgsVectorLayer *layer=0, int fieldIdx=-2) const |
QList< QgsRelation > | referencedRelations (QgsVectorLayer *layer=0) const |
Private Slots | |
void | readProject (const QDomDocument &doc) |
void | writeProject (QDomDocument &doc) |
void | layersRemoved (const QStringList &layers) |
Private Attributes | |
QMap< QString, QgsRelation > | mRelations |
The references. More... | |
QgsProject * | mProject |
This class manages a set of relations between layers.
Definition at line 32 of file qgsrelationmanager.h.
|
explicit |
Definition at line 24 of file qgsrelationmanager.cpp.
References QgsMapLayerRegistry::instance(), layersRemoved(), readProject(), and writeProject().
void QgsRelationManager::addRelation | ( | const QgsRelation & | relation | ) |
Definition at line 47 of file qgsrelationmanager.cpp.
References QgsProject::dirty(), QgsRelation::id(), QgsRelation::isValid(), mProject, mRelations, and relation().
Referenced by readProject(), and setRelations().
void QgsRelationManager::clear | ( | ) |
Definition at line 72 of file qgsrelationmanager.cpp.
References mRelations.
Referenced by QgsProject::clear().
|
privateslot |
Definition at line 176 of file qgsrelationmanager.cpp.
References mRelations.
Referenced by QgsRelationManager().
|
privateslot |
Definition at line 134 of file qgsrelationmanager.cpp.
References addRelation(), QgsRelation::createFromXML(), mRelations, QgsDebugMsg, and relationsLoaded().
Referenced by QgsRelationManager().
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 |
Definition at line 77 of file qgsrelationmanager.cpp.
References QgsVectorLayer::fieldNameIndex(), QgsRelation::fieldPairs(), mRelations, QgsRelation::FieldPair::referencingField(), QgsRelation::referencingLayer(), and relations().
Referenced by QgsVectorLayer::referencingRelations().
QgsRelation QgsRelationManager::relation | ( | const QString & | id | ) | const |
Definition at line 67 of file qgsrelationmanager.cpp.
References mRelations.
Referenced by addRelation(), QgsAttributeForm::createWrappers(), QgsAttributeEditorRelation::init(), and writeProject().
const QMap< QString, QgsRelation > & QgsRelationManager::relations | ( | ) | const |
Definition at line 42 of file qgsrelationmanager.cpp.
References mRelations.
Referenced by referencedRelations(), referencingRelations(), and QgsRelationManagerDialog::setLayers().
|
signal |
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.
|
privateslot |
Definition at line 157 of file qgsrelationmanager.cpp.
References mRelations, QgsDebugMsg, relation(), and QgsRelation::writeXML().
Referenced by QgsRelationManager().
|
private |
Definition at line 62 of file qgsrelationmanager.h.
Referenced by addRelation().
|
private |
The references.
Definition at line 60 of file qgsrelationmanager.h.
Referenced by addRelation(), clear(), layersRemoved(), readProject(), referencedRelations(), referencingRelations(), relation(), relations(), removeRelation(), setRelations(), and writeProject().