Added SIP_DEPRECATED and added forgotten \since docs

This commit is contained in:
Ivan Ivanov 2020-12-23 01:30:23 +02:00
parent 51cd712c76
commit b1dad1d3ef
4 changed files with 26 additions and 12 deletions

View File

@ -425,7 +425,7 @@ Determines if the "Save child layer edits" button should be shown
use visibleButtons() instead use visibleButtons() instead
%End %End
void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ); void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ) /Deprecated/;
%Docstring %Docstring
Defines the buttons which are shown Defines the buttons which are shown
@ -435,14 +435,14 @@ Defines the buttons which are shown
use setConfig() instead use setConfig() instead
%End %End
QgsAttributeEditorRelation::Buttons visibleButtons() const; QgsAttributeEditorRelation::Buttons visibleButtons() const /Deprecated/;
%Docstring %Docstring
Returns the buttons which are shown Returns the buttons which are shown
.. versionadded:: 3.16 .. versionadded:: 3.16
.. deprecated:: QGIS 3.18 .. deprecated:: QGIS 3.18
use setConfig() instead use config() instead
%End %End
bool forceSuppressFormPopup() const; bool forceSuppressFormPopup() const;
@ -494,11 +494,15 @@ If it's empty it takes the relation id as label
QString relationWidgetTypeId() const; QString relationWidgetTypeId() const;
%Docstring %Docstring
Returns the current relation widget type id Returns the current relation widget type id
.. versionadded:: 3.18
%End %End
void setRelationWidgetTypeId( const QString &relationWidgetTypeId ); void setRelationWidgetTypeId( const QString &relationWidgetTypeId );
%Docstring %Docstring
Sets the relation widget type Sets the relation widget type
.. versionadded:: 3.18
%End %End
}; };

View File

@ -115,22 +115,24 @@ Determines if the "Save child layer edits" button should be shown
use visibleButtons() instead use visibleButtons() instead
%End %End
void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ); void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ) /Deprecated/;
%Docstring %Docstring
Defines the buttons which are shown Defines the buttons which are shown
.. versionadded:: 3.16 .. versionadded:: 3.16
.. deprecated:: QGIS 3.18 .. deprecated:: QGIS 3.18
use setWidgetConfig() instead
%End %End
QgsAttributeEditorRelation::Buttons visibleButtons() const; QgsAttributeEditorRelation::Buttons visibleButtons() const /Deprecated/;
%Docstring %Docstring
Returns the buttons which are shown Returns the buttons which are shown
.. versionadded:: 3.16 .. versionadded:: 3.16
.. deprecated:: QGIS 3.18 .. deprecated:: QGIS 3.18
use widgetConfig() instead
%End %End
@ -139,11 +141,15 @@ Returns the buttons which are shown
Will set the config of this widget wrapper to the specified config. Will set the config of this widget wrapper to the specified config.
:param config: The config for this wrapper :param config: The config for this wrapper
.. versionadded:: 3.18
%End %End
QVariantMap widgetConfig() const; QVariantMap widgetConfig() const;
%Docstring %Docstring
Returns the whole widget config Returns the whole widget config
.. versionadded:: 3.18
%End %End
bool forceSuppressFormPopup() const; bool forceSuppressFormPopup() const;

View File

@ -475,14 +475,14 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
* \since QGIS 3.16 * \since QGIS 3.16
* \deprecated since QGIS 3.18 use setConfig() instead * \deprecated since QGIS 3.18 use setConfig() instead
*/ */
Q_DECL_DEPRECATED void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ); Q_DECL_DEPRECATED void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ) SIP_DEPRECATED;
/** /**
* Returns the buttons which are shown * Returns the buttons which are shown
* \since QGIS 3.16 * \since QGIS 3.16
* \deprecated since QGIS 3.18 use setConfig() instead * \deprecated since QGIS 3.18 use config() instead
*/ */
Q_DECL_DEPRECATED QgsAttributeEditorRelation::Buttons visibleButtons() const {return mButtons;} Q_DECL_DEPRECATED QgsAttributeEditorRelation::Buttons visibleButtons() const SIP_DEPRECATED {return mButtons;}
/** /**
* Determines the force suppress form popup status. * Determines the force suppress form popup status.
@ -526,11 +526,13 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
/** /**
* Returns the current relation widget type id * Returns the current relation widget type id
* \since QGIS 3.18
*/ */
QString relationWidgetTypeId() const; QString relationWidgetTypeId() const;
/** /**
* Sets the relation widget type * Sets the relation widget type
* \since QGIS 3.18
*/ */
void setRelationWidgetTypeId( const QString &relationWidgetTypeId ); void setRelationWidgetTypeId( const QString &relationWidgetTypeId );

View File

@ -111,27 +111,29 @@ class GUI_EXPORT QgsRelationWidgetWrapper : public QgsWidgetWrapper
/** /**
* Defines the buttons which are shown * Defines the buttons which are shown
* \since QGIS 3.16 * \since QGIS 3.16
* \deprecated since QGIS 3.18 * \deprecated since QGIS 3.18 use setWidgetConfig() instead
*/ */
Q_DECL_DEPRECATED void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ); Q_DECL_DEPRECATED void setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons ) SIP_DEPRECATED;
/** /**
* Returns the buttons which are shown * Returns the buttons which are shown
* \since QGIS 3.16 * \since QGIS 3.16
* \deprecated since QGIS 3.18 * \deprecated since QGIS 3.18 use widgetConfig() instead
*/ */
Q_DECL_DEPRECATED QgsAttributeEditorRelation::Buttons visibleButtons() const; Q_DECL_DEPRECATED QgsAttributeEditorRelation::Buttons visibleButtons() const SIP_DEPRECATED;
/** /**
* Will set the config of this widget wrapper to the specified config. * Will set the config of this widget wrapper to the specified config.
* *
* \param config The config for this wrapper * \param config The config for this wrapper
* \since QGIS 3.18
*/ */
void setWidgetConfig( const QVariantMap &config ); void setWidgetConfig( const QVariantMap &config );
/** /**
* Returns the whole widget config * Returns the whole widget config
* \since QGIS 3.18
*/ */
QVariantMap widgetConfig() const; QVariantMap widgetConfig() const;