KStarsData

Search for usage in LXR

#include <kstarsdata.h>

Inheritance diagram for KStarsData:

Signals

void clearCache ()
 
void geoChanged ()
 
void progressText (const QString &text)
 
void skyUpdate (bool)
 

Public Slots

std::pair< bool, QStringaddToUserData (const QString &name, const SkyObjectUserdata::LinkData &data)
 
std::pair< bool, QStringdeleteUserData (const QString &name, const unsigned int index, SkyObjectUserdata::Type type)
 
std::pair< bool, QStringeditUserData (const QString &name, const unsigned int index, const SkyObjectUserdata::LinkData &data)
 
const SkyObjectUserdata::DatagetUserData (const QString &name)
 
void setTimeDirection (float scale)
 
void slotConsoleMessage (QString s)
 
void updateTime (GeoLocation *geo, const bool automaticDSTchange=true)
 
std::pair< bool, QStringupdateUserLog (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 SimClockclock ()
 
const std::map< QString, QStringcolor_schemes ()
 
ColorSchemecolorScheme ()
 
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)
 
ExecuteexecuteSession ()
 
GeoLocationgeo ()
 
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)
 
ImageExporterimageExporter ()
 
unsigned int incUpdateID ()
 
bool initialize ()
 
bool isTimeRunningForward () const
 
GeoLocationlocationNamed (const QString &city, const QString &province=QString(), const QString &country=QString())
 
OAL::Log * logObject ()
 
CachingDmslst ()
 
const KStarsDateTimelt () const
 
GeoLocationnearestLocation (double longitude, double latitude)
 
SkyObjectobjectNamed (const QString &name)
 
ObservingListobservingList () const
 
void setFullTimeUpdate ()
 
void setLocation (const GeoLocation &l)
 
void setLocationFromOptions ()
 
void setNextDSTChange (const KStarsDateTime &dt)
 
void setSnapNextFocus (bool b=true)
 
SkyMapCompositeskyComposite ()
 
bool snapNextFocus () const
 
void syncFOV ()
 
void syncLST ()
 
void syncUpdateIDs ()
 
unsigned int updateID () const
 
KSNumbersupdateNum ()
 
unsigned int updateNumID () const
 
KSUserDBuserdb ()
 
const KStarsDateTimeut () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () 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< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
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 QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () 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
 
qobject_cast (const QObject *object)
 
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)
 
QThreadthread () const const
 

Static Public Member Functions

static KStarsDataCreate ()
 
static KStarsDataInstance ()
 
- 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
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Attributes inherited from QObject
typedef QObjectList
 

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.

Author
Heiko Evermann
Version
1.0

Definition at line 71 of file kstarsdata.h.

Constructor & Destructor Documentation

◆ KStarsData()

KStarsData::KStarsData ( )
protected

Constructor.

Definition at line 105 of file kstarsdata.cpp.

◆ ~KStarsData()

KStarsData::~KStarsData ( )
override

Destructor.

Delete data objects.

Definition at line 118 of file kstarsdata.cpp.

Member Function Documentation

◆ add_color_scheme()

void KStarsData::add_color_scheme ( const QString & filename,
const QString & name )
inline

Register a color scheme with filename and name.

Definition at line 205 of file kstarsdata.h.

◆ addToUserData

std::pair< bool, QString > KStarsData::addToUserData ( const QString & name,
const SkyObjectUserdata::LinkData & data )
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 1531 of file kstarsdata.cpp.

◆ addTransientFOV()

void KStarsData::addTransientFOV ( std::shared_ptr< FOV > newFOV)
inline

addTransientFOV Adds a new FOV to the list.

Parameters
newFOVpointer to FOV object.

Definition at line 323 of file kstarsdata.h.

◆ avdTree()

QList< ADVTreeData * > KStarsData::avdTree ( )
inline

Return ADV Tree.

Definition at line 347 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
newDatethe DateTime to set.

Definition at line 327 of file kstarsdata.cpp.

◆ clearCache

void KStarsData::clearCache ( )
signal

If data changed, emit clearCache signal.

◆ clearTransientFOVs()

void KStarsData::clearTransientFOVs ( )
inline

Definition at line 327 of file kstarsdata.h.

◆ clock()

Q_INVOKABLE SimClock * KStarsData::clock ( )
inline
Returns
pointer to the simulation Clock object

Definition at line 218 of file kstarsdata.h.

◆ color_schemes()

const std::map< QString, QString > KStarsData::color_schemes ( )
inline
Returns
a map of color scheme names and filenames

Definition at line 212 of file kstarsdata.h.

◆ colorScheme()

