Kstars
simclock.cpp
18 SimClock::SimClock(QObject *parent, const KStarsDateTime &when) : QObject(parent), m_InternalTimer(this)
50 long double scaledsec = static_cast<long double>(mselapsed) * static_cast<long double>(m_Scale) / 1000.0;
89 //QTimer::singleShot(1, [this,backward] { setUTC(UTC.addSecs(static_cast<long double>Scale * (backward ? -1 : 1))); });
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition: kstarsdatetime.h:35
bool isActive() const const
SimClock(QObject *parent=nullptr, const KStarsDateTime &when=KStarsDateTime::currentDateTimeUtc())
Constructor.
Definition: simclock.cpp:18
void clockToggled(bool)
This is an signal that is called on either clock start or clock stop with an appropriate boolean argu...
bool registerObject(const QString &path, QObject *object, QDBusConnection::RegisterOptions options)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void start(int msec)
QDBusConnection sessionBus()
qint64 elapsed() const const
void setManualMode(bool on=true)
Sets Manual Mode on/off according to the bool argument.
Definition: simclock.cpp:61
Q_SCRIPTABLE Q_NOREPLY void setUTC(const KStarsDateTime &newtime)
DBUS function to set the time of the SimClock.
Definition: simclock.cpp:143
void stop()
Q_SCRIPTABLE Q_NOREPLY void setClockScale(double scale)
DBUS function to set scale of simclock.
Definition: simclock.cpp:169
bool isValid() const const
void manualTick(bool force=false, bool backward=false)
Equivalent of tick() for manual mode.
Definition: simclock.cpp:83
Q_INVOKABLE bool isActive()
Whether the clock is active or not is a bit complicated by the introduction of "manual mode".
Definition: simclock.cpp:96
void start()
void setDJD(long double jd)
Assign the static_cast<long double> Julian Day value, which includes the time of day encoded in the f...
Definition: kstarsdatetime.cpp:118
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.