reprogrammed to use ATBTime class
This commit is contained in:
parent
0ab833709c
commit
515dfaf35c
@ -1,12 +1,39 @@
|
|||||||
#ifndef TIME_RANGE_H_INCLUDED
|
#ifndef TIME_RANGE_H_INCLUDED
|
||||||
#define TIME_RANGE_H_INCLUDED
|
#define TIME_RANGE_H_INCLUDED
|
||||||
|
|
||||||
#include "time_range_header.h"
|
#include "atb_time.h"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
struct TimeRange {
|
struct TimeRange {
|
||||||
public:
|
ATBTime m_start;
|
||||||
bool IsActive;
|
ATBTime m_end;
|
||||||
ATBTimeRange TimeRangeStructure;
|
int m_duration;
|
||||||
|
|
||||||
|
explicit TimeRange() = default;
|
||||||
|
explicit TimeRange(QString const &start, QString const &end, int duration)
|
||||||
|
: m_start(start)
|
||||||
|
, m_end(end)
|
||||||
|
, m_duration(duration) {
|
||||||
|
}
|
||||||
|
explicit TimeRange(ATBTime const &start, ATBTime const &end, int duration)
|
||||||
|
: m_start(start)
|
||||||
|
, m_end(end)
|
||||||
|
, m_duration(duration) {
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit TimeRange(TimeRange const &timeRange) {
|
||||||
|
m_start = timeRange.m_start;
|
||||||
|
m_end = timeRange.m_end;
|
||||||
|
m_duration = timeRange.m_duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeRange &operator=(TimeRange && timeRange) {
|
||||||
|
m_start = std::move(timeRange.m_start);
|
||||||
|
m_end = std::move(timeRange.m_end);
|
||||||
|
m_duration = timeRange.m_duration;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TIME_RANGE_H_INCLUDED
|
#endif // TIME_RANGE_H_INCLUDED
|
||||||
|
Loading…
Reference in New Issue
Block a user