ColorScheme * KStarsData::colorScheme ( )
inline
Returns
pointer to the ColorScheme object

Definition at line 172 of file kstarsdata.h.

◆ colorSchemeFileName() [1/2]

Q_INVOKABLE QString KStarsData::colorSchemeFileName ( )
inline
Returns
file name of current color scheme

Definition at line 178 of file kstarsdata.h.

◆ colorSchemeFileName() [2/2]

QString KStarsData::colorSchemeFileName ( const QString & name)
inline
Returns
file name of the color scheme with the name name

Definition at line 181 of file kstarsdata.h.

◆ colorSchemeName() [1/2]

Q_INVOKABLE QString KStarsData::colorSchemeName ( )
inline
Returns
file name of the current color scheme

Definition at line 187 of file kstarsdata.h.

◆ colorSchemeName() [2/2]

QString KStarsData::colorSchemeName ( const QString & fileName)
inline
Returns
the name of the color scheme with the name name

Definition at line 193 of file kstarsdata.h.

◆ Create()

KStarsData * KStarsData::Create ( )
static

Definition at line 89 of file kstarsdata.cpp.

◆ deleteUserData

std::pair< bool, QString > KStarsData::deleteUserData ( const QString & name,
const unsigned int index,
SkyObjectUserdata::Type type )
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 1668 of file kstarsdata.cpp.

◆ editUserData

std::pair< bool, QString > KStarsData::editUserData ( const QString & name,
const unsigned int index,
const SkyObjectUserdata::LinkData & data )
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 1646 of file kstarsdata.cpp.

◆ executeScript()

bool KStarsData::executeScript ( const QString & name,
SkyMap * map )

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
namethe filename of the script to "execute".
mappointer to the SkyMap object.
Returns
true if the script was successfully parsed.

Definition at line 912 of file kstarsdata.cpp.

◆ executeSession()

Execute * KStarsData::executeSession ( )

Definition at line 1512 of file kstarsdata.cpp.

◆ geo()

GeoLocation * KStarsData::geo ( )
inline
Returns
pointer to the GeoLocation object

Definition at line 230 of file kstarsdata.h.

◆ geoChanged

void KStarsData::geoChanged ( )
signal

Emitted when geo location changed.

◆ getAvailableFOVs()

const QList< FOV * > KStarsData::getAvailableFOVs ( ) const
inline
Returns
the list of available FOVs

Definition at line 314 of file kstarsdata.h.

◆ getGeoList()

QList< GeoLocation * > & KStarsData::getGeoList ( )
inline
Returns
list of all geographic locations

Definition at line 236 of file kstarsdata.h.

◆ getRulebook()

const QMap< QString, TimeZoneRule > & KStarsData::getRulebook ( ) const
inline

Return map for daylight saving rules.

Definition at line 262 of file kstarsdata.h.

◆ getTransientFOVs()

const QList< std::shared_ptr< FOV > > KStarsData::getTransientFOVs ( ) const
inline
Returns
the list of transient FOVs

Definition at line 335 of file kstarsdata.h.

◆ getUserData

const SkyObjectUserdata::Data & KStarsData::getUserData ( const QString & name)
slot

Get a reference to the user data of an object with the name name.

Definition at line 1755 of file kstarsdata.cpp.

◆ getVisibleFOVs()

const QList< FOV * > KStarsData::getVisibleFOVs ( ) const
inline
Returns
the list of visible FOVs

Definition at line 306 of file kstarsdata.h.

◆ hasColorScheme()

bool KStarsData::hasColorScheme ( const QString & scheme)
inline
Returns
if the color scheme with the name or filename scheme is loaded

Definition at line 199 of file kstarsdata.h.

◆ imageExporter()

ImageExporter * KStarsData::imageExporter ( )

Definition at line 1521 of file kstarsdata.cpp.

◆ incUpdateID()

unsigned int KStarsData::incUpdateID ( )

Definition at line 305 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 131 of file kstarsdata.cpp.

◆ Instance()

static KStarsData * KStarsData::Instance ( )
inlinestatic

Definition at line 91 of file kstarsdata.h.

◆ isTimeRunningForward()

bool KStarsData::isTimeRunningForward ( ) const
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 119 of file kstarsdata.h.

◆ locationNamed()

GeoLocation * KStarsData::locationNamed ( const QString & city,
const QString & province = QString(),
const QString & country = QString() )

Definition at line 364 of file kstarsdata.cpp.

◆ logObject()

OAL::Log * KStarsData::logObject ( )
inline

Return log object.

Definition at line 341 of file kstarsdata.h.

◆ lst()

