2023-04-24 15:31:46 +02:00
|
|
|
#ifndef TARIFF_TIME_RANGE_H_INCLUDED
|
|
|
|
#define TARIFF_TIME_RANGE_H_INCLUDED
|
|
|
|
|
2023-11-24 13:23:59 +01:00
|
|
|
#include <QTime>
|
2023-04-24 15:31:46 +02:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Time range definition
|
|
|
|
/// </summary>
|
|
|
|
class TariffTimeRange {
|
2024-01-16 11:56:54 +01:00
|
|
|
QTime m_time_from; // if m_time_from == m_time_until, then the time range
|
|
|
|
QTime m_time_until; // actually is the time point m_time_from
|
2023-11-24 13:23:59 +01:00
|
|
|
|
2023-04-24 15:31:46 +02:00
|
|
|
public:
|
2023-11-24 13:23:59 +01:00
|
|
|
|
|
|
|
TariffTimeRange()
|
|
|
|
: m_time_from(QTime())
|
|
|
|
, m_time_until(QTime()) {}
|
|
|
|
|
2023-12-12 10:31:54 +01:00
|
|
|
TariffTimeRange(QTime const& from, QTime const &until)
|
|
|
|
: m_time_from(from)
|
|
|
|
, m_time_until(until) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-11-24 13:23:59 +01:00
|
|
|
void setTimeRange(QTime const& from, QTime const &until) {
|
|
|
|
m_time_from = from;
|
|
|
|
m_time_until = until;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTime const &getTimeFrom() const { return m_time_from; }
|
|
|
|
QTime const &getTimeUntil() const { return m_time_until; }
|
2023-04-24 15:31:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TARIFF_TIME_RANGE_H_INCLUDED
|