Skip to content

Commit

Permalink
Added docs for the virtual private methods in QgsAbstractRelationEdit…
Browse files Browse the repository at this point in the history
…orWidget
  • Loading branch information
suricactus authored and 3nids committed Jan 25, 2021
1 parent 30db6fa commit df17603
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
26 changes: 26 additions & 0 deletions python/gui/auto_generated/qgsabstractrelationeditorwidget.sip.in
Expand Up @@ -219,11 +219,37 @@ Unlinks the features with ``fids``

private:
virtual void updateUi();
%Docstring
A hook called every time the state of the relation editor widget has changed via calling its `set*` methods or slots,
e.g. changed relation, added feature, etc.
Should be used to refresh the UI regarding the new data.
Check QgsRealationEditorWidget as an example.
%End
virtual void setTitle( const QString &title );
%Docstring
Sets the title of the widget, if it is wrapped within a :py:class:`QgsCollapsibleGroupBox`
Check QgsRealationEditorWidget as an example.
%End
virtual void beforeSetRelationFeature( const QgsRelation &newRelation, const QgsFeature &newFeature );
%Docstring
A hook called right before :py:func:`~QgsAbstractRelationEditorWidget.setRelationFeature` is executed. Used to update the UI once setting the relation feature is done.
Check QgsRealationEditorWidget as an example.
%End
virtual void afterSetRelationFeature();
%Docstring
A hook called right after :py:func:`~QgsAbstractRelationEditorWidget.setRelationFeature` is executed, but before :py:func:`~QgsAbstractRelationEditorWidget.updateUi` is called. Used to update the UI once setting the relation feature is done.
Check QgsRealationEditorWidget as an example.
%End
virtual void beforeSetRelations( const QgsRelation &newRelation, const QgsRelation &newNmRelation );
%Docstring
A hook called right before :py:func:`~QgsAbstractRelationEditorWidget.setRelations` is executed. Used to manipulate UI once setting the relations is done.
Check QgsRealationEditorWidget as an example.
%End
virtual void afterSetRelations();
%Docstring
A hook called right after :py:func:`~QgsAbstractRelationEditorWidget.setRelations` is executed, but before :py:func:`~QgsAbstractRelationEditorWidget.updateUi` is called. Used to update the UI once setting the relations is done.
Check QgsRealationEditorWidget as an example.
%End
};


Expand Down
32 changes: 32 additions & 0 deletions src/gui/qgsabstractrelationeditorwidget.h
Expand Up @@ -246,11 +246,43 @@ class GUI_EXPORT QgsAbstractRelationEditorWidget : public QWidget


private:

/**
* A hook called every time the state of the relation editor widget has changed via calling its `set*` methods or slots,
* e.g. changed relation, added feature, etc.
* Should be used to refresh the UI regarding the new data.
* Check QgsRealationEditorWidget as an example.
*/
virtual void updateUi() SIP_FORCE;

/**
* Sets the title of the widget, if it is wrapped within a QgsCollapsibleGroupBox
* Check QgsRealationEditorWidget as an example.
*/
virtual void setTitle( const QString &title ) SIP_FORCE;

/**
* A hook called right before setRelationFeature() is executed. Used to update the UI once setting the relation feature is done.
* Check QgsRealationEditorWidget as an example.
*/
virtual void beforeSetRelationFeature( const QgsRelation &newRelation, const QgsFeature &newFeature ) SIP_FORCE;

/**
* A hook called right after setRelationFeature() is executed, but before updateUi() is called. Used to update the UI once setting the relation feature is done.
* Check QgsRealationEditorWidget as an example.
*/
virtual void afterSetRelationFeature() SIP_FORCE;

/**
* A hook called right before setRelations() is executed. Used to manipulate UI once setting the relations is done.
* Check QgsRealationEditorWidget as an example.
*/
virtual void beforeSetRelations( const QgsRelation &newRelation, const QgsRelation &newNmRelation ) SIP_FORCE;

/**
* A hook called right after setRelations() is executed, but before updateUi() is called. Used to update the UI once setting the relations is done.
* Check QgsRealationEditorWidget as an example.
*/
virtual void afterSetRelations() SIP_FORCE;
};

Expand Down

0 comments on commit df17603

Please sign in to comment.