MauiKit Image Tools
modules/geolocation/citiesdb.cpp
21 QFile file(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "/org/mauikit/imagetools/cities.db"));
24 if(QFile::copy(":/android_rcc_bundle/qml/org/mauikit/imagetools/cities.db", QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)+"/cities.db"))
35 return QStandardPaths::locate(QStandardPaths::GenericDataLocation, "/org/mauikit/imagetools/cities.db");
64 qWarning() << "Cities::DatabaseConnect - ERROR: no driver " << QStringLiteral("QSQLITE") << " available";
88 return new City(query.value("id").toString(), query.value("name").toString(), query.value("tz").toString(), query.value("country").toString(),query.value("lat").toDouble(),query.value("lon").toDouble());
104 query.prepare("SELECT c.id, c.name, co.name as country, c.lat, c.lon, c.tz FROM CITIES c inner join COUNTRIES co on c.country = co.id where c.id = ?");
114 return new City(query.value("id").toString(), query.value("name").toString(), query.value("tz").toString(), query.value("country").toString(),query.value("lat").toDouble(),query.value("lon").toDouble(), this);
A class for representing the GPS coordinates and information of a city.
Definition geolocation/city.h:13
std::optional< QSqlQuery > query(const QString &queryStatement)
char * toString(const EngineQuery &query)
bool copy(const QString &fileName, const QString &newName)
QSqlDatabase addDatabase(QSqlDriver *driver, const QString &connectionName)
QString connectionName() const const
bool isDriverAvailable(const QString &name)
QSqlError lastError() const const
bool open()
void setDatabaseName(const QString &name)
QString text() const const
GenericDataLocation
QString locate(StandardLocation type, const QString &fileName, LocateOptions options)
QString writableLocation(StandardLocation type)
QUuid createUuid()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.