Skip to content
Permalink
Browse files

create a relationsChanged signal for relation manager

  • Loading branch information
3nids authored and nyalldawson committed Sep 21, 2014
1 parent 97ea6f6 commit d279197e6c03a0dfb445d94531cd136c31212f9d
Showing with 5 additions and 3 deletions.
  1. +2 −1 python/core/qgsrelationmanager.sip
  2. +2 −2 src/core/qgsrelationmanager.cpp
  3. +1 −0 src/core/qgsrelationmanager.h
@@ -12,7 +12,7 @@ class QgsRelationManager : QObject
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 QString& id );
void removeRelation( const QgsRelation& relation );
QgsRelation relation( const QString& id ) const;
void clear();
@@ -21,6 +21,7 @@ class QgsRelationManager : QObject
QList<QgsRelation> referencedRelations( QgsVectorLayer *layer = 0 ) const;

signals:
/** this signal is emitted when the relations were loaded after reading a project */
void relationsLoaded();

/**
@@ -56,9 +56,9 @@ void QgsRelationManager::addRelation( const QgsRelation& relation )
emit changed();
}

void QgsRelationManager::removeRelation( const QString& name )
void QgsRelationManager::removeRelation( const QString& id )
{
mRelations.remove( name );
mRelations.remove( id );
emit changed();
}

@@ -105,6 +105,7 @@ class CORE_EXPORT QgsRelationManager : public QObject
QList<QgsRelation> referencedRelations( QgsVectorLayer *layer = 0 ) const;

signals:
/** this signal is emitted when the relations were loaded after reading a project */
void relationsLoaded();

/**

0 comments on commit d279197

Please sign in to comment.
You can’t perform that action at this time.