19 #ifndef QGS_OFFLINE_EDITING_H 20 #define QGS_OFFLINE_EDITING_H 22 #include "qgis_core.h" 61 bool convertToOfflineProject(
const QString &offlineDataPath,
const QString &offlineDbFile,
const QStringList &layerIds,
bool onlySelected =
false );
64 bool isOfflineProject()
const;
74 void progressStarted();
82 void layerProgressUpdated(
int layer,
int numLayers );
96 void progressUpdated(
int progress );
99 void progressStopped();
106 void warning(
const QString &title,
const QString &message );
109 void initializeSpatialMetadata(
sqlite3 *sqlite_handle );
110 bool createSpatialiteDB(
const QString &offlineDbPath );
111 void createLoggingTables(
sqlite3 *db );
139 void showWarning(
const QString &message );
142 int getOrCreateLayerId(
sqlite3 *db,
const QString &qgisLayerId );
143 int getCommitNo(
sqlite3 *db );
144 void increaseCommitNo(
sqlite3 *db );
150 int sqlExec(
sqlite3 *db,
const QString &sql );
151 int sqlQueryInt(
sqlite3 *db,
const QString &sql,
int defaultValue );
152 QList<int> sqlQueryInts(
sqlite3 *db,
const QString &sql );
154 QList<QgsField> sqlQueryAttributesAdded(
sqlite3 *db,
const QString &sql );
157 struct AttributeValueChange
163 typedef QList<AttributeValueChange> AttributeValueChanges;
164 AttributeValueChanges sqlQueryAttributeValueChanges(
sqlite3 *db,
const QString &sql );
166 struct GeometryChange
171 typedef QList<GeometryChange> GeometryChanges;
172 GeometryChanges sqlQueryGeometryChanges(
sqlite3 *db,
const QString &sql );
176 void committedAttributesAdded(
const QString &qgisLayerId,
const QList<QgsField> &addedAttributes );
177 void committedFeaturesAdded(
const QString &qgisLayerId,
const QgsFeatureList &addedFeatures );
178 void committedFeaturesRemoved(
const QString &qgisLayerId,
const QgsFeatureIds &deletedFeatureIds );
179 void committedAttributeValuesChanges(
const QString &qgisLayerId,
const QgsChangedAttributesMap &changedAttrsMap );
180 void committedGeometriesChanges(
const QString &qgisLayerId,
const QgsGeometryMap &changedGeometries );
181 void startListenFeatureChanges();
182 void stopListenFeatureChanges();
185 #endif // QGS_OFFLINE_EDITING_H QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
Base class for all map layer types.
QSet< QgsFeatureId > QgsFeatureIds
QList< QgsFeature > QgsFeatureList
Unique pointer for sqlite3 databases, which automatically closes the database when the pointer goes o...
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
Represents a vector layer which manages a vector based data sets.