11#include "auxiliary/kspaths.h"
12#include "skycomponents/supernovaecomponent.h"
13#include "skycomponents/skymapcomposite.h"
14#include "ksnotification.h"
15#include "skyobjectuserdata.h"
16#include <kio/job_base.h>
17#include <kio/filecopyjob.h>
20#include "imageexporter.h"
22#include "observinglist.h"
24#include "dialogs/detaildialog.h"
25#include "oal/execute.h"
34#include <QtConcurrent>
36#include "kstars_debug.h"
39#include <qtskipemptyparts.h>
48 KSNotification::sorry(
i18n(
"The file %1 could not be found. "
49 "KStars cannot run properly without this file. "
50 "KStars searches for this file in following locations:\n\n\t"
52 "It appears that your setup is broken.",
54 i18n(
"Critical File Not Found: %1",
fname));
106 : m_Geo(
dms(0),
dms(0)), m_ksuserdb(),
107 temporaryTrail(
false),
109 m_preUpdateID(0), m_updateID(0), m_preUpdateNumID(0), m_updateNumID(0), m_preUpdateNum(J2000), m_updateNum(J2000)
112 m_LogObject.reset(
new OAL::Log);
135 if (!readTimeZoneRulebook())
142 i18n(
"Upgrade existing user city db to support geographic elevation."));
164 "alter table city add column Elevation real default -10;") ==
168 "table in mycitydb.sqlite: &1")
169 .arg(query.lastError().text()));
208 SkyObjectUserdata::Type::image);
216 SkyObjectUserdata::Type::website);
237 LTime =
geo->UTtoLT(
ut());
248 if (
ut() > NextDSTChange)
255 if (
ut() < NextDSTChange)
262 if (std::abs(
ut().djd() - LastNumUpdate.
djd()) > 1.0)
270 if (std::abs(
ut().djd() - LastPlanetUpdate.
djd()) > 0.01)
277 if (std::abs(
ut().djd() - LastMoonUpdate.
djd()) > 0.00069444)
279 LastMoonUpdate =
ut();
285 if (std::abs(
ut().djd() - LastSkyUpdate.
djd()) > 0.1 / Options::zoomFactor() ||
clock()->isManualMode())
287 LastSkyUpdate =
ut();
296void KStarsData::syncUpdateIDs()
298 m_updateID = m_preUpdateID;
299 if (m_updateNumID == m_preUpdateNumID)
301 m_updateNumID = m_preUpdateNumID;
305unsigned int KStarsData::incUpdateID()
324 LST =
geo()->GSTtoLST(
ut().gst());
334 LTime =
geo()->UTtoLT(
ut());
356 LTime =
geo->UTtoLT(
ut());
361 TimeRunsForward = scale >= 0;
368 if (
loc->translatedName() == city && (province.
isEmpty() ||
loc->translatedProvince() == province) &&
369 (country.isEmpty() ||
loc->translatedCountry() == country))
380 double distance = 1e6;
382 dms lng(longitude), lat(latitude);
399 Options::provinceName(), Options::countryName(), Options::timeZone(),
400 &(Rulebook[Options::dST()]), Options::elevation(),
false, 4));
406 if (m_Geo.
lat()->Degrees() >= 90.0)
408 if (m_Geo.
lat()->Degrees() <= -90.0)
412 Options::setCityName(m_Geo.
name());
413 Options::setProvinceName(m_Geo.
province());
414 Options::setCountryName(m_Geo.
country());
415 Options::setTimeZone(m_Geo.
TZ0());
416 Options::setElevation(m_Geo.
elevation());
417 Options::setLongitude(m_Geo.
lng()->Degrees());
418 Options::setLatitude(m_Geo.
lat()->Degrees());
423 Options::setDST(key);
431 if ((name ==
"star") || (name ==
"nothing") || name.
isEmpty())
436bool KStarsData::readCityData()
441 if (
citydb.open() ==
false)
443 qCCritical(
KSTARS) <<
"Unable to open city database file " <<
dbfile <<
citydb.lastError().text();
450 if (!
get_query.exec(
"SELECT * FROM city"))
466 double TZ =
get_query.value(6).toDouble();
468 double elevation =
get_query.value(8).toDouble();
471 geoList.
append(
new GeoLocation(lng, lat, name, province, country, TZ, TZrule, elevation,
true, 4));
486 if (!
get_query.exec(
"SELECT * FROM city"))
498 double TZ =
get_query.value(6).toDouble();
500 double elevation =
get_query.value(8).toDouble();
503 geoList.
append(
new GeoLocation(lng, lat, name, province, country, TZ, TZrule, elevation,
false, 4));
512bool KStarsData::readTimeZoneRulebook()
516 if (KSUtils::openDataFile(file,
"TZrules.dat"))
520 while (!stream.atEnd())
528 fields[3].
midRef(fields[3].indexOf(
':') + 1, fields[3].length()).toInt());
530 fields[6].
midRef(fields[6].indexOf(
':') + 1, fields[6].length()).toInt());
578 for (
int i = 0; i <
flist.size(); i++)
641 for (
int i = 0; i <
urlData.size(); i++)
654 if (KSUtils::openDataFile(file,
urlfile))
668 writeStream << line <<
'\n';
676 qDebug() <<
Q_FUNC_INFO <<
"Failed to copy default URL file to locale folder, modifying default object links is "
686bool KStarsData::readURLData(
const QString &
urlfile, SkyObjectUserdata::Type type)
694 if (!openUrlFile(
urlfile, file))
700 while (!stream.atEnd())
702 QString line = stream.readLine();
760bool KStarsData::readUserLog()
765 if (!KSUtils::openDataFile(file,
"userlog.dat"))
778 while (!buffer.isEmpty())
780 int startIndex, endIndex;
787 endIndex = buffer.indexOf(
logEnd, startIndex);
793 i18n(
"The user notes log file %1 is malformatted in the opening of the entry starting at %2. "
794 "KStars can still run without fully reading this file. "
795 "Press Continue to run KStars with whatever partial reading was successful. "
796 "The file may get truncated if KStars writes to the file later. Press Cancel to instead abort now and manually fix the problem. ",
834 buffer = buffer.mid(endIndex +
logEnd.size() + 1);
845bool KStarsData::readADVTreeData()
851 if (!KSUtils::openDataFile(file,
"advinterface.dat"))
857 while (!stream.atEnd())
859 int Type, interfaceIndex;
861 Line = stream.readLine();
872 Interface = Line.
mid(13);
888 Link.remove(interfaceIndex, 11);
895 ADVTreeData *
ADVData =
new ADVTreeData;
955 qWarning() <<
"Could not parse line: " << line;
964 if (
fn[0] ==
"lookTowards" &&
fn.size() >= 2)
968 if (arg ==
"n" || arg ==
"north")
970 if (arg ==
"ne" || arg ==
"northeast")
972 if (arg ==
"e" || arg ==
"east")
974 if (arg ==
"se" || arg ==
"southeast")
976 if (arg ==
"s" || arg ==
"south")
978 if (arg ==
"sw" || arg ==
"southwest")
980 if (arg ==
"w" || arg ==
"west")
982 if (arg ==
"nw" || arg ==
"northwest")
987 map->setFocusAltAz(
dms(90.0), map->focus()->az());
988 map->focus()->HorizontalToEquatorial(&LST,
geo()->lat());
989 map->setDestination(*map->focus());
993 if (arg ==
"z" || arg ==
"zenith")
996 map->setFocusAltAz(
dms(90.0), map->focus()->az());
997 map->focus()->HorizontalToEquatorial(&LST,
geo()->lat());
998 map->setDestination(*map->focus());
1004 fn.removeAll(
fn.first());
1009 map->setFocus(target);
1010 map->focus()->EquatorialToHorizontal(&LST,
geo()->lat());
1011 map->setDestination(*map->focus());
1015 else if (
fn[0] ==
"setRaDec" &&
fn.size() == 3)
1020 ok = r.setFromString(
fn[1],
false);
1022 ok = d.setFromString(
fn[2],
true);
1025 map->setFocus(r, d);
1026 map->focus()->EquatorialToHorizontal(&LST,
geo()->lat());
1030 else if (
fn[0] ==
"setAltAz" &&
fn.size() == 3)
1033 dms az(0.0), alt(0.0);
1037 ok = az.setFromString(
fn[2]);
1040 map->setFocusAltAz(alt, az);
1041 map->focus()->HorizontalToEquatorial(&LST,
geo()->lat());
1045 else if (
fn[0] ==
"loadColorScheme")
1047 fn.removeAll(
fn.first());
1055 if (
csName ==
i18nc(
"use default color scheme",
"Default Colors"))
1056 filename =
"classic.colors";
1057 if (
csName ==
i18nc(
"use 'star chart' color scheme",
"Star Chart"))
1058 filename =
"chart.colors";
1059 if (
csName ==
i18nc(
"use 'night vision' color scheme",
"Night Vision"))
1060 filename =
"night.colors";
1072 for (
int i = 0; i < filename.
length(); ++i)
1073 if (filename.
at(i) ==
' ')
1076 filename = filename.
append(
".colors");
1085 else if (
fn[0] ==
"zoom" &&
fn.size() == 2)
1088 double z =
fn[1].toDouble(&ok);
1095 Options::setZoomFactor(z);
1099 else if (
fn[0] ==
"zoomIn")
1101 if (Options::zoomFactor() < MAXZOOM)
1103 Options::setZoomFactor(Options::zoomFactor() * DZOOM);
1107 else if (
fn[0] ==
"zoomOut")
1109 if (Options::zoomFactor() > MINZOOM)
1111 Options::setZoomFactor(Options::zoomFactor() / DZOOM);
1115 else if (
fn[0] ==
"defaultZoom")
1117 Options::setZoomFactor(DEFAULTZOOM);
1120 else if (
fn[0] ==
"setLocalTime" &&
fn.size() == 7)
1143 qWarning() <<
ki18n(
"Could not set time: %1 / %2 / %3 ; %4:%5:%6")
1153 else if (
fn[0] ==
"changeViewOption" &&
fn.size() == 3)
1155 bool bOk(
false),
dOk(
false);
1159 if (
fn[2].toLower() ==
"true")
1164 if (
fn[2].toLower() ==
"false")
1189 if (
fn[1] ==
"ShowStars" &&
bOk)
1191 Options::setShowStars(
bVal);
1194 if (
fn[1] ==
"ShowCLines" &&
bOk)
1196 Options::setShowCLines(
bVal);
1199 if (
fn[1] ==
"ShowCNames" &&
bOk)
1201 Options::setShowCNames(
bVal);
1204 if (
fn[1] ==
"ShowMilkyWay" &&
bOk)
1206 Options::setShowMilkyWay(
bVal);
1209 if (
fn[1] ==
"ShowEquatorialGrid" &&
bOk)
1211 Options::setShowEquatorialGrid(
bVal);
1214 if (
fn[1] ==
"ShowHorizontalGrid" &&
bOk)
1216 Options::setShowHorizontalGrid(
bVal);
1219 if (
fn[1] ==
"ShowEquator" &&
bOk)
1221 Options::setShowEquator(
bVal);
1224 if (
fn[1] ==
"ShowEcliptic" &&
bOk)
1226 Options::setShowEcliptic(
bVal);
1229 if (
fn[1] ==
"ShowHorizon" &&
bOk)
1231 Options::setShowHorizon(
bVal);
1234 if (
fn[1] ==
"ShowGround" &&
bOk)
1236 Options::setShowGround(
bVal);
1239 if (
fn[1] ==
"ShowSun" &&
bOk)
1241 Options::setShowSun(
bVal);
1244 if (
fn[1] ==
"ShowMoon" &&
bOk)
1246 Options::setShowMoon(
bVal);
1249 if (
fn[1] ==
"ShowMercury" &&
bOk)
1251 Options::setShowMercury(
bVal);
1254 if (
fn[1] ==
"ShowVenus" &&
bOk)
1256 Options::setShowVenus(
bVal);
1259 if (
fn[1] ==
"ShowMars" &&
bOk)
1261 Options::setShowMars(
bVal);
1264 if (
fn[1] ==
"ShowJupiter" &&
bOk)
1266 Options::setShowJupiter(
bVal);
1269 if (
fn[1] ==
"ShowSaturn" &&
bOk)
1271 Options::setShowSaturn(
bVal);
1274 if (
fn[1] ==
"ShowUranus" &&
bOk)
1276 Options::setShowUranus(
bVal);
1279 if (
fn[1] ==
"ShowNeptune" &&
bOk)
1281 Options::setShowNeptune(
bVal);
1285 if (
fn[1] ==
"ShowAsteroids" &&
bOk)
1287 Options::setShowAsteroids(
bVal);
1290 if (
fn[1] ==
"ShowComets" &&
bOk)
1292 Options::setShowComets(
bVal);
1295 if (
fn[1] ==
"ShowSolarSystem" &&
bOk)
1297 Options::setShowSolarSystem(
bVal);
1300 if (
fn[1] ==
"ShowDeepSky" &&
bOk)
1302 Options::setShowDeepSky(
bVal);
1305 if (
fn[1] ==
"ShowSupernovae" &&
bOk)
1307 Options::setShowSupernovae(
bVal);
1310 if (
fn[1] ==
"ShowStarNames" &&
bOk)
1312 Options::setShowStarNames(
bVal);
1315 if (
fn[1] ==
"ShowStarMagnitudes" &&
bOk)
1317 Options::setShowStarMagnitudes(
bVal);
1320 if (
fn[1] ==
"ShowAsteroidNames" &&
bOk)
1322 Options::setShowAsteroidNames(
bVal);
1325 if (
fn[1] ==
"ShowCometNames" &&
bOk)
1327 Options::setShowCometNames(
bVal);
1330 if (
fn[1] ==
"ShowPlanetNames" &&
bOk)
1332 Options::setShowPlanetNames(
bVal);
1335 if (
fn[1] ==
"ShowPlanetImages" &&
bOk)
1337 Options::setShowPlanetImages(
bVal);
1341 if (
fn[1] ==
"UseAltAz" &&
bOk)
1343 Options::setUseAltAz(
bVal);
1346 if (
fn[1] ==
"UseRefraction" &&
bOk)
1348 Options::setUseRefraction(
bVal);
1351 if (
fn[1] ==
"UseAutoLabel" &&
bOk)
1353 Options::setUseAutoLabel(
bVal);
1356 if (
fn[1] ==
"UseAutoTrail" &&
bOk)
1358 Options::setUseAutoTrail(
bVal);
1361 if (
fn[1] ==
"UseAnimatedSlewing" &&
bOk)
1363 Options::setUseAnimatedSlewing(
bVal);
1366 if (
fn[1] ==
"FadePlanetTrails" &&
bOk)
1368 Options::setFadePlanetTrails(
bVal);
1371 if (
fn[1] ==
"SlewTimeScale" &&
dOk)
1373 Options::setSlewTimeScale(
dVal);
1376 if (
fn[1] ==
"ZoomFactor" &&
dOk)
1378 Options::setZoomFactor(
dVal);
1382 if (
fn[1] ==
"StarDensity" &&
dOk)
1384 Options::setStarDensity(
dVal);
1388 if (
fn[1] ==
"MagLimitDrawDeepSky" &&
dOk)
1390 Options::setMagLimitDrawDeepSky(
dVal);
1393 if (
fn[1] ==
"MagLimitDrawDeepSkyZoomOut" &&
dOk)
1395 Options::setMagLimitDrawDeepSkyZoomOut(
dVal);
1398 if (
fn[1] ==
"StarLabelDensity" &&
dOk)
1400 Options::setStarLabelDensity(
dVal);
1403 if (
fn[1] ==
"MagLimitHideStar" &&
dOk)
1405 Options::setMagLimitHideStar(
dVal);
1408 if (
fn[1] ==
"MagLimitAsteroid" &&
dOk)
1410 Options::setMagLimitAsteroid(
dVal);
1413 if (
fn[1] ==
"AsteroidLabelDensity" &&
dOk)
1415 Options::setAsteroidLabelDensity(
dVal);
1418 if (
fn[1] ==
"MaxRadCometName" &&
dOk)
1420 Options::setMaxRadCometName(
dVal);
1425 if (
fn[1] ==
"UseLatinConstellationNames" &&
bOk)
1427 Options::setUseLatinConstellNames(
true);
1428 Options::setUseLocalConstellNames(
false);
1429 Options::setUseAbbrevConstellNames(
false);
1432 if (
fn[1] ==
"UseLocalConstellationNames" &&
bOk)
1434 Options::setUseLatinConstellNames(
false);
1435 Options::setUseLocalConstellNames(
true);
1436 Options::setUseAbbrevConstellNames(
false);
1439 if (
fn[1] ==
"UseAbbrevConstellationNames" &&
bOk)
1441 Options::setUseLatinConstellNames(
false);
1442 Options::setUseLocalConstellNames(
false);
1443 Options::setUseAbbrevConstellNames(
true);
1447 else if (
fn[0] ==
"setGeoLocation" && (
fn.size() == 3 ||
fn.size() == 4))
1460 if (
loc->translatedName() == city &&
1461 (province.
isEmpty() ||
loc->translatedProvince() == province) &&
1462 loc->translatedCountry() == country)
1472 qWarning() <<
i18n(
"Could not set location named %1, %2, %3", city, province, country);
1489 visibleFOVs.
clear();
1491 foreach (
FOV *fov, availFOVs)
1493 if (Options::fOVNames().contains(fov->name()))
1497 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
1504 foreach (
FOV *fov, visibleFOVs)
1506 all.insert(fov->name());
1508 Options::setFOVNames(
all.intersect(names).values());
1512Execute *KStarsData::executeSession()
1514 if (!m_Execute.get())
1515 m_Execute.reset(
new Execute());
1517 return m_Execute.get();
1523 if (!m_ImageExporter.get())
1526 return m_ImageExporter.get();
1530std::pair<bool, QString>
1535 findUserData(name).links[data.type].push_back(data);
1539 const auto isImage = data.type == SkyObjectUserdata::Type::image;
1552 i18n(
"Custom image-links file could not be opened.\nLink cannot "
1553 "be recorded for future sessions.") :
1554 i18n(
"Custom information-links file could not be opened.\nLink "
1555 "cannot be recorded for future sessions.") };
1558 entry = name +
':' + data.title +
':' + data.url.
toString();
1560 stream << entry <<
'\n';
1564 return {
true, {} };
1567std::pair<bool, QString> updateLocalDatabase(SkyObjectUserdata::Type type,
1580 return {
false,
"Invalid update request." };
1587 case SkyObjectUserdata::Type::website:
1595 case SkyObjectUserdata::Type::image:
1610 return {
false,
"Failed to open " +
URLFile.fileName() +
1611 "KStars cannot save to user database" };
1636 if (!found && replace)
1643 return {
true, {} };
1647 const unsigned int index,
1652 auto &entry = findUserData(name);
1653 if (index >= entry.links[data.type].size())
1654 return {
false,
i18n(
"Userdata at index %1 does not exist.", index) };
1656 entry.links[data.type][index] = data;
1669 const unsigned int index,
1670 SkyObjectUserdata::Type type)
1674 auto &
linkList = findUserData(name).links[type];
1676 return {
false,
i18n(
"Userdata at index %1 does not exist.", index) };
1688 return updateLocalDatabase(data.type,
search_line,
"");
1702 if (newLog == (
i18n(
"Record here observation logs and/or data on %1.", name)) ||
1704 return {
true, {} };
1707 QString KSLabel =
"[KSLABEL:" + name +
']';
1721 const auto &userLog = m_user_data[name].userLog;
1724 if (!userLog.isEmpty())
1726 int startIndex, endIndex;
1729 startIndex =
logs.indexOf(KSLabel);
1731 endIndex =
sub.indexOf(
"[KSLogEnd]");
1733 logs.remove(startIndex, endIndex + 11);
1737 logs.append(KSLabel +
'\n' + newLog.
trimmed() +
"\n[KSLogEnd]\n");
1742 return {
false,
"Cannot write to user log file" };
1751 findUserData(name).userLog = newLog;
1752 return {
true, {} };
1759 return findUserData(name);
1764 auto element = m_user_data.find(name);
1765 if (element != m_user_data.end())
1767 return element->second;
1772 const auto *
object = m_SkyComposite->findByName(name);
1773 if (
object !=
nullptr)
1775 return m_user_data[
object->name()];
1778 return m_user_data[
name];
bool load(const QString &filename)
Load a color scheme from a *.colors file filename the filename of the color scheme to be loaded.
Executes an observation session.
A simple class encapsulating a Field-of-View symbol.
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
const CachingDms * lat() const
const CachingDms * lng() const
void setLat(const dms &l)
Set latitude according to dms argument.
Backends for exporting a sky image, either raster or vector, with a legend.
KLocalizedString subs(const KLocalizedString &a, int fieldWidth=0, QChar fillChar=QLatin1Char(' ')) const
There are several time-dependent values used in position calculations, that are not specific to an ob...
bool Initialize()
Initialize KStarsDB while running splash screen.
KStarsData is the backbone of KStars.
void setNextDSTChange(const KStarsDateTime &dt)
Set the NextDSTChange member.
void setLocation(const GeoLocation &l)
Set the GeoLocation according to the argument.
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.
void changeDateTime(const KStarsDateTime &newDate)
Change the current simulation date/time to the KStarsDateTime argument.
~KStarsData() override
Destructor.
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.
void setFullTimeUpdate()
The Sky is updated more frequently than the moon, which is updated more frequently than the planets.
void updateTime(GeoLocation *geo, const bool automaticDSTchange=true)
Update the Simulation Clock.
bool initialize()
Initialize KStarsData while running splash screen.
SkyObject * objectNamed(const QString &name)
Find object by name.
GeoLocation * nearestLocation(double longitude, double latitude)
nearestLocation Return nearest location to the given longitude and latitude coordinates
void setTimeDirection(float scale)
Sets the direction of time and stores it in bool TimeRunForwards.
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).
ColorScheme * colorScheme()
const SkyObjectUserdata::Data & getUserData(const QString &name)
Get a reference to the user data of an object with the name name.
void skyUpdate(bool)
Should be used to refresh skymap.
void syncLST()
Sync the LST with the simulation clock.
const KStarsDateTime & ut() const
void syncFOV()
Synchronize list of visible FOVs and list of selected FOVs in Options.
bool executeScript(const QString &name, SkyMap *map)
Execute a script.
void progressText(const QString &text)
Signal that specifies the text that should be drawn in the KStarsSplash window.
bool isTimeRunningForward() const
Returns true if time is running forward else false.
Q_INVOKABLE SimClock * clock()
void geoChanged()
Emitted when geo location changed.
void setLocationFromOptions()
Set the GeoLocation according to the values stored in the configuration file.
SkyMapComposite * skyComposite()
void setSnapNextFocus(bool b=true)
Disable or re-enable the slewing animation for the next Focus change.
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.
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
static KStars * Instance()
static bool Closing
Set to true when the application is being closed.
Tool window for managing a custom list of objects.
Q_SCRIPTABLE Q_NOREPLY void setUTC(const KStarsDateTime &newtime)
DBUS function to set the time of the SimClock.
SkyMapComposite is the root object in the object hierarchy of the sky map.
SkyObject * findByName(const QString &name, bool exact=true) override
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument.
void updateSolarSystemBodies(KSNumbers *num) override
Delegate planet position updates to the SolarSystemComposite.
void update(KSNumbers *num=nullptr) override
Delegate update-position requests to all sub components.
void updateMoons(KSNumbers *num) override
Delegate moon position updates to the SolarSystemComposite.
This is the canvas on which the sky is painted.
Provides all necessary information about an object in the sky: its coordinates, name(s),...
This class provides the information needed to determine whether Daylight Savings Time (DST; a....
KStarsDateTime nextDSTChange() const
bool equals(TimeZoneRule *r)
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 ...
An angle, stored as degrees, but expressible in many ways.
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.
KLocalizedString KI18N_EXPORT ki18n(const char *text)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Type type(const QSqlDatabase &db)
KIOCORE_EXPORT FileCopyJob * file_copy(const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
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)
QString name(StandardShortcut id)
KI18NLOCALEDATA_EXPORT KCountry country(const char *ianaId)
QString filePath(const QString &fileName) const const
bool exists() const const
virtual QString fileName() const const override
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
void setFileName(const QString &name)
virtual void close() override
void append(QList< T > &&value)
QString languageToString(Language language)
QList< Key > keys() const const
QSqlDatabase addDatabase(QSqlDriver *driver, const QString &connectionName)
bool contains(const QString &name) const const
QStringList standardLocations(StandardLocation type)
QString & append(QChar ch)
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
QString number(double n, char format, int precision)
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString trimmed() const const
QFuture< T > run(Function function,...)
QUrl fromLocalFile(const QString &localFile)
QString toString(FormattingOptions options) const const
Stores Users' Logs, Pictures and Websites regarding an object in the sky.
Stores the tite and URL of a webpage.