Kstars
kstarsdata.cpp
54 i18n("Critical File Not Found: %1", fname)); // FIXME: Must list locations depending on file type
79 // i18n( "Non-Critical File Not Found: %1", fname )); // FIXME: Must list locations depending on file type
109 m_preUpdateID(0), m_updateID(0), m_preUpdateNumID(0), m_updateNumID(0), m_preUpdateNum(J2000), m_updateNum(J2000)
144 QString dbfile = QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("mycitydb.sqlite");
146 /// This code to add Height column to table city in mycitydb.sqlite is a transitional measure to support a meaningful
285 if (std::abs(ut().djd() - LastSkyUpdate.djd()) > 0.1 / Options::zoomFactor() || clock()->isManualMode())
289 //omit KSNumbers arg == just update Alt/Az coords // <-- Eh? -- asimha. Looks like this behavior / ideology has changed drastically.
364 GeoLocation *KStarsData::locationNamed(const QString &city, const QString &province, const QString &country)
368 if (loc->translatedName() == city && (province.isEmpty() || loc->translatedProvince() == province) &&
398 setLocation(GeoLocation(dms(Options::longitude()), dms(Options::latitude()), Options::cityName(),
443 qCCritical(KSTARS) << "Unable to open city database file " << dbfile << citydb.lastError().text();
471 geoList.append(new GeoLocation(lng, lat, name, province, country, TZ, TZrule, elevation, true, 4));
477 dbfile = QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("mycitydb.sqlite");
503 geoList.append(new GeoLocation(lng, lat, name, province, country, TZ, TZrule, elevation, false, 4));
562 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(urlfile));
587 //Global file has newer timestamp than local. Add lines in global file that don't already exist in local file.
588 //be smart about this; in some cases the URL is updated but the image is probably the same if its
659 localeFile.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(urlfile));
676 qDebug() << Q_FUNC_INFO << "Failed to copy default URL file to locale folder, modifying default object links is "
725 // if (name == "Mercury" || name == "Venus" || name == "Mars" || name == "Jupiter" || name == "Saturn" ||
796 "The file may get truncated if KStars writes to the file later. Press Cancel to instead abort now and manually fix the problem. ",
1381 // if ( fn[1] == "MagLimitDrawStar" && dOk ) { Options::setMagLimitDrawStar( dVal ); cmdCount++; }
1387 // if ( fn[1] == "MagLimitDrawStarZoomOut" && dOk ) { Options::setMagLimitDrawStarZoomOut( dVal ); cmdCount++; }
Overwrite
void append(const T &value)
T & first()
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition: kstarsdatetime.h:35
QString readAll()
@ Name
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
QFuture< T > run(Function function,...)
void setLocation(const GeoLocation &l)
Set the GeoLocation according to the argument.
Definition: kstarsdata.cpp:403
QString number(int n, int base)
ReadOnly
void updateTime(GeoLocation *geo, const bool automaticDSTchange=true)
Update the Simulation Clock.
Definition: kstarsdata.cpp:234
CaseInsensitive
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)
void setLocationFromOptions()
Set the GeoLocation according to the values stored in the configuration file.
Definition: kstarsdata.cpp:396
std::pair< bool, QString > editUserData(const QString &name, const unsigned int index, const SkyObjectUserdata::LinkData &data)
Replace data in the user data at index for the object with name, both in memory and on disk.
Definition: kstarsdata.cpp:1646
int removeAll(const T &value)
Type type(const QSqlDatabase &db)
virtual bool open(QIODevice::OpenMode mode) override
bool open()
Type
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
void setTimeDirection(float scale)
Sets the direction of time and stores it in bool TimeRunForwards.
Definition: kstarsdata.cpp:359
KI18NLOCALEDATA_EXPORT KCountry country(const char *ianaId)
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
QString trimmed() const const
void clear()
void setAutoRemove(bool b)
Backends for exporting a sky image, either raster or vector, with a legend.
Definition: imageexporter.h:23
Definition: kstarsdata.h:70
QSet< T > fromList(const QList< T > &list)
std::pair< bool, QString > deleteUserData(const QString &name, const unsigned int index, SkyObjectUserdata::Type type)
Remove data of type from the user data at index for the object with name, both in memory and on disk.
Definition: kstarsdata.cpp:1668
QString toString() const
void setFullTimeUpdate()
The Sky is updated more frequently than the moon, which is updated more frequently than the planets.
Definition: kstarsdata.cpp:313
const SkyObjectUserdata::Data & getUserData(const QString &name)
Get a reference to the user data of an object with the name name.
Definition: kstarsdata.cpp:1755
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
void replace(int i, const T &value)
bool exists() const const
void progressText(const QString &text)
Signal that specifies the text that should be drawn in the KStarsSplash window.
Stores Users' Logs, Pictures and Websites regarding an object in the sky.
Definition: skyobjectuserdata.h:45
KIOCORE_EXPORT FileCopyJob * file_copy(const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
virtual QString fileName() const const override
Definition: timezonerule.h:47
void removeAt(int i)
virtual QString fileName() const const override
bool load(const QString &filename)
Load a color scheme from a *.colors file filename the filename of the color scheme to be loaded.
Definition: colorscheme.cpp:127
void updateMoons(KSNumbers *num) override
Delegate moon position updates to the SolarSystemComposite.
Definition: skymapcomposite.cpp:230
QString languageToString(QLocale::Language language)
int size() const const
QSqlRecord record(const QString &tablename) const const
QStringList standardLocations(QStandardPaths::StandardLocation type)
QSqlDatabase addDatabase(const QString &type, const QString &connectionName)
QString toString(QUrl::FormattingOptions options) const const
SkyObject * findByName(const QString &name, bool exact=true) override
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument.
Definition: skymapcomposite.cpp:552
void changeDateTime(const KStarsDateTime &newDate)
Change the current simulation date/time to the KStarsDateTime argument.
Definition: kstarsdata.cpp:327
QString i18n(const char *text, const TYPE &arg...)
bool atEnd() const const
void setDatabaseName(const QString &name)
SkipEmptyParts
bool isEmpty() const const
QUrl fromLocalFile(const QString &localFile)
int length() const const
QString readLine(qint64 maxlen)
Definition: skymapcomposite.h:62
void setFileName(const QString &name)
void updateSolarSystemBodies(KSNumbers *num) override
Delegate planet position updates to the SolarSystemComposite.
Definition: skymapcomposite.cpp:225
KLocalizedString KI18N_EXPORT ki18n(const char *text)
void update(KSNumbers *num=nullptr) override
Delegate update-position requests to all sub components.
Definition: skymapcomposite.cpp:183
std::pair< bool, QString > updateUserLog(const QString &name, const QString &newLog)
Update the user log of the object with the name to contain newLog (find and replace).
Definition: kstarsdata.cpp:1691
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
virtual bool setFromString(const QString &s, bool isDeg=true)
Attempt to parse the string argument as a dms value, and set the dms object accordingly.
Definition: dms.cpp:48
QString join(const QString &separator) const const
virtual void close() override
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
std::pair< bool, QString > addToUserData(const QString &name, const SkyObjectUserdata::LinkData &data)
Adds a link data to the user data for the object with name, both in memory and on disk.
Definition: kstarsdata.cpp:1531
int indexOf(QStringView str, int from) const const
QString & replace(int position, int n, QChar after)
QString & remove(int position, int n)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
void setSnapNextFocus(bool b=true)
Disable or re-enable the slewing animation for the next Focus change.
Definition: kstarsdata.h:282
QString toLower() const const
QString text() const const
DataLocation
void close()
QList< Key > keys() const const
QString toString() const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
Q_SCRIPTABLE Q_NOREPLY void setUTC(const KStarsDateTime &newtime)
DBUS function to set the time of the SimClock.
Definition: simclock.cpp:143
QString left(int n) const const
Canvas widget for displaying the sky bitmap; also handles user interaction events.
Definition: skymap.h:52
QString name(StandardShortcut id)
QString filePath(const QString &fileName) const const
English
bool isTimeRunningForward() const
Returns true if time is running forward else false.
Definition: kstarsdata.h:118
const QChar at(int position) const const
void clear()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QSet::iterator insert(const T &value)
QList::iterator begin()
HideProgressInfo
bool contains(const QString &name) const const
void syncFOV()
Synchronize list of visible FOVs and list of selected FOVs in Options.
Definition: kstarsdata.cpp:1487
void reset_with_ltime(KStarsDateTime <ime, const double TZoffset, const bool time_runs_forward, const bool automaticDSTchange=false)
Recalculate next dst change and if DST is active by a given local time with timezone offset and time ...
Definition: timezonerule.cpp:432
void setNextDSTChange(const KStarsDateTime &dt)
Set the NextDSTChange member.
Definition: kstarsdata.h:109
bool open()
QList::iterator end()
QSet< T > & intersect(const QSet< T > &other)
QSqlError lastError() const const
QString mid(int position, int n) const const
GeoLocation * nearestLocation(double longitude, double latitude)
nearestLocation Return nearest location to the given longitude and latitude coordinates
Definition: kstarsdata.cpp:377
QStringList tables(QSql::TableType type) const const
QStringRef mid(int position, int n) const const
QString & append(QChar ch)
virtual bool reset()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:57:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:57:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.