Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
add relation reference widget to SIP
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ); | ||
}; |