CachingDms * KStarsData::lst ( )
inline
Returns
pointer to the local sidereal time: a dms object

Definition at line 224 of file kstarsdata.h.

◆ lt()

const KStarsDateTime & KStarsData::lt ( ) const
inline
Returns
pointer to the current simulation local time

Definition at line 151 of file kstarsdata.h.

◆ nearestLocation()

GeoLocation * KStarsData::nearestLocation ( double longitude,
double latitude )

nearestLocation Return nearest location to the given longitude and latitude coordinates

Parameters
longitudeLongitude (-180 to +180)
latitudeLatitude (-90 to +90)
Returns
nearest geographical location to the parameters above.

Definition at line 377 of file kstarsdata.cpp.

◆ objectNamed()

SkyObject * KStarsData::objectNamed ( const QString & name)

Find object by name.

Returns
pointer to the localization (KLocale) object
Parameters
nameObject name to find
Returns
pointer to SkyObject matching this name

Definition at line 429 of file kstarsdata.cpp.

◆ observingList()

ObservingList * KStarsData::observingList ( ) const
inline

Definition at line 352 of file kstarsdata.h.

◆ progressText

void KStarsData::progressText ( const QString & text)
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 313 of file kstarsdata.cpp.

◆ setLocation()

void KStarsData::setLocation ( const GeoLocation & l)

Set the GeoLocation according to the argument.

Parameters
lreference to the new GeoLocation

Definition at line 403 of file kstarsdata.cpp.

◆ setLocationFromOptions()

void KStarsData::setLocationFromOptions ( )

Set the GeoLocation according to the values stored in the configuration file.

Definition at line 396 of file kstarsdata.cpp.

◆ setNextDSTChange()

void KStarsData::setNextDSTChange ( const KStarsDateTime & dt)
inline

Set the NextDSTChange member.

Need this accessor because I could not make KStars::privatedata a friend class for some reason...:/

Definition at line 110 of file kstarsdata.h.

◆ setSnapNextFocus()

void KStarsData::setSnapNextFocus ( bool b = true)
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
bwhen true (the default), the next Focus change will omit the slewing animation.

Definition at line 283 of file kstarsdata.h.

◆ setTimeDirection

void KStarsData::setTimeDirection ( float scale)
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 359 of file kstarsdata.cpp.

◆ skyComposite()

SkyMapComposite * KStarsData::skyComposite ( )
inline
Returns
pointer to SkyComposite

Definition at line 166 of file kstarsdata.h.

◆ skyUpdate

void KStarsData::skyUpdate ( bool )
signal

Should be used to refresh skymap.

◆ slotConsoleMessage

void KStarsData::slotConsoleMessage ( QString s)
inlineslot

send a message to the console

Definition at line 393 of file kstarsdata.h.

◆ snapNextFocus()

bool KStarsData::snapNextFocus ( ) const
inline
Returns
whether the next Focus change will omit the slewing animation.

Definition at line 268 of file kstarsdata.h.

◆ syncFOV()

void KStarsData::syncFOV ( )

Synchronize list of visible FOVs and list of selected FOVs in Options.

Definition at line 1487 of file kstarsdata.cpp.

◆ syncLST()

void KStarsData::syncLST ( )

Sync the LST with the simulation clock.

Definition at line 322 of file kstarsdata.cpp.

◆ syncUpdateIDs()

void KStarsData::syncUpdateIDs ( )

Definition at line 296 of file kstarsdata.cpp.

◆ updateID()

unsigned int KStarsData::updateID ( ) const
inline

Definition at line 364 of file kstarsdata.h.

◆ updateNum()

KSNumbers * KStarsData::updateNum ( )
inline

Definition at line 372 of file kstarsdata.h.

◆ updateNumID()

unsigned int KStarsData::updateNumID ( ) const
inline

Definition at line 368 of file kstarsdata.h.

◆ updateTime

void KStarsData::updateTime ( GeoLocation * geo,
const bool automaticDSTchange = true )
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 234 of file kstarsdata.cpp.

◆ updateUserLog

std::pair< bool, QString > KStarsData::updateUserLog ( const QString & name,
const QString & newLog )
slot

Update the user log of the object with the name to contain newLog (find and replace).

Returns
{success, error_message}

Definition at line 1691 of file kstarsdata.cpp.

◆ userdb()

KSUserDB * KStarsData::userdb ( )
inline
Returns
pointer to the KSUserDB object

Definition at line 215 of file kstarsdata.h.

◆ ut()

const KStarsDateTime & KStarsData::ut ( ) const
inline
Returns
reference to the current simulation universal time

Definition at line 157 of file kstarsdata.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.