Skip to content
Permalink
Browse files
add dox to duplicated enum in QgsAttributeEditorRelation and QgsRelat…
…ionEditorWidget

also remove leftover
  • Loading branch information
3nids committed Jun 1, 2021
1 parent 3491f40 commit 727a9a865c8aa90531057a1dc8e58804fbf4e833
@@ -165,7 +165,6 @@ Sets the relation editor configuration
QFlags<QgsAttributeEditorRelation::Button> operator|(QgsAttributeEditorRelation::Button f1, QFlags<QgsAttributeEditorRelation::Button> f2);



/************************************************************************
* This file has been generated automatically from *
* *
@@ -66,16 +66,20 @@ void QgsAttributeEditorRelation::loadConfiguration( const QDomElement &element,
{
if ( element.hasAttribute( "buttons" ) )
{
Q_NOWARN_DEPRECATED_PUSH
QString buttonString = element.attribute( QStringLiteral( "buttons" ), qgsFlagValueToKeys( QgsAttributeEditorRelation::Button::AllButtons ) );
config.insert( "buttons", qgsFlagValueToKeys( qgsFlagKeysToValue( buttonString, QgsAttributeEditorRelation::Button::AllButtons ) ) );
Q_NOWARN_DEPRECATED_POP
}
else
{
// pre QGIS 3.16 compatibility
Q_NOWARN_DEPRECATED_PUSH
QgsAttributeEditorRelation::Buttons buttons = QgsAttributeEditorRelation::Button::AllButtons;
buttons.setFlag( QgsAttributeEditorRelation::Button::Link, element.attribute( QStringLiteral( "showLinkButton" ), QStringLiteral( "1" ) ).toInt() );
buttons.setFlag( QgsAttributeEditorRelation::Button::Unlink, element.attribute( QStringLiteral( "showUnlinkButton" ), QStringLiteral( "1" ) ).toInt() );
buttons.setFlag( QgsAttributeEditorRelation::Button::SaveChildEdits, element.attribute( QStringLiteral( "showSaveChildEditsButton" ), QStringLiteral( "1" ) ).toInt() );
Q_NOWARN_DEPRECATED_POP
config.insert( "buttons", qgsFlagValueToKeys( buttons ) );
}
}
@@ -36,9 +36,10 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement

/**
* Possible buttons shown in the relation editor
* \deprecated since QGIS 3.18 use QgsRelationEditorWidget::Button instead
* \since QGIS 3.16
*/
enum Button
enum Q_DECL_DEPRECATED Button
{
Link = 1 << 1, //!< Link button
Unlink = 1 << 2, //!< Unlink button
@@ -49,9 +50,11 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
ZoomToChildFeature = 1 << 7, //!< Zoom to child feature
AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature //!< All buttons
};
Q_NOWARN_DEPRECATED_PUSH
Q_ENUM( Button )
Q_DECLARE_FLAGS( Buttons, Button )
Q_FLAG( Buttons )
Q_NOWARN_DEPRECATED_POP

/**
* \deprecated since QGIS 3.0.2. The name parameter is not used for anything and overwritten by the relationId internally.
@@ -183,15 +186,18 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
QString typeIdentifier() const override;
QString mRelationId;
QgsRelation mRelation;
Q_NOWARN_DEPRECATED_PUSH
Buttons mButtons = Buttons( Button::AllButtons );
Q_NOWARN_DEPRECATED_POP
bool mForceSuppressFormPopup = false;
QVariant mNmRelationId;
QString mLabel;
QString mRelationWidgetTypeId;
QVariantMap mRelationEditorConfig;
};

Q_NOWARN_DEPRECATED_PUSH
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsAttributeEditorRelation::Buttons )

Q_NOWARN_DEPRECATED_POP

#endif // QGSATTRIBUTEEDITORRELATION_H
@@ -95,6 +95,7 @@ class GUI_EXPORT QgsRelationEditorWidget : public QgsAbstractRelationEditorWidge

/**
* Possible buttons shown in the relation editor
* \since QGIS 3.18
*/
enum Button
{
@@ -71,7 +71,6 @@ class GUI_EXPORT QgsAttributesFormProperties : public QWidget, public QgsExpress
{
operator QVariant();

QgsAttributeEditorRelation::Buttons buttons = QgsAttributeEditorRelation::Button::AllButtons;
QString mRelationWidgetType;
QVariantMap mRelationWidgetConfig;
QVariant nmRelationId;

0 comments on commit 727a9a8

Please sign in to comment.