mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	Adds an option to the relation widget configuration to suppress form popup open when new features are added in an embedded form context. This option overrides the form-level option (that might still be the desired behavior when the form is used as a standalone form).
		
			
				
	
	
		
			122 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			122 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsvectorlayertools.h                                       *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsVectorLayerTools : QObject
 | |
| {
 | |
| %Docstring
 | |
| Methods in this class are used to handle basic operations on vector layers.
 | |
| With an implementation of this class, parts of the application can ask for
 | |
| an operation to be done and the implementation will then take care of it.
 | |
| 
 | |
| Reimplement this class, if you need to have custom checks or GUI elements
 | |
| in your application.
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsvectorlayertools.h"
 | |
| %End
 | |
|   public:
 | |
|     QgsVectorLayerTools();
 | |
| 
 | |
| 
 | |
|     virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature /Out/ = 0 ) const = 0;
 | |
| %Docstring
 | |
| This method should/will be called, whenever a new feature will be added to the layer
 | |
| 
 | |
| :param layer: The layer to which the feature should be added
 | |
| :param defaultValues: Default values for the feature to add
 | |
| :param defaultGeometry: A default geometry to add to the feature
 | |
| 
 | |
| :return: - ``True`` in case of success, ``False`` if the operation failed/was aborted
 | |
|          - feature: Updated feature after adding will be written back to this
 | |
| %End
 | |
| 
 | |
| 
 | |
|     virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
 | |
| %Docstring
 | |
| This will be called, whenever a vector layer should be switched to edit mode. Check the providers
 | |
| capability to edit in here.
 | |
| If successful layer->startEditing() will be called and ``True`` returned.
 | |
| 
 | |
| :param layer: The layer on which to start an edit session
 | |
| 
 | |
| :return: ``True``, if the editing session was started
 | |
| %End
 | |
| 
 | |
| 
 | |
|     virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
 | |
| %Docstring
 | |
| Will be called, when an editing session is ended and the features should be committed.
 | |
| Appropriate dialogs should be shown like
 | |
| 
 | |
| :param layer: The layer to commit
 | |
| :param allowCancel: ``True`` if a cancel button should be offered
 | |
| 
 | |
| :return: ``True`` if successful
 | |
| %End
 | |
| 
 | |
| 
 | |
|     virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
 | |
| %Docstring
 | |
| Should be called, when the features should be committed but the editing session is not ended.
 | |
| 
 | |
| :param layer: The layer to commit
 | |
| 
 | |
| :return: ``True`` if successful
 | |
| %End
 | |
| 
 | |
| 
 | |
|     virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = 0, const bool topologicalEditing = false, QgsVectorLayer *topologicalLayer = 0 ) const;
 | |
| %Docstring
 | |
| Copy and move features with defined translation.
 | |
| 
 | |
| :param layer: The layer
 | |
| :param request: The request for the features to be moved. It will be assigned to a new feature request with the newly copied features.
 | |
| :param dx: The translation on x
 | |
| :param dy: The translation on y
 | |
| :param topologicalEditing: If true, the function will perform topological
 | |
|                            editing of the vertices of ``layer`` on ``layer`` and ``topologicalLayer``
 | |
| :param topologicalLayer: The layer where vertices from the moved features of ``layer`` will be added
 | |
| 
 | |
| :return: - ``True`` if all features could be copied.
 | |
|          - errorMsg: If given, it will contain the error message
 | |
| %End
 | |
| 
 | |
|     bool forceSuppressFormPopup() const;
 | |
| %Docstring
 | |
| Returns force suppress form popup status.
 | |
| 
 | |
| :return: ``True`` if force suppress form popup is set.
 | |
| 
 | |
| .. versionadded:: 3.14
 | |
| %End
 | |
| 
 | |
|     void setForceSuppressFormPopup( bool forceSuppressFormPopup );
 | |
| %Docstring
 | |
| Sets force suppress form popup status to ``forceSuppressFormPopup``.
 | |
| 
 | |
| This flag will override the layer and general settings regarding the automatic
 | |
| opening of the attribute form dialog when digitizing is completed.
 | |
| 
 | |
| .. versionadded:: 3.14
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsvectorlayertools.h                                       *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |