Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix and sync QgsAttributeEditorContext sip bindings
  • Loading branch information
jef-n committed Sep 13, 2014
1 parent 9945a6d commit 17669b5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
28 changes: 20 additions & 8 deletions python/gui/qgsattributeeditorcontext.sip
Expand Up @@ -10,19 +10,31 @@ class QgsAttributeEditorContext
#include "qgsattributeeditorcontext.h"
%End
public:
/**
* Determines in which direction a relation was resolved.
*/
enum RelationMode
{
Undefined, //!< This context is not defined by a relation
EmbedMultiple, //!< When embedding a list of features (e.g. houses as an embedded form in a district form)
EmbedSingle, //!< When embedding a single feature (e.g. district information when looking at the form of a house)
StandaloneSingle //!< When showing a new dialog for a single feature (e.g. district information when looking at the form of a house)
};

QgsAttributeEditorContext();

QgsAttributeEditorContext( const QgsAttributeEditorContext& parentContext, const QgsRelation& relation, RelationMode mode );

void setDistanceArea( const QgsDistanceArea& distanceArea );

const QgsDistanceArea& distanceArea();

void setVectorLayerTools( QgsVectorLayerTools* vlTools );
QgsVectorLayerTools* vectorLayerTools();
const QgsVectorLayerTools* vectorLayerTools() const;

/**
* When copying the context for another layer, call this.
* Will adjast the distance area for this layer
*
* @param layer The layer to adjust for.
*/
// void adjustForLayer( QgsVectorLayer* layer );
void setRelation( const QgsRelation& relation, RelationMode mode );
const QgsRelation& relation() const;
RelationMode relationMode() const;

const QgsAttributeEditorContext* parentContext() const;
};
1 change: 0 additions & 1 deletion src/gui/qgsattributeeditorcontext.h
Expand Up @@ -44,7 +44,6 @@ class GUI_EXPORT QgsAttributeEditorContext
StandaloneSingle //!< When showing a new dialog for a single feature (e.g. district information when looking at the form of a house)
};

public:
QgsAttributeEditorContext()
: mParentContext( 0 )
, mLayer( 0 )
Expand Down

0 comments on commit 17669b5

Please sign in to comment.