mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			271 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			271 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgsvectorlayerjoininfo.h                                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsVectorLayerJoinInfo
 | 
						|
{
 | 
						|
%Docstring
 | 
						|
Defines left outer join from our vector layer to some other vector layer.
 | 
						|
The join is done based on [our layer].targetField = [join layer].joinField
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsvectorlayerjoininfo.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsVectorLayerJoinInfo();
 | 
						|
%Docstring
 | 
						|
Constructor for QgsVectorLayerJoinInfo.
 | 
						|
%End
 | 
						|
 | 
						|
    void setJoinLayer( QgsVectorLayer *layer );
 | 
						|
%Docstring
 | 
						|
Sets weak reference to the joined layer
 | 
						|
%End
 | 
						|
    QgsVectorLayer *joinLayer() const;
 | 
						|
%Docstring
 | 
						|
Returns joined layer (may be ``None`` if the reference was set by layer ID and not resolved yet)
 | 
						|
%End
 | 
						|
 | 
						|
    void setJoinLayerId( const QString &layerId );
 | 
						|
%Docstring
 | 
						|
Sets ID of the joined layer. It will need to be overwritten by :py:func:`~QgsVectorLayerJoinInfo.setJoinLayer` to a reference to real layer
 | 
						|
%End
 | 
						|
    QString joinLayerId() const;
 | 
						|
%Docstring
 | 
						|
ID of the joined layer - may be used to resolve reference to the joined layer
 | 
						|
%End
 | 
						|
 | 
						|
    void setTargetFieldName( const QString &fieldName );
 | 
						|
%Docstring
 | 
						|
Sets name of the field of our layer that will be used for join
 | 
						|
%End
 | 
						|
    QString targetFieldName() const;
 | 
						|
%Docstring
 | 
						|
Returns name of the field of our layer that will be used for join
 | 
						|
%End
 | 
						|
 | 
						|
    void setJoinFieldName( const QString &fieldName );
 | 
						|
%Docstring
 | 
						|
Sets name of the field of joined layer that will be used for join
 | 
						|
%End
 | 
						|
    QString joinFieldName() const;
 | 
						|
%Docstring
 | 
						|
Returns name of the field of joined layer that will be used for join
 | 
						|
%End
 | 
						|
 | 
						|
    void setPrefix( const QString &prefix );
 | 
						|
%Docstring
 | 
						|
Sets prefix of fields from the joined layer. If ``None``, joined layer's name will be used.
 | 
						|
%End
 | 
						|
    QString prefix() const;
 | 
						|
%Docstring
 | 
						|
Returns prefix of fields from the joined layer. If ``None``, joined layer's name will be used.
 | 
						|
%End
 | 
						|
 | 
						|
    void setUsingMemoryCache( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether values from the joined layer should be cached in memory to speed up lookups
 | 
						|
%End
 | 
						|
 | 
						|
    bool isUsingMemoryCache() const;
 | 
						|
%Docstring
 | 
						|
Returns whether values from the joined layer should be cached in memory to speed up lookups.
 | 
						|
Will return ``False`` if upsertOnEdit is enabled.
 | 
						|
%End
 | 
						|
 | 
						|
    bool isDynamicFormEnabled() const;
 | 
						|
%Docstring
 | 
						|
Returns whether the form has to be dynamically updated with joined fields
 | 
						|
when  a feature is being created in the target layer.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void setDynamicFormEnabled( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether the form has to be dynamically updated with joined fields
 | 
						|
when a feature is being created in the target layer.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    bool isEditable() const;
 | 
						|
%Docstring
 | 
						|
Returns whether joined fields may be edited through the form of
 | 
						|
the target layer.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void setEditable( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether the form of the target layer allows editing joined fields.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    bool hasUpsertOnEdit() const;
 | 
						|
%Docstring
 | 
						|
Returns whether a feature created on the target layer has to impact
 | 
						|
the joined layer by creating a new feature if necessary.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void setUpsertOnEdit( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether a feature created on the target layer has to impact
 | 
						|
the joined layer by creating a new feature if necessary.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    bool hasCascadedDelete() const;
 | 
						|
%Docstring
 | 
						|
Returns whether a feature deleted on the target layer has to impact the
 | 
						|
joined layer by deleting the corresponding joined feature.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    void setCascadedDelete( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether a feature deleted on the target layer has to impact the
 | 
						|
joined layer by deleting the corresponding joined feature.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    QString prefixedFieldName( const QgsField &field ) const;
 | 
						|
%Docstring
 | 
						|
Returns the prefixed name of the field.
 | 
						|
 | 
						|
:param field: the field
 | 
						|
 | 
						|
:return: the prefixed name of the field
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    QgsFeature extractJoinedFeature( const QgsFeature &feature ) const;
 | 
						|
%Docstring
 | 
						|
Extract the join feature from the target feature for the current
 | 
						|
join layer information.
 | 
						|
 | 
						|
:param feature: A feature from the target layer
 | 
						|
 | 
						|
:return: the corresponding joined feature
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
 void setJoinFieldNamesBlackList( const QStringList &blackList ) /Deprecated/;
 | 
						|
%Docstring
 | 
						|
Sets a list of fields to ignore whatever happens.
 | 
						|
 | 
						|
.. deprecated::
 | 
						|
   use setJoinFieldNamesBlockList() instead
 | 
						|
%End
 | 
						|
 | 
						|
 QStringList joinFieldNamesBlackList() const /Deprecated/;
 | 
						|
%Docstring
 | 
						|
Returns the list of fields to ignore.
 | 
						|
 | 
						|
.. deprecated::
 | 
						|
   use joinFieldNamesBlockList() instead
 | 
						|
%End
 | 
						|
 | 
						|
    void setJoinFieldNamesBlockList( const QStringList &list );
 | 
						|
%Docstring
 | 
						|
Sets a ``list`` of fields to ignore whatever happens.
 | 
						|
 | 
						|
.. seealso:: :py:func:`joinFieldNamesBlockList`
 | 
						|
 | 
						|
.. versionadded:: 3.14
 | 
						|
%End
 | 
						|
 | 
						|
    QStringList joinFieldNamesBlockList() const;
 | 
						|
%Docstring
 | 
						|
Returns the list of fields to ignore.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setJoinFieldNamesBlockList`
 | 
						|
 | 
						|
.. versionadded:: 3.14
 | 
						|
%End
 | 
						|
 | 
						|
    bool hasSubset( bool blocklisted = true ) const;
 | 
						|
%Docstring
 | 
						|
Returns ``True`` if blocklisted fields is not empty or if a subset of names
 | 
						|
has been set.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    static QStringList joinFieldNamesSubset( const QgsVectorLayerJoinInfo &info, bool blocklisted = true );
 | 
						|
%Docstring
 | 
						|
Returns the list of field names to use for joining considering
 | 
						|
blocklisted fields and subset.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
    bool operator==( const QgsVectorLayerJoinInfo &other ) const;
 | 
						|
 | 
						|
    void setJoinFieldNamesSubset( QStringList *fieldNamesSubset /Transfer/ );
 | 
						|
%Docstring
 | 
						|
Sets the subset of fields to be used from joined layer.
 | 
						|
 | 
						|
Ownership of ``fileNamesSubset`` is transferred. A ``fieldNameSubset`` of ``None`` indicates that all fields should be used.
 | 
						|
 | 
						|
.. seealso:: :py:func:`joinFieldNamesSubset`
 | 
						|
 | 
						|
.. versionadded:: 2.6
 | 
						|
%End
 | 
						|
 | 
						|
    QStringList *joinFieldNamesSubset() const;
 | 
						|
%Docstring
 | 
						|
Returns the subset of fields to be used from joined layer.
 | 
						|
 | 
						|
All fields will be used if ``None`` is returned.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setJoinFieldNamesSubset`
 | 
						|
 | 
						|
.. versionadded:: 2.6
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgsvectorlayerjoininfo.h                                    *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |