mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Expand available values for Qgis::FieldDomainSplitPolicy
This commit is contained in:
parent
de81494caf
commit
141b9efe44
@ -2276,7 +2276,8 @@ Qgis.CrsDefinitionFormat.baseClass = Qgis
|
||||
Qgis.FieldDomainSplitPolicy.DefaultValue.__doc__ = "Use default field value"
|
||||
Qgis.FieldDomainSplitPolicy.Duplicate.__doc__ = "Duplicate original value"
|
||||
Qgis.FieldDomainSplitPolicy.GeometryRatio.__doc__ = "New values are computed by the ratio of their area/length compared to the area/length of the original feature"
|
||||
Qgis.FieldDomainSplitPolicy.__doc__ = 'Split policy for field domains.\n\nWhen a feature is split into multiple parts, defines how the value of attributes\nfollowing the domain are computed.\n\n.. versionadded:: 3.26\n\n' + '* ``DefaultValue``: ' + Qgis.FieldDomainSplitPolicy.DefaultValue.__doc__ + '\n' + '* ``Duplicate``: ' + Qgis.FieldDomainSplitPolicy.Duplicate.__doc__ + '\n' + '* ``GeometryRatio``: ' + Qgis.FieldDomainSplitPolicy.GeometryRatio.__doc__
|
||||
Qgis.FieldDomainSplitPolicy.UnsetField.__doc__ = "Clears the field value so that the data provider backend will populate using any backend triggers or similar logic (since QGIS 3.30)"
|
||||
Qgis.FieldDomainSplitPolicy.__doc__ = 'Split policy for field domains.\n\nWhen a feature is split into multiple parts, defines how the value of attributes\nfollowing the domain are computed.\n\n.. versionadded:: 3.26\n\n' + '* ``DefaultValue``: ' + Qgis.FieldDomainSplitPolicy.DefaultValue.__doc__ + '\n' + '* ``Duplicate``: ' + Qgis.FieldDomainSplitPolicy.Duplicate.__doc__ + '\n' + '* ``GeometryRatio``: ' + Qgis.FieldDomainSplitPolicy.GeometryRatio.__doc__ + '\n' + '* ``UnsetField``: ' + Qgis.FieldDomainSplitPolicy.UnsetField.__doc__
|
||||
# --
|
||||
Qgis.FieldDomainSplitPolicy.baseClass = Qgis
|
||||
# monkey patching scoped based enum
|
||||
|
@ -1354,6 +1354,7 @@ The development version
|
||||
DefaultValue,
|
||||
Duplicate,
|
||||
GeometryRatio,
|
||||
UnsetField,
|
||||
};
|
||||
|
||||
enum class FieldDomainMergePolicy
|
||||
|
@ -2123,6 +2123,9 @@ QString QgsFieldDomainDetailsWidget::htmlMetadata( QgsFieldDomain *domain, const
|
||||
case Qgis::FieldDomainSplitPolicy::GeometryRatio:
|
||||
metadata += tr( "Use geometry ratio" );
|
||||
break;
|
||||
case Qgis::FieldDomainSplitPolicy::UnsetField:
|
||||
metadata += tr( "Unset field" );
|
||||
break;
|
||||
}
|
||||
metadata += QLatin1String( "</td></tr>\n" );
|
||||
|
||||
|
@ -2274,6 +2274,7 @@ class CORE_EXPORT Qgis
|
||||
DefaultValue, //!< Use default field value
|
||||
Duplicate, //!< Duplicate original value
|
||||
GeometryRatio, //!< New values are computed by the ratio of their area/length compared to the area/length of the original feature
|
||||
UnsetField, //!< Clears the field value so that the data provider backend will populate using any backend triggers or similar logic (since QGIS 3.30)
|
||||
};
|
||||
Q_ENUM( FieldDomainSplitPolicy )
|
||||
|
||||
|
@ -37,9 +37,6 @@
|
||||
#include "qgsfielddomain.h"
|
||||
#include "qgsfontmanager.h"
|
||||
#include "qgsvariantutils.h"
|
||||
#include "qgsweakrelation.h"
|
||||
#include "qgsproviderregistry.h"
|
||||
#include "qgsprovidermetadata.h"
|
||||
#include "qgsogrproviderutils.h"
|
||||
|
||||
#include <cmath>
|
||||
@ -2243,6 +2240,10 @@ OGRFieldDomainH QgsOgrUtils::convertFieldDomain( const QgsFieldDomain *domain )
|
||||
case Qgis::FieldDomainSplitPolicy::Duplicate:
|
||||
OGR_FldDomain_SetSplitPolicy( res, OFDSP_DUPLICATE );
|
||||
break;
|
||||
|
||||
case Qgis::FieldDomainSplitPolicy::UnsetField:
|
||||
// not supported
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user