File: qgsvectorlayereditpassthrough.sip.in

package info (click to toggle)
qgis 3.44.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,237,544 kB
  • sloc: cpp: 1,668,420; python: 381,688; xml: 23,474; perl: 4,078; sh: 3,733; ansic: 2,799; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (87 lines) | stat: -rw-r--r-- 3,078 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/vector/qgsvectorlayereditpassthrough.h                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/



%ModuleHeaderCode
#include <qgsvectorlayereditpassthrough.h>
%End

class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer
{
%Docstring(signature="appended")
An edit buffer which directly passes commands through, used when a layer
is within a transaction.
%End

%TypeHeaderCode
#include "qgsvectorlayereditpassthrough.h"
%End
%ConvertToSubClassCode
    if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
      sipType = sipType_QgsVectorLayerEditPassthrough;
    else
      sipType = nullptr;
%End
  public:
    QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );
    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() );


    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
%End

    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();


    bool update( QgsTransaction *transaction, const QString &sql, const QString &name );
%Docstring
Update underlying data with a SQL query embedded in a transaction.

:param transaction: Transaction in which the sql query has been run
:param sql: The SQL query updating data
:param name: The name of the undo/redo command

:return: ``True`` if the undo/redo command is well added to the stack,
         ``False`` otherwise
%End

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/vector/qgsvectorlayereditpassthrough.h                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/