start changes for neuhauser
This commit is contained in:
		| @@ -27,7 +27,7 @@ public: | ||||
|     /// <param name="end_datetime">Date/time of park end to be conducted in ISO8601 format (e.g. 2022-12-25T08:00:00Z) </param> | ||||
| 	/// <param name="durationMin">Duration of parking in minutes</param> | ||||
| 	/// <returns>Returns cost (data type: double)</returns> | ||||
|     double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, const QDateTime start_datetime, QDateTime & end_datetime, double durationMin, bool nextDay = false, bool prepaid = false); | ||||
|     double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, const QDateTime start_datetime, QDateTime & end_datetime, int durationMin, bool nextDay = false, bool prepaid = false); | ||||
|  | ||||
|     // Daily ticket | ||||
|     QDateTime GetDailyTicketDuration(Configuration* cfg, const QDateTime start_datetime, uint8_t payment_option, bool carry_over); | ||||
|   | ||||
| @@ -1,17 +1,28 @@ | ||||
| // #pragma once | ||||
| #ifndef TARIFF_TIME_RANGE_H_INCLUDED | ||||
| #define TARIFF_TIME_RANGE_H_INCLUDED | ||||
|  | ||||
| #include <ctime> | ||||
| #include <QTime> | ||||
|  | ||||
| /// <summary> | ||||
| /// Time range definition | ||||
| /// </summary> | ||||
| class TariffTimeRange { | ||||
|     QTime m_time_from; | ||||
|     QTime m_time_until; | ||||
|  | ||||
| public: | ||||
| 	time_t time_from; | ||||
|     time_t time_to; | ||||
|     TariffTimeRange() : time_from(0), time_to(0) {} | ||||
|  | ||||
|     TariffTimeRange() | ||||
|     : m_time_from(QTime()) | ||||
|     , m_time_until(QTime()) {} | ||||
|  | ||||
|     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; } | ||||
| }; | ||||
|  | ||||
| #endif // TARIFF_TIME_RANGE_H_INCLUDED | ||||
|   | ||||
		Reference in New Issue
	
	Block a user