@@ -1,19 +1,23 | |||||
1 | #ifndef SCIQLOP_SQPDATETIME_H |
|
1 | #ifndef SCIQLOP_SQPDATETIME_H | |
2 | #define SCIQLOP_SQPDATETIME_H |
|
2 | #define SCIQLOP_SQPDATETIME_H | |
3 |
|
3 | |||
|
4 | #include <QObject> | |||
4 | /** |
|
5 | /** | |
5 | * @brief The SqpDateTime struct holds the information of time parameters |
|
6 | * @brief The SqpDateTime struct holds the information of time parameters | |
6 | */ |
|
7 | */ | |
7 | struct SqpDateTime { |
|
8 | struct SqpDateTime { | |
8 | /// Start time |
|
9 | /// Start time | |
9 | double m_TStart; |
|
10 | double m_TStart; | |
10 | /// End time |
|
11 | /// End time | |
11 | double m_TEnd; |
|
12 | double m_TEnd; | |
12 |
|
13 | |||
13 | bool contains(const SqpDateTime &dateTime) |
|
14 | bool contains(const SqpDateTime &dateTime) | |
14 | { |
|
15 | { | |
15 | return (m_TStart <= dateTime.m_TStart && m_TEnd >= dateTime.m_TEnd); |
|
16 | return (m_TStart <= dateTime.m_TStart && m_TEnd >= dateTime.m_TEnd); | |
16 | } |
|
17 | } | |
17 | }; |
|
18 | }; | |
18 |
|
19 | |||
|
20 | // Required for using shared_ptr in signals/slots | |||
|
21 | Q_DECLARE_METATYPE(SqpDateTime) | |||
|
22 | ||||
19 | #endif // SCIQLOP_SQPDATETIME_H |
|
23 | #endif // SCIQLOP_SQPDATETIME_H |
General Comments 0
You need to be logged in to leave comments.
Login now