19 #ifndef QGS_OFFLINE_EDITING_H
20 #define QGS_OFFLINE_EDITING_H
56 bool convertToOfflineProject(
const QString& offlineDataPath,
const QString& offlineDbFile,
const QStringList& layerIds );
59 bool isOfflineProject();
66 void progressStarted();
72 void layerProgressUpdated(
int layer,
int numLayers );
83 void progressUpdated(
int progress );
86 void progressStopped();
93 void warning(
const QString& title,
const QString& message );
96 void initializeSpatialMetadata(
sqlite3 *sqlite_handle );
97 bool createSpatialiteDB(
const QString& offlineDbPath );
98 void createLoggingTables(
sqlite3* db );
110 void showWarning(
const QString& message );
113 int getOrCreateLayerId(
sqlite3* db,
const QString& qgisLayerId );
114 int getCommitNo(
sqlite3* db );
115 void increaseCommitNo(
sqlite3* db );
121 int sqlExec(
sqlite3* db,
const QString& sql );
122 int sqlQueryInt(
sqlite3* db,
const QString& sql,
int defaultValue );
123 QList<int> sqlQueryInts(
sqlite3* db,
const QString& sql );
125 QList<QgsField> sqlQueryAttributesAdded(
sqlite3* db,
const QString& sql );
128 struct AttributeValueChange
134 typedef QList<AttributeValueChange> AttributeValueChanges;
135 AttributeValueChanges sqlQueryAttributeValueChanges(
sqlite3* db,
const QString& sql );
137 struct GeometryChange
142 typedef QList<GeometryChange> GeometryChanges;
143 GeometryChanges sqlQueryGeometryChanges(
sqlite3* db,
const QString& sql );
147 void committedAttributesAdded(
const QString& qgisLayerId,
const QList<QgsField>& addedAttributes );
148 void committedFeaturesAdded(
const QString& qgisLayerId,
const QgsFeatureList& addedFeatures );
149 void committedFeaturesRemoved(
const QString& qgisLayerId,
const QgsFeatureIds& deletedFeatureIds );
150 void committedAttributeValuesChanges(
const QString& qgisLayerId,
const QgsChangedAttributesMap& changedAttrsMap );
151 void committedGeometriesChanges(
const QString& qgisLayerId,
const QgsGeometryMap& changedGeometries );
152 void startListenFeatureChanges();
153 void stopListenFeatureChanges();
156 #endif // QGS_OFFLINE_EDITING_H