#include <qgsofflineediting.h>
Definition at line 35 of file qgsofflineediting.h.
 
◆ ContainerType
Type of offline database container file. 
| Enumerator | 
|---|
| SpatiaLite |  | 
| GPKG |  | 
Definition at line 52 of file qgsofflineediting.h.
 
 
◆ ProgressMode
| Enumerator | 
|---|
| CopyFeatures |  | 
| ProcessFeatures |  | 
| AddFields |  | 
| AddFeatures |  | 
| RemoveFeatures |  | 
| UpdateFeatures |  | 
| UpdateGeometries |  | 
Definition at line 40 of file qgsofflineediting.h.
 
 
◆ QgsOfflineEditing()
      
        
          | QgsOfflineEditing::QgsOfflineEditing | ( |  | ) |  | 
      
 
 
◆ convertToOfflineProject()
      
        
          | bool QgsOfflineEditing::convertToOfflineProject | ( | const QString & | offlineDataPath, | 
        
          |  |  | const QString & | offlineDbFile, | 
        
          |  |  | const QStringList & | layerIds, | 
        
          |  |  | bool | onlySelected = false, | 
        
          |  |  | ContainerType | containerType = SpatiaLite, | 
        
          |  |  | const QString & | layerNameSuffix = QStringLiteral( " (offline)" ) | 
        
          |  | ) |  |  | 
      
 
Convert current project for offline editing. 
convert current project to offline project returns offline project file path
- Parameters
- 
  
    | offlineDataPath | Path to offline db file |  | offlineDbFile | Offline db file name |  | layerIds | List of layer names to convert |  | onlySelected | Only copy selected features from layers where a selection is present |  | containerType | defines the SQLite file container type like SpatiaLite or GPKG |  | layerNameSuffix | Suffix string added to the offline layer name |  
 
Workflow:
- copy layers to SpatiaLite
- create SpatiaLite db at offlineDataPath
- create table for each layer
- add new SpatiaLite layer
- copy features
- save as offline project
- mark offline layers
- remove remote layers
- mark as offline project 
Definition at line 89 of file qgsofflineediting.cpp.
 
 
◆ isOfflineProject()
      
        
          | bool QgsOfflineEditing::isOfflineProject | ( |  | ) | const | 
      
 
 
◆ layerProgressUpdated
  
  | 
        
          | void QgsOfflineEditing::layerProgressUpdated | ( | int | layer, |  
          |  |  | int | numLayers |  
          |  | ) |  |  |  | signal | 
 
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. 
 
 
◆ progressModeSet
Emitted when the mode for the progress of the current operation is set. 
- Parameters
- 
  
    | mode | progress mode |  | maximum | total number of entities to process in the current operation |  
 
 
 
◆ progressStarted
  
  | 
        
          | void QgsOfflineEditing::progressStarted | ( |  | ) |  |  | signal | 
 
Emitted when the process has started. 
 
 
◆ progressStopped
  
  | 
        
          | void QgsOfflineEditing::progressStopped | ( |  | ) |  |  | signal | 
 
Emitted when the processing of all layers has finished. 
 
 
◆ progressUpdated
  
  | 
        
          | void QgsOfflineEditing::progressUpdated | ( | int | progress | ) |  |  | signal | 
 
Emitted with the progress of the current mode. 
- Parameters
- 
  
    | progress | current index of processed entities |  
 
 
 
◆ synchronize()
      
        
          | void QgsOfflineEditing::synchronize | ( |  | ) |  | 
      
 
 
◆ warning
  
  | 
        
          | void QgsOfflineEditing::warning | ( | const QString & | title, |  
          |  |  | const QString & | message |  
          |  | ) |  |  |  | signal | 
 
Emitted when a warning needs to be displayed. 
- Parameters
- 
  
    | title | title string for message |  | message | A descriptive message for the warning |  
 
 
 
The documentation for this class was generated from the following files: