2017-05-22 09:01:45 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsvectorlayereditpassthrough.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer
|
|
|
|
{
|
2017-05-22 09:01:45 +02:00
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
%TypeHeaderCode
|
2017-05-22 09:01:45 +02:00
|
|
|
#include "qgsvectorlayereditpassthrough.h"
|
2016-01-04 22:51:18 +11:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );
|
2017-05-22 09:01:45 +02:00
|
|
|
virtual bool isModified() const;
|
|
|
|
|
|
|
|
virtual bool addFeature( QgsFeature &f );
|
|
|
|
|
|
|
|
virtual bool addFeatures( QgsFeatureList &features );
|
|
|
|
|
|
|
|
virtual bool deleteFeature( QgsFeatureId fid );
|
|
|
|
|
|
|
|
virtual bool deleteFeatures( const QgsFeatureIds &fids );
|
|
|
|
|
|
|
|
virtual bool changeGeometry( QgsFeatureId fid, const QgsGeometry &geom );
|
|
|
|
|
|
|
|
virtual bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
|
|
|
|
|
2018-01-23 13:07:35 +00:00
|
|
|
|
|
|
|
virtual bool changeAttributeValues( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues );
|
|
|
|
|
|
|
|
%Docstring
|
|
|
|
Changes values of attributes (but does not commit it).
|
|
|
|
|
|
|
|
:return: true if attributes are well updated, false otherwise
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-05-22 09:01:45 +02:00
|
|
|
virtual bool addAttribute( const QgsField &field );
|
|
|
|
|
|
|
|
virtual bool deleteAttribute( int attr );
|
|
|
|
|
|
|
|
virtual bool renameAttribute( int attr, const QString &newName );
|
|
|
|
|
|
|
|
virtual bool commitChanges( QStringList &commitErrors );
|
|
|
|
|
|
|
|
virtual void rollBack();
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-11-10 16:16:15 +00:00
|
|
|
bool update( QgsTransaction *transaction, const QString &sql, const QString &name );
|
2017-10-16 13:18:55 +01:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Update underlying data with a SQL query embedded in a transaction.
|
2017-10-16 13:18:55 +01:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param transaction: Transaction in which the sql query has been run
|
|
|
|
:param sql: The SQL query updating data
|
2017-11-10 16:16:15 +00:00
|
|
|
:param name: The name of the undo/redo command
|
2017-12-15 10:36:55 -04:00
|
|
|
|
|
|
|
:return: true if the undo/redo command is well added to the stack, false otherwise
|
2017-10-16 13:18:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
};
|
2017-05-22 09:01:45 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsvectorlayereditpassthrough.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|