69 bool convertToOfflineProject(
const QString &offlineDataPath,
const QString &offlineDbFile,
const QStringList &layerIds,
bool onlySelected =
false, ContainerType containerType = SpatiaLite,
const QString &layerNameSuffix = QStringLiteral(
" (offline)" ) );
72 bool isOfflineProject()
const;
79 void synchronize(
bool useTransaction =
false );
118 void warning(
const QString &title,
const QString &message );
121 void initializeSpatialMetadata(
sqlite3 *sqlite_handle );
122 bool createOfflineDb(
const QString &offlineDbPath,
ContainerType containerType = SpatiaLite );
123 void createLoggingTables(
sqlite3 *db );
125 void convertToOfflineLayer(
QgsVectorLayer *layer,
sqlite3 *db,
const QString &offlineDbPath,
bool onlySelected,
ContainerType containerType = SpatiaLite,
const QString &layerNameSuffix = QStringLiteral(
" (offline)" ) );
141 void showWarning(
const QString &message );
144 int getOrCreateLayerId(
sqlite3 *db,
const QString &qgisLayerId );
145 int getCommitNo(
sqlite3 *db );
146 void increaseCommitNo(
sqlite3 *db );
152 int sqlExec(
sqlite3 *db,
const QString &sql );
153 int sqlQueryInt(
sqlite3 *db,
const QString &sql,
int defaultValue );
154 QString sqlQueryStr(
sqlite3 *db,
const QString &sql, QString &defaultValue );
155 QList<int> sqlQueryInts(
sqlite3 *db,
const QString &sql );
156 QString sqlEscape( QString value )
const;
158 QList<QgsField> sqlQueryAttributesAdded(
sqlite3 *db,
const QString &sql );
161 struct AttributeValueChange
167 typedef QList<AttributeValueChange> AttributeValueChanges;
168 AttributeValueChanges sqlQueryAttributeValueChanges(
sqlite3 *db,
const QString &sql );
170 struct GeometryChange
175 typedef QList<GeometryChange> GeometryChanges;
176 GeometryChanges sqlQueryGeometryChanges(
sqlite3 *db,
const QString &sql );
180 void committedAttributesAdded(
const QString &qgisLayerId,
const QList<QgsField> &addedAttributes );
181 void committedFeaturesAdded(
const QString &qgisLayerId,
const QgsFeatureList &addedFeatures );
182 void committedFeaturesRemoved(
const QString &qgisLayerId,
const QgsFeatureIds &deletedFeatureIds );
183 void committedAttributeValuesChanges(
const QString &qgisLayerId,
const QgsChangedAttributesMap &changedAttrsMap );
184 void committedGeometriesChanges(
const QString &qgisLayerId,
const QgsGeometryMap &changedGeometries );
185 void startListenFeatureChanges();
186 void stopListenFeatureChanges();