##// END OF EJS Templates
Reads variable's metadata to retrieve the type of data series (scalar, vector, spectrogram)
Reads variable's metadata to retrieve the type of data series (scalar, vector, spectrogram)

File last commit:

r878:e439cb403ff9
r1279:88939ef97b8f
Show More
TimeController.cpp
51 lines | 1.1 KiB | text/x-c | CppLexer
/ core / src / Time / TimeController.cpp
Add the time controller.
r190 #include "Time/TimeController.h"
Drop of variable, graph and zones on the time widget
r878 #include <QDataStream>
Add the time controller.
r190 Q_LOGGING_CATEGORY(LOG_TimeController, "TimeController")
struct TimeController::TimeControllerPrivate {
Change SqpRange for SqpDateTime
r512 SqpRange m_DateTime;
Add the time controller.
r190 };
TimeController::TimeController(QObject *parent)
: QObject{parent}, impl{spimpl::make_unique_impl<TimeControllerPrivate>()}
{
qCDebug(LOG_TimeController()) << tr("TimeController construction");
}
Change SqpRange for SqpDateTime
r512 SqpRange TimeController::dateTime() const noexcept
Add the time controller.
r190 {
return impl->m_DateTime;
}
Drop of variable, graph and zones on the time widget
r878 QByteArray TimeController::mimeDataForTimeRange(const SqpRange &timeRange)
{
QByteArray encodedData;
QDataStream stream{&encodedData, QIODevice::WriteOnly};
stream << timeRange.m_TStart << timeRange.m_TEnd;
return encodedData;
}
SqpRange TimeController::timeRangeForMimeData(const QByteArray &mimeData)
{
QDataStream stream{mimeData};
SqpRange timeRange;
stream >> timeRange.m_TStart >> timeRange.m_TEnd;
return timeRange;
}
Change SqpRange for SqpDateTime
r512 void TimeController::onTimeToUpdate(SqpRange dateTime)
Add the time controller.
r190 {
impl->m_DateTime = dateTime;
Add apply button and its connection for timewidget
r302 }
Add the time controller.
r190
Add apply button and its connection for timewidget
r302 void TimeController::onTimeNotify()
{
emit timeUpdated(impl->m_DateTime);
Add the time controller.
r190 }