70 bool convertToOfflineProject(
const QString &offlineDataPath,
const QString &offlineDbFile,
const QStringList &layerIds,
bool onlySelected =
false, ContainerType containerType = SpatiaLite,
const QString &layerNameSuffix = QStringLiteral(
" (offline)" ) );
73 bool isOfflineProject()
const;
80 void synchronize(
bool useTransaction =
false );
119 void warning(
const QString &title,
const QString &message );
122 void initializeSpatialMetadata(
sqlite3 *sqlite_handle );
123 bool createOfflineDb(
const QString &offlineDbPath,
ContainerType containerType = SpatiaLite );
124 void createLoggingTables(
sqlite3 *db );
126 void convertToOfflineLayer(
QgsVectorLayer *layer,
sqlite3 *db,
const QString &offlineDbPath,
bool onlySelected,
ContainerType containerType = SpatiaLite,
const QString &layerNameSuffix = QStringLiteral(
" (offline)" ) );
142 void showWarning(
const QString &message );
145 int getOrCreateLayerId(
sqlite3 *db,
const QString &qgisLayerId );
146 int getCommitNo(
sqlite3 *db );
147 void increaseCommitNo(
sqlite3 *db );
153 int sqlExec(
sqlite3 *db,
const QString &sql );
154 int sqlQueryInt(
sqlite3 *db,
const QString &sql,
int defaultValue );
155 QString sqlQueryStr(
sqlite3 *db,
const QString &sql, QString &defaultValue );
156 QList<int> sqlQueryInts(
sqlite3 *db,
const QString &sql );
157 QString sqlEscape( QString value )
const;
159 QList<QgsField> sqlQueryAttributesAdded(
sqlite3 *db,
const QString &sql );
162 struct AttributeValueChange
168 typedef QList<AttributeValueChange> AttributeValueChanges;
169 AttributeValueChanges sqlQueryAttributeValueChanges(
sqlite3 *db,
const QString &sql );
171 struct GeometryChange
176 typedef QList<GeometryChange> GeometryChanges;
177 GeometryChanges sqlQueryGeometryChanges(
sqlite3 *db,
const QString &sql );
181 void committedAttributesAdded(
const QString &qgisLayerId,
const QList<QgsField> &addedAttributes );
182 void committedFeaturesAdded(
const QString &qgisLayerId,
const QgsFeatureList &addedFeatures );
183 void committedFeaturesRemoved(
const QString &qgisLayerId,
const QgsFeatureIds &deletedFeatureIds );
184 void committedAttributeValuesChanges(
const QString &qgisLayerId,
const QgsChangedAttributesMap &changedAttrsMap );
185 void committedGeometriesChanges(
const QString &qgisLayerId,
const QgsGeometryMap &changedGeometries );
186 void startListenFeatureChanges();
187 void stopListenFeatureChanges();