Skip to content

Commit d823be1

Browse files
committedMay 7, 2016
Add some clarifications to QgsRelation api
1 parent e9d3a3a commit d823be1

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed
 

‎python/core/qgsrelation.sip

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,32 @@ class QgsRelation
5757
void setRelationName( const QString& name );
5858

5959
/**
60-
* Set the referencing layer id. This layer will be searched in the registry.
60+
* Set the referencing (child) layer id. This layer will be searched in the registry.
6161
*
6262
* @param id
6363
*/
6464
void setReferencingLayer( const QString& id );
6565

6666
/**
67-
* Set the referenced layer id. This layer will be searched in the registry.
67+
* Set the referenced (parent) layer id. This layer will be searched in the registry.
6868
*
6969
* @param id
7070
*/
7171
void setReferencedLayer( const QString& id );
7272

7373
/**
7474
* Add a field pairs which is part of this relation
75-
* The first element of each pair are the field names fo the foreign key.
75+
* The first element of each pair are the field names of the foreign key.
7676
* The second element of each pair are the field names of the matching primary key.
7777
*
78-
* @param referencingField The field name on the referencing layer (FK)
79-
* @param referencedField The field name on the referenced layer (PK)
78+
* @param referencingField The field name on the referencing (child) layer (FK)
79+
* @param referencedField The field name on the referenced (parent) layer (PK)
8080
*/
8181
void addFieldPair( const QString& referencingField, const QString& referencedField );
8282

8383
/**
8484
* Add a field pairs which is part of this relation
85-
* The first element of each pair are the field names fo the foreign key.
85+
* The first element of each pair are the field names of the foreign key.
8686
* The second element of each pair are the field names of the matching primary key.
8787
*
8888
* @param fieldPair A pair of two strings
@@ -206,15 +206,15 @@ class QgsRelation
206206

207207
/**
208208
* Returns a list of attributes used to form the referenced fields
209-
* (most likely primary key) on the referenced layer.
209+
* (most likely primary key) on the referenced (parent) layer.
210210
*
211211
* @return A list of attributes
212212
*/
213213
QgsAttributeList referencedFields() const;
214214

215215
/**
216216
* Returns a list of attributes used to form the referencing fields
217-
* (foreign key) on the referencing layer.
217+
* (foreign key) on the referencing (child) layer.
218218
*
219219
* @return A list of attributes
220220
*/

‎src/core/qgsrelation.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class CORE_EXPORT QgsRelation
3131
/**
3232
* Defines a relation between matching fields of the two involved tables of a relation.
3333
* Often, a relation is only defined by just one FieldPair with the name of the foreign key
34-
* column of the referencing table as first element and the name of the primary key column
35-
* of the referenced table as the second element.
34+
* column of the referencing (child) table as first element and the name of the primary key column
35+
* of the referenced (parent) table as the second element.
3636
* @note not available in Python bindings
3737
*/
3838
class FieldPair : public QPair< QString, QString >
@@ -46,9 +46,9 @@ class CORE_EXPORT QgsRelation
4646
FieldPair( const QString& referencingField, const QString& referencedField )
4747
: QPair< QString, QString >( referencingField, referencedField ) {}
4848

49-
//! Get the name of the referencing field
49+
//! Get the name of the referencing (child) field
5050
QString referencingField() const { return first; }
51-
//! Get the name of the referenced field
51+
//! Get the name of the referenced (parent) field
5252
QString referencedField() const { return second; }
5353
};
5454

@@ -89,32 +89,32 @@ class CORE_EXPORT QgsRelation
8989
void setRelationName( const QString& name );
9090

9191
/**
92-
* Set the referencing layer id. This layer will be searched in the registry.
92+
* Set the referencing (child) layer id. This layer will be searched in the registry.
9393
*
9494
* @param id
9595
*/
9696
void setReferencingLayer( const QString& id );
9797

9898
/**
99-
* Set the referenced layer id. This layer will be searched in the registry.
99+
* Set the referenced (parent) layer id. This layer will be searched in the registry.
100100
*
101101
* @param id
102102
*/
103103
void setReferencedLayer( const QString& id );
104104

105105
/**
106106
* Add a field pairs which is part of this relation
107-
* The first element of each pair are the field names fo the foreign key.
107+
* The first element of each pair are the field names of the foreign key.
108108
* The second element of each pair are the field names of the matching primary key.
109109
*
110-
* @param referencingField The field name on the referencing layer (FK)
111-
* @param referencedField The field name on the referenced layer (PK)
110+
* @param referencingField The field name on the referencing (child) layer (FK)
111+
* @param referencedField The field name on the referenced (parent) layer (PK)
112112
*/
113113
void addFieldPair( const QString& referencingField, const QString& referencedField );
114114

115115
/**
116116
* Add a field pairs which is part of this relation
117-
* The first element of each pair are the field names fo the foreign key.
117+
* The first element of each pair are the field names of the foreign key.
118118
* The second element of each pair are the field names of the matching primary key.
119119
*
120120
* @param fieldPair A pair of two strings
@@ -221,7 +221,7 @@ class CORE_EXPORT QgsRelation
221221

222222
/**
223223
* Returns the field pairs which form this relation
224-
* The first element of each pair are the field names fo the foreign key.
224+
* The first element of each pair are the field names of the foreign key.
225225
* The second element of each pair are the field names of the matching primary key.
226226
*
227227
* @return The fields forming the relation
@@ -230,15 +230,15 @@ class CORE_EXPORT QgsRelation
230230

231231
/**
232232
* Returns a list of attributes used to form the referenced fields
233-
* (most likely primary key) on the referenced layer.
233+
* (most likely primary key) on the referenced (parent) layer.
234234
*
235235
* @return A list of attributes
236236
*/
237237
QgsAttributeList referencedFields() const;
238238

239239
/**
240240
* Returns a list of attributes used to form the referencing fields
241-
* (foreign key) on the referencing layer.
241+
* (foreign key) on the referencing (child) layer.
242242
*
243243
* @return A list of attributes
244244
*/

0 commit comments

Comments
 (0)
Please sign in to comment.