TimeController.cpp
29 lines
| 635 B
| text/x-c
|
CppLexer
r190 | #include "Time/TimeController.h" | |||
Q_LOGGING_CATEGORY(LOG_TimeController, "TimeController") | ||||
struct TimeController::TimeControllerPrivate { | ||||
r512 | SqpRange m_DateTime; | |||
r190 | }; | |||
TimeController::TimeController(QObject *parent) | ||||
: QObject{parent}, impl{spimpl::make_unique_impl<TimeControllerPrivate>()} | ||||
{ | ||||
qCDebug(LOG_TimeController()) << tr("TimeController construction"); | ||||
} | ||||
r512 | SqpRange TimeController::dateTime() const noexcept | |||
r190 | { | |||
return impl->m_DateTime; | ||||
} | ||||
r512 | void TimeController::onTimeToUpdate(SqpRange dateTime) | |||
r190 | { | |||
impl->m_DateTime = dateTime; | ||||
r302 | } | |||
r190 | ||||
r302 | void TimeController::onTimeNotify() | |||
{ | ||||
emit timeUpdated(impl->m_DateTime); | ||||
r190 | } | |||