Skip to content

Commit 17669b5

Browse files
committed
fix and sync QgsAttributeEditorContext sip bindings
1 parent 9945a6d commit 17669b5

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

python/gui/qgsattributeeditorcontext.sip

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,31 @@ class QgsAttributeEditorContext
1010
#include "qgsattributeeditorcontext.h"
1111
%End
1212
public:
13+
/**
14+
* Determines in which direction a relation was resolved.
15+
*/
16+
enum RelationMode
17+
{
18+
Undefined, //!< This context is not defined by a relation
19+
EmbedMultiple, //!< When embedding a list of features (e.g. houses as an embedded form in a district form)
20+
EmbedSingle, //!< When embedding a single feature (e.g. district information when looking at the form of a house)
21+
StandaloneSingle //!< When showing a new dialog for a single feature (e.g. district information when looking at the form of a house)
22+
};
23+
1324
QgsAttributeEditorContext();
1425

26+
QgsAttributeEditorContext( const QgsAttributeEditorContext& parentContext, const QgsRelation& relation, RelationMode mode );
27+
1528
void setDistanceArea( const QgsDistanceArea& distanceArea );
29+
1630
const QgsDistanceArea& distanceArea();
1731

1832
void setVectorLayerTools( QgsVectorLayerTools* vlTools );
19-
QgsVectorLayerTools* vectorLayerTools();
33+
const QgsVectorLayerTools* vectorLayerTools() const;
2034

21-
/**
22-
* When copying the context for another layer, call this.
23-
* Will adjast the distance area for this layer
24-
*
25-
* @param layer The layer to adjust for.
26-
*/
27-
// void adjustForLayer( QgsVectorLayer* layer );
35+
void setRelation( const QgsRelation& relation, RelationMode mode );
36+
const QgsRelation& relation() const;
37+
RelationMode relationMode() const;
38+
39+
const QgsAttributeEditorContext* parentContext() const;
2840
};

src/gui/qgsattributeeditorcontext.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class GUI_EXPORT QgsAttributeEditorContext
4444
StandaloneSingle //!< When showing a new dialog for a single feature (e.g. district information when looking at the form of a house)
4545
};
4646

47-
public:
4847
QgsAttributeEditorContext()
4948
: mParentContext( 0 )
5049
, mLayer( 0 )

0 commit comments

Comments
 (0)