KStarsData
#include <kstarsdata.h>
Signals | |
void | clearCache () |
void | geoChanged () |
void | progressText (const QString &text) |
void | skyUpdate (bool) |
Public Slots | |
std::pair< bool, QString > | addToUserData (const QString &name, const SkyObjectUserdata::LinkData &data) |
std::pair< bool, QString > | deleteUserData (const QString &name, const unsigned int index, SkyObjectUserdata::Type type) |
std::pair< bool, QString > | editUserData (const QString &name, const unsigned int index, const SkyObjectUserdata::LinkData &data) |
const SkyObjectUserdata::Data & | getUserData (const QString &name) |
void | setTimeDirection (float scale) |
void | slotConsoleMessage (QString s) |
void | updateTime (GeoLocation *geo, const bool automaticDSTchange=true) |
std::pair< bool, QString > | updateUserLog (const QString &name, const QString &newLog) |
Public Member Functions | |
~KStarsData () override | |
void | add_color_scheme (const QString &filename, const QString &name) |
void | addTransientFOV (std::shared_ptr< FOV > newFOV) |
QList< ADVTreeData * > | avdTree () |
void | changeDateTime (const KStarsDateTime &newDate) |
void | clearTransientFOVs () |
Q_INVOKABLE SimClock * | clock () |
const std::map< QString, QString > | color_schemes () |
ColorScheme * | colorScheme () |
Q_INVOKABLE QString | colorSchemeFileName () |
QString | colorSchemeFileName (const QString &name) |
Q_INVOKABLE QString | colorSchemeName () |
QString | colorSchemeName (const QString &fileName) |
bool | executeScript (const QString &name, SkyMap *map) |
Execute * | executeSession () |
GeoLocation * | geo () |
const QList< FOV * > | getAvailableFOVs () const |
QList< GeoLocation * > & | getGeoList () |
const QMap< QString, TimeZoneRule > & | getRulebook () const |
const QList< std::shared_ptr< FOV > > | getTransientFOVs () const |
const QList< FOV * > | getVisibleFOVs () const |
bool | hasColorScheme (const QString &scheme) |
ImageExporter * | imageExporter () |
unsigned int | incUpdateID () |
bool | initialize () |
bool | isTimeRunningForward () const |
GeoLocation * | locationNamed (const QString &city, const QString &province=QString(), const QString &country=QString()) |
OAL::Log * | logObject () |
CachingDms * | lst () |
const KStarsDateTime & | lt () const |
GeoLocation * | nearestLocation (double longitude, double latitude) |
SkyObject * | objectNamed (const QString &name) |
ObservingList * | observingList () const |
void | setFullTimeUpdate () |
void | setLocation (const GeoLocation &l) |
void | setLocationFromOptions () |
void | setNextDSTChange (const KStarsDateTime &dt) |
void | setSnapNextFocus (bool b=true) |
SkyMapComposite * | skyComposite () |
bool | snapNextFocus () const |
void | syncFOV () |
void | syncLST () |
void | syncUpdateIDs () |
unsigned int | updateID () const |
KSNumbers * | updateNum () |
unsigned int | updateNumID () const |
KSUserDB * | userdb () |
const KStarsDateTime & | ut () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qobject_cast (const QObject *object) |
T | qobject_cast (QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () const const |
Static Public Member Functions | |
static KStarsData * | Create () |
static KStarsData * | Instance () |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
KStarsData () | |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Detailed Description
KStarsData is the backbone of KStars.
It contains all the data used by KStars, including the SkyMapComposite that contains all items in the skymap (stars, deep-sky objects, planets, constellations, etc). Other kinds of data are stored here as well: the geographic locations, the timezone rules, etc.
- Version
- 1.0
Definition at line 73 of file kstarsdata.h.
Constructor & Destructor Documentation
◆ KStarsData()
|
protected |
Constructor.
Definition at line 108 of file kstarsdata.cpp.
◆ ~KStarsData()
|
override |
Member Function Documentation
◆ add_color_scheme()
Register a color scheme with filename
and name
.
Definition at line 207 of file kstarsdata.h.
◆ addToUserData
|
slot |
Adds a link data
to the user data for the object with name
, both in memory and on disk.
- Returns
- {success, error_message}
Definition at line 1547 of file kstarsdata.cpp.
◆ addTransientFOV()
|
inline |
addTransientFOV Adds a new FOV to the list.
- Parameters
-
newFOV pointer to FOV object.
Definition at line 325 of file kstarsdata.h.
◆ avdTree()
|
inline |
Return ADV Tree.
Definition at line 349 of file kstarsdata.h.
◆ changeDateTime()
void KStarsData::changeDateTime | ( | const KStarsDateTime & | newDate | ) |
Change the current simulation date/time to the KStarsDateTime argument.
Specified DateTime is always universal time.
- Parameters
-
newDate the DateTime to set.
Definition at line 343 of file kstarsdata.cpp.
◆ clearCache
|
signal |
If data changed, emit clearCache signal.
◆ clearTransientFOVs()
|
inline |
Definition at line 329 of file kstarsdata.h.
◆ clock()
|
inline |
- Returns
- pointer to the simulation Clock object
Definition at line 220 of file kstarsdata.h.
◆ color_schemes()
- Returns
- a map of color scheme names and filenames
Definition at line 214 of file kstarsdata.h.
◆ colorScheme()
|
inline |
- Returns
- pointer to the ColorScheme object
Definition at line 174 of file kstarsdata.h.
◆ colorSchemeFileName() [1/2]
|
inline |
- Returns
- file name of current color scheme
Definition at line 180 of file kstarsdata.h.
◆ colorSchemeFileName() [2/2]
- Returns
- file name of the color scheme with the name
name
Definition at line 183 of file kstarsdata.h.
◆ colorSchemeName() [1/2]
|
inline |
- Returns
- file name of the current color scheme
Definition at line 189 of file kstarsdata.h.
◆ colorSchemeName() [2/2]
- Returns
- the name of the color scheme with the name
name
Definition at line 195 of file kstarsdata.h.
◆ Create()
|
static |
Definition at line 92 of file kstarsdata.cpp.
◆ deleteUserData
|
slot |
Remove data of type
from the user data at index
for the object with name
, both in memory and on disk.
- Returns
- {success, error_message}
Definition at line 1684 of file kstarsdata.cpp.
◆ editUserData
|
slot |
Replace data
in the user data at index
for the object with name
, both in memory and on disk.
- Returns
- {success, error_message}
Definition at line 1662 of file kstarsdata.cpp.
◆ executeScript()
Execute a script.
This function actually duplicates the DCOP functionality for those cases when invoking DCOP is not practical (i.e., when preparing a sky image in command-line dump mode).
- Parameters
-
name the filename of the script to "execute". map pointer to the SkyMap object.
- Returns
- true if the script was successfully parsed.
Definition at line 928 of file kstarsdata.cpp.
◆ executeSession()
Execute * KStarsData::executeSession | ( | ) |
Definition at line 1528 of file kstarsdata.cpp.
◆ geo()
|
inline |
- Returns
- pointer to the GeoLocation object
Definition at line 232 of file kstarsdata.h.
◆ geoChanged
|
signal |
Emitted when geo location changed.
◆ getAvailableFOVs()
- Returns
- the list of available FOVs
Definition at line 316 of file kstarsdata.h.
◆ getGeoList()
|
inline |
- Returns
- list of all geographic locations
Definition at line 238 of file kstarsdata.h.
◆ getRulebook()
|
inline |
Return map for daylight saving rules.
Definition at line 264 of file kstarsdata.h.
◆ getTransientFOVs()
- Returns
- the list of transient FOVs
Definition at line 337 of file kstarsdata.h.
◆ getUserData
|
slot |
Get a reference to the user data of an object with the name name
.
Definition at line 1771 of file kstarsdata.cpp.
◆ getVisibleFOVs()
- Returns
- the list of visible FOVs
Definition at line 308 of file kstarsdata.h.
◆ hasColorScheme()
|
inline |
- Returns
- if the color scheme with the name or filename
scheme
is loaded
Definition at line 201 of file kstarsdata.h.
◆ imageExporter()
ImageExporter * KStarsData::imageExporter | ( | ) |
Definition at line 1537 of file kstarsdata.cpp.
◆ incUpdateID()
unsigned int KStarsData::incUpdateID | ( | ) |
Definition at line 321 of file kstarsdata.cpp.
◆ initialize()
bool KStarsData::initialize | ( | ) |
Initialize KStarsData while running splash screen.
- Returns
- true on success.
This code to add Height column to table city in mycitydb.sqlite is a transitional measure to support a meaningful geographic elevation.
Definition at line 134 of file kstarsdata.cpp.
◆ Instance()
|
inlinestatic |
Definition at line 93 of file kstarsdata.h.
◆ isTimeRunningForward()
|
inline |
Returns true if time is running forward else false.
Used by KStars to prevent double calculations of daylight saving change time.
Definition at line 121 of file kstarsdata.h.
◆ locationNamed()
GeoLocation * KStarsData::locationNamed | ( | const QString & | city, |
const QString & | province = QString(), | ||
const QString & | country = QString() ) |
Definition at line 380 of file kstarsdata.cpp.
◆ logObject()
|
inline |
Return log object.
Definition at line 343 of file kstarsdata.h.
◆ lst()
|
inline |
- Returns
- pointer to the local sidereal time: a dms object
Definition at line 226 of file kstarsdata.h.
◆ lt()
|
inline |
- Returns
- pointer to the current simulation local time
Definition at line 153 of file kstarsdata.h.
◆ nearestLocation()
GeoLocation * KStarsData::nearestLocation | ( | double | longitude, |
double | latitude ) |
nearestLocation Return nearest location to the given longitude and latitude coordinates
- Parameters
-
longitude Longitude (-180 to +180) latitude Latitude (-90 to +90)
- Returns
- nearest geographical location to the parameters above.
Definition at line 393 of file kstarsdata.cpp.
◆ objectNamed()
Find object by name.
- Returns
- pointer to the localization (KLocale) object
- Parameters
-
name Object name to find
- Returns
- pointer to SkyObject matching this name
Definition at line 445 of file kstarsdata.cpp.
◆ observingList()
|
inline |
Definition at line 354 of file kstarsdata.h.
◆ progressText
|
signal |
Signal that specifies the text that should be drawn in the KStarsSplash window.
◆ setFullTimeUpdate()
void KStarsData::setFullTimeUpdate | ( | ) |
The Sky is updated more frequently than the moon, which is updated more frequently than the planets.
The date of the last update for each category is recorded so we know when we need to do it again (see KStars::updateTime()). Initializing these to -1000000.0 ensures they will be updated immediately on the first call to KStars::updateTime().
Definition at line 329 of file kstarsdata.cpp.
◆ setLocation()
void KStarsData::setLocation | ( | const GeoLocation & | l | ) |
Set the GeoLocation according to the argument.
- Parameters
-
l reference to the new GeoLocation
Definition at line 419 of file kstarsdata.cpp.
◆ setLocationFromOptions()
void KStarsData::setLocationFromOptions | ( | ) |
Set the GeoLocation according to the values stored in the configuration file.
Definition at line 412 of file kstarsdata.cpp.
◆ setNextDSTChange()
|
inline |
Set the NextDSTChange member.
Need this accessor because I could not make KStars::privatedata a friend class for some reason...:/
Definition at line 112 of file kstarsdata.h.
◆ setSnapNextFocus()
|
inline |
Disable or re-enable the slewing animation for the next Focus change.
- Note
- If the user has turned off all animated slewing, setSnapNextFocus(false) will NOT enable animation on the next slew. A false argument would only be used if you have previously called setSnapNextFocus(true), but then decided you didn't want that after all. In other words, it's extremely unlikely you'd ever want to use setSnapNextFocus(false).
- Parameters
-
b when true (the default), the next Focus change will omit the slewing animation.
Definition at line 285 of file kstarsdata.h.
◆ setTimeDirection
|
slot |
Sets the direction of time and stores it in bool TimeRunForwards.
If scale >= 0 time is running forward else time runs backward. We need this to calculate just one daylight saving change time (previous or next DST change).
Definition at line 375 of file kstarsdata.cpp.
◆ skyComposite()
|
inline |
- Returns
- pointer to SkyComposite
Definition at line 168 of file kstarsdata.h.
◆ skyUpdate
|
signal |
Should be used to refresh skymap.
◆ slotConsoleMessage
|
inlineslot |
send a message to the console
Definition at line 402 of file kstarsdata.h.
◆ snapNextFocus()
|
inline |
- Returns
- whether the next Focus change will omit the slewing animation.
Definition at line 270 of file kstarsdata.h.
◆ syncFOV()
void KStarsData::syncFOV | ( | ) |
Synchronize list of visible FOVs and list of selected FOVs in Options.
Definition at line 1503 of file kstarsdata.cpp.
◆ syncLST()
void KStarsData::syncLST | ( | ) |
Sync the LST with the simulation clock.
Definition at line 338 of file kstarsdata.cpp.
◆ syncUpdateIDs()
void KStarsData::syncUpdateIDs | ( | ) |
Definition at line 312 of file kstarsdata.cpp.
◆ updateID()
|
inline |
Definition at line 373 of file kstarsdata.h.
◆ updateNum()
|
inline |
Definition at line 381 of file kstarsdata.h.
◆ updateNumID()
|
inline |
Definition at line 377 of file kstarsdata.h.
◆ updateTime
|
slot |
Update the Simulation Clock.
Update positions of Planets. Update Alt/Az coordinates of objects. Update precession. emit the skyUpdate() signal so that SkyMap / whatever draws the sky can update itself
This is ugly. It will change! (JH:)hey, it's much less ugly now...can we lose the comment yet? :p
Definition at line 250 of file kstarsdata.cpp.
◆ updateUserLog
|
slot |
Update the user log of the object with the name
to contain newLog
(find and replace).
- Returns
- {success, error_message}
Definition at line 1707 of file kstarsdata.cpp.
◆ userdb()
|
inline |
- Returns
- pointer to the KSUserDB object
Definition at line 217 of file kstarsdata.h.
◆ ut()
|
inline |
- Returns
- reference to the current simulation universal time
Definition at line 159 of file kstarsdata.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:51:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.