##// END OF EJS Templates
Parser refactoring (1)...
Parser refactoring (1) Creates a helper that will be used to read the properties and values of an AMDA file, to generate the dataset. The helper is intended to replace the current implementation of the parser, to be more generic and thus manage the spectrograms more easily

File last commit:

r884:e439cb403ff9
r933:17461e149cba
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
r884 #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
r884 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 }