##// END OF EJS Templates
Sets the name of the plugin for products and components...
Sets the name of the plugin for products and components Since there is only one common root in the data source widget, it is no longer possible to retrieve on the fly the name of the plugin in which a component or product is located. This name is therefore attached to their creation.

File last commit:

r878:e439cb403ff9
r1036:9c3bb5e93c54
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 }