##// END OF EJS Templates
Temporal parameters of the selected variables can be updated using the...
Temporal parameters of the selected variables can be updated using the time widget.

File last commit:

r296:c63ffe9f765e
r304:08349e12a7ef
Show More
SqpDateTime.h
42 lines | 1.1 KiB | text/x-c | CLexer
Add SqpDateTime struct
r191 #ifndef SCIQLOP_SQPDATETIME_H
#define SCIQLOP_SQPDATETIME_H
SqpDateTime is now declared as meta type
r234 #include <QObject>
Add qdebug operator for SqpDateTime to enable its display in a log
r296
#include <QDateTime>
#include <QDebug>
Add SqpDateTime struct
r191 /**
* @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....
r228
bool contains(const SqpDateTime &dateTime)
{
return (m_TStart <= dateTime.m_TStart && m_TEnd >= dateTime.m_TEnd);
}
Add intersect méthode on variable and sqpDateTime...
r258
bool intersect(const SqpDateTime &dateTime)
{
return (m_TEnd >= dateTime.m_TStart && m_TStart <= dateTime.m_TEnd);
}
Add SqpDateTime struct
r191 };
Add qdebug operator for SqpDateTime to enable its display in a log
r296 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
r234 // Required for using shared_ptr in signals/slots
Q_DECLARE_METATYPE(SqpDateTime)
Add SqpDateTime struct
r191 #endif // SCIQLOP_SQPDATETIME_H