##// END OF EJS Templates
It's now possible to create the variable and ask data to be retreived...
It's now possible to create the variable and ask data to be retreived asynchronously

File last commit:

r293:fc4b2122dbde
r294:c71a61da7f3d
Show More
SqpDateTime.h
44 lines | 1.1 KiB | text/x-c | CLexer
Add SqpDateTime struct
r177 #ifndef SCIQLOP_SQPDATETIME_H
#define SCIQLOP_SQPDATETIME_H
SqpDateTime is now declared as meta type
r218 #include <QObject>
Add qdebug operator for SqpDateTime to enable its display in a log
r274
#include <QDateTime>
#include <QDebug>
Alexandre Leroux
Centralization of qregistermetatype management
r285 #include <Common/MetaTypes.h>
Add SqpDateTime struct
r177 /**
* @brief The SqpDateTime struct holds the information of time parameters
*/
struct SqpDateTime {
/// Start time
double m_TStart;
/// End time
double m_TEnd;
A variable is now created with its dateTime too....
r212
The cache is now updated only if date requested has been successfully...
r293 bool contains(const SqpDateTime &dateTime) const noexcept
A variable is now created with its dateTime too....
r212 {
return (m_TStart <= dateTime.m_TStart && m_TEnd >= dateTime.m_TEnd);
}
Add intersect méthode on variable and sqpDateTime...
r240
The cache is now updated only if date requested has been successfully...
r293 bool intersect(const SqpDateTime &dateTime) const noexcept
Add intersect méthode on variable and sqpDateTime...
r240 {
return (m_TEnd >= dateTime.m_TStart && m_TStart <= dateTime.m_TEnd);
}
Add SqpDateTime struct
r177 };
Add qdebug operator for SqpDateTime to enable its display in a log
r274 inline QDebug operator<<(QDebug d, SqpDateTime obj)
{
auto tendDateTimeStart = QDateTime::fromMSecsSinceEpoch(obj.m_TStart * 1000);
auto tendDateTimeEnd = QDateTime::fromMSecsSinceEpoch(obj.m_TEnd * 1000);
// QDebug << "ts: " << tendDateTimeStart << " te: " << tendDateTimeEnd;
d << "ts: " << tendDateTimeStart << " te: " << tendDateTimeEnd;
return d;
}
SqpDateTime is now declared as meta type
r218 // Required for using shared_ptr in signals/slots
Alexandre Leroux
Centralization of qregistermetatype management
r285 SCIQLOP_REGISTER_META_TYPE(SQPDATETIME_REGISTRY, SqpDateTime)
SqpDateTime is now declared as meta type
r218
Add SqpDateTime struct
r177 #endif // SCIQLOP_SQPDATETIME_H