Skip to content

Commit

Permalink
add relation reference widget to SIP
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 15, 2014
1 parent 8502d11 commit 51caaab
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions python/gui/qgsrelationreferencewidget.sip
@@ -0,0 +1,48 @@

class QgsRelationReferenceWidget : QWidget
{
%TypeHeaderCode
#include <qgsrelationreferencewidget.h>
%End

public:
enum CanvasExtent
{
Fixed,
Pan,
Scale
};

explicit QgsRelationReferenceWidget( QWidget* parent );

~QgsRelationReferenceWidget();

void setRelation( QgsRelation relation , bool allowNullValue );

void setRelationEditable( bool editable );

//! this sets the related feature using from the foreign key
void setRelatedFeature( const QVariant &value );

//! returns the related feature foreign key
QVariant foreignKey();

void setEditorContext( QgsAttributeEditorContext context, QgsMapCanvas* canvas, QgsMessageBar* messageBar );

bool embedForm() {return mEmbedForm;}
void setEmbedForm( bool display );

bool readOnlySelector() {return mReadOnlySelector;}
void setReadOnlySelector( bool readOnly );

bool allowMapIdentification() {return mAllowMapIdentification;}
void setAllowMapIdentification( bool allowMapIdentification );

protected:
virtual void showEvent( QShowEvent* e );

void init();

signals:
void relatedFeatureChanged( QVariant );
};

0 comments on commit 51caaab

Please sign in to comment.