QGIS/python/core/auto_generated/qgsofflineediting.sip.in
2024-08-16 07:28:29 +10:00

120 lines
3.6 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsofflineediting.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsOfflineEditing : QObject
{
%Docstring(signature="appended")
Handles logic relating to synchronizing online and offline copies of layer data.
%End
%TypeHeaderCode
#include "qgsofflineediting.h"
%End
public:
enum ProgressMode
{
CopyFeatures,
ProcessFeatures,
AddFields,
AddFeatures,
RemoveFeatures,
UpdateFeatures,
UpdateGeometries
};
enum ContainerType
{
SpatiaLite,
GPKG
};
QgsOfflineEditing();
bool convertToOfflineProject( const QString &offlineDataPath, const QString &offlineDbFile, const QStringList &layerIds, bool onlySelected = false, ContainerType containerType = SpatiaLite, const QString &layerNameSuffix = QStringLiteral( " (offline)" ) );
%Docstring
Convert current project for offline editing
:param offlineDataPath: Path to offline db file
:param offlineDbFile: Offline db file name
:param layerIds: List of layer names to convert
:param onlySelected: Only copy selected features from layers where a selection is present
:param containerType: defines the SQLite file container type like SpatiaLite or GPKG
:param layerNameSuffix: Suffix string added to the offline layer name
%End
bool isOfflineProject() const;
%Docstring
Returns ``True`` if current project is offline
%End
void synchronize( bool useTransaction = false );
%Docstring
Synchronize to remote layers
:param useTransaction: enforce the remote layer modifications with the same source to be in a transaction group
%End
signals:
void progressStarted();
%Docstring
Emitted when the process has started.
%End
void layerProgressUpdated( int layer, int numLayers );
%Docstring
Emitted whenever a new layer is being processed.
It is possible to estimate the progress of the complete operation by
comparing the index of the current ``layer`` to the total amount
``numLayers``.
%End
void progressModeSet( QgsOfflineEditing::ProgressMode mode, long long maximum );
%Docstring
Emitted when the mode for the progress of the current operation is
set.
:param mode: progress mode
:param maximum: total number of entities to process in the current operation
%End
void progressUpdated( long long progress );
%Docstring
Emitted with the progress of the current mode
:param progress: current index of processed entities
%End
void progressStopped();
%Docstring
Emitted when the processing of all layers has finished
%End
void warning( const QString &title, const QString &message );
%Docstring
Emitted when a warning needs to be displayed.
:param title: title string for message
:param message: A descriptive message for the warning
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsofflineediting.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/