Kstars
locationdialog.cpp
55 QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
94 connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
95 connect(source, SIGNAL(error(QGeoPositionInfoSource::Error)), this, SLOT(positionUpdateError(QGeoPositionInfoSource::Error)));
113 connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(processLocationNameData(QNetworkReply*)));
142 //Sort the list of Cities alphabetically...note that filteredCityList may now have a different ordering!
146 i18np("One city matches search criteria", "%1 cities match search criteria", ld->GeoBox->count()));
206 i18np("One city matches search criteria", "%1 cities match search criteria", ld->GeoBox->count()));
295 if (KMessageBox::warningContinueCancel(nullptr, message, i18n("Remove City?")) == KMessageBox::Cancel)
339 if ( KMessageBox::questionYesNo( 0, message, i18n( "Override Existing Data?" ), KGuiItem(i18n("Override Data")), KGuiItem(i18n("Do Not Override"))) == KMessageBox::No )
344 QString dbfile = QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("mycitydb.sqlite");
388 add_query.prepare("INSERT INTO city(Name, Province, Country, Latitude, Longitude, TZ, TZRule, Elevation) "
405 g = new GeoLocation(lng, lat, name, province, country, TZ, &KStarsData::Instance()->Rulebook[TZrule], Elevation);
415 update_query.prepare("UPDATE city SET Name = :newName, Province = :newProvince, Country = :newCountry, "
416 "Latitude = :Latitude, Longitude = :Longitude, TZ = :TZ, TZRule = :TZRule, Elevation = :Elevation WHERE "
451 delete_query.prepare("DELETE FROM city WHERE Name = :Name AND Province = :Province AND Country = :Country");
512 i18np("One city matches search criteria", "%1 cities match search criteria", ld->GeoBox->count()));
551 // JM 2017-09-16: No, let's not assume it is 0. User have to explicitly set TZ so avoid mistakes.
614 ld->UpdateButton->setEnabled(SelectedCity->isReadOnly() == false && !ld->NewCityName->text().isEmpty() &&
672 connect(nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(processLocationNameData(QNetworkReply*)));
694 val.toArray()[0].toObject()["address_components"].toArray()[2].toObject()["long_name"].toString();
696 val.toArray()[0].toObject()["address_components"].toArray()[3].toObject()["long_name"].toString();
698 val.toArray()[0].toObject()["address_components"].toArray()[4].toObject()["long_name"].toString();
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
void setProvince(const QString &n)
Set Province name according to argument.
Definition geolocation.h:237
void setCountry(const QString &n)
Set Country name according to argument.
Definition geolocation.h:245
const QMap< QString, TimeZoneRule > & getRulebook() const
Return map for daylight saving rules.
Definition kstarsdata.h:264
void enqueueFilterCity()
Filter by city / province / country only after a few milliseconds.
Definition locationdialog.cpp:160
bool updateCity()
When the "Update City" QPushButton is clicked, update the city information in the user's custom city ...
Definition locationdialog.cpp:274
void filterCity()
When text is entered in the City/Province/Country Filter KLineEdits, the List of cities is trimmed to...
Definition locationdialog.cpp:173
void findCitiesNear(int longitude, int latitude)
Show only cities within 3 degrees of point specified by arguments.
Definition locationdialog.cpp:492
bool addCity()
When the "Add new city" QPushButton is clicked, add the manually-entered city information to the user...
Definition locationdialog.cpp:269
bool removeCity()
When the "Remove City" QPushButton is clicked, remove the city information from the user's custom cit...
Definition locationdialog.cpp:282
void changeCity()
When the selected city in the QListBox changes, repaint the MapCanvas so that the crosshairs icon app...
Definition locationdialog.cpp:214
This class provides the information needed to determine whether Daylight Savings Time (DST; a....
Definition timezonerule.h:48
const QString toDMSString(const bool forceSign=false, const bool machineReadable=false, const bool highPrecision=false) const
Definition dms.cpp:287
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
std::optional< QSqlQuery > query(const QString &queryStatement)
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &title=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Cancel
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KI18NLOCALEDATA_EXPORT KCountry country(const char *ianaId)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QDialog(QWidget *parent, Qt::WindowFlags f)
virtual void accept()
void accepted()
void finished(int result)
virtual void reject()
void rejected()
QString filePath(const QString &fileName) const const
bool exists() const const
SatellitePositioningMethods
QGeoPositionInfoSource * createDefaultSource(QObject *parent)
QByteArray readAll()
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
bool isObject() const const
QJsonObject object() const const
bool contains(QLatin1StringView key) const const
QJsonArray toArray() const const
void append(QList< T > &&value)
bool isEmpty() const const
bool removeOne(const AT &t)
value_type takeFirst()
QList< Key > keys() const const
T value(const Key &key, const T &defaultValue) const const
NetworkError error() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
void appendPlainText(const QString &text)
void ensureCursorVisible()
void moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode)
void setReadOnly(bool ro)
void close()
bool commit()
QSqlDatabase database(const QString &connectionName, bool open)
QSqlError lastError() const const
bool open()
void setDatabaseName(const QString &name)
void bindValue(const QString &placeholder, const QVariant &val, QSql::ParamType paramType)
bool exec()
QSqlError lastError() const const
bool prepare(const QString &query)
AppLocalDataLocation
bool isEmpty() const const
QString number(double n, char format, int precision)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
double toDouble(bool *ok) const const
CaseInsensitive
Tool
Start
void setEnabled(bool)
height
void repaint()
void setFocus()
void setLayout(QLayout *layout)
void show()
void resize(const QSize &)
void setWindowFlags(Qt::WindowFlags type)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 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 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.