##// END OF EJS Templates
Removed old IDataProvider interface, added small tweak in downloader...
Removed old IDataProvider interface, added small tweak in downloader to lower CPU usage while waiting for DL, VCTransaction does not push anymore nullptr Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r9:b3317a5111ec
r28:a05b0ab23493
Show More
TimeController.cpp
52 lines | 1.1 KiB | text/x-c | CppLexer
/ src / Time / TimeController.cpp
First init from SciQLop Core module...
r0 #include "Time/TimeController.h"
#include <QDataStream>
Q_LOGGING_CATEGORY(LOG_TimeController, "TimeController")
struct TimeController::TimeControllerPrivate {
DateTimeRange m_DateTime;
};
TimeController::TimeController(QObject *parent)
: QObject{parent}, impl{spimpl::make_unique_impl<TimeControllerPrivate>()}
{
qCDebug(LOG_TimeController()) << tr("TimeController construction");
}
DateTimeRange TimeController::dateTime() const noexcept
{
return impl->m_DateTime;
}
QByteArray TimeController::mimeDataForTimeRange(const DateTimeRange &timeRange)
{
QByteArray encodedData;
QDataStream stream{&encodedData, QIODevice::WriteOnly};
stream << timeRange.m_TStart << timeRange.m_TEnd;
return encodedData;
}
DateTimeRange TimeController::timeRangeForMimeData(const QByteArray &mimeData)
{
QDataStream stream{mimeData};
Many fixes plus implemented var synchronization...
r9 double start;
double end;
stream >> start >> end;
DateTimeRange timeRange{start,end};
First init from SciQLop Core module...
r0 return timeRange;
}
void TimeController::setDateTimeRange(DateTimeRange dateTime)
{
impl->m_DateTime = dateTime;
}
void TimeController::onTimeNotify()
{
emit timeUpdated(impl->m_DateTime);
}