Skip to content
Permalink
Browse files

add RelationReferenceWidgetWrapper to SIP + complete RelationReferenc…

…eWidget
  • Loading branch information
3nids committed Sep 15, 2014
1 parent e1cb437 commit 8cd5e59e89ce893c0861f041af5db16ac40eec80
@@ -13,7 +13,7 @@ class QgsRelationReferenceWidget : QWidget
Scale
};

explicit QgsRelationReferenceWidget( QWidget* parent );
explicit QgsRelationReferenceWidget( QWidget* parent /TransferThis/ );

~QgsRelationReferenceWidget();

@@ -22,7 +22,7 @@ class QgsRelationReferenceWidget : QWidget
void setRelationEditable( bool editable );

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

//! returns the related feature foreign key
QVariant foreignKey();
@@ -0,0 +1,23 @@

class QgsRelationReferenceWidgetWrapper : QgsEditorWidgetWrapper
{
%TypeHeaderCode
#include <qgsrelationreferencewidgetwrapper.h>
%End

public:
explicit QgsRelationReferenceWidgetWrapper( QgsVectorLayer* vl,
int fieldIdx,
QWidget* editor,
QgsMapCanvas* canvas,
QgsMessageBar* messageBar,
QWidget* parent /TransferThis/ = 0 );

virtual QWidget* createWidget( QWidget* parent );
virtual void initWidget( QWidget* editor );
virtual QVariant value();

public slots:
virtual void setValue( const QVariant& value );
virtual void setEnabled( bool enabled );
};
@@ -174,5 +174,7 @@
%Include editorwidgets/core/qgseditorwidgetfactory.sip
%Include editorwidgets/core/qgseditorwidgetregistry.sip
%Include editorwidgets/core/qgseditorwidgetwrapper.sip
%Include editorwidgets/qgsrelationreferencewidget.sip
%Include editorwidgets/qgsrelationreferencewidgetwrapper.sip

%Include layertree/qgslayertreeview.sip
@@ -1,5 +1,5 @@
/***************************************************************************
qgsrelationreferencewidget.cpp
qgsrelationreferencewidgetwrapper.cpp
--------------------------------------
Date : 20.4.2013
Copyright : (C) 2013 Matthias Kuhn
@@ -1,5 +1,5 @@
/***************************************************************************
qgsrelationreferencewidget.h
qgsrelationreferencewidgetwrapper.h
--------------------------------------
Date : 20.4.2013
Copyright : (C) 2013 Matthias Kuhn

0 comments on commit 8cd5e59

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