Add members m_start and m_timeStepCompensation (used for Neuhauser, Galtuer (745) at the moment).
Add several setters/getters.
This commit is contained in:
parent
9f4b10bb9a
commit
0b901954aa
@ -12,9 +12,37 @@
|
||||
#include <QDateTime>
|
||||
using namespace std;
|
||||
|
||||
class Calculator
|
||||
{
|
||||
class Calculator {
|
||||
QDateTime m_start;
|
||||
mutable uint16_t m_timeStepCompensation = 0;
|
||||
public:
|
||||
explicit Calculator() = default;
|
||||
explicit Calculator(QDateTime const start) : m_start(start) {
|
||||
m_start.setTime(QTime(start.time().hour(), start.time().minute(), 0));
|
||||
qCritical() << "init m_start time:" << m_start.toString(Qt::ISODate);
|
||||
}
|
||||
|
||||
void setStartDateTime(QDateTime const &start) {
|
||||
m_start = start;
|
||||
m_start.setTime(QTime(start.time().hour(), start.time().minute(), 0));
|
||||
qCritical() << "set m_start time:" << m_start.toString(Qt::ISODate);
|
||||
}
|
||||
|
||||
QDateTime const &getStartDateTime() const {
|
||||
return m_start;
|
||||
}
|
||||
|
||||
QDateTime &getStartDateTime() {
|
||||
return m_start;
|
||||
}
|
||||
|
||||
void setTimeStepCompensation(uint16_t timeStepCompensation) {
|
||||
m_timeStepCompensation = timeStepCompensation;
|
||||
}
|
||||
|
||||
uint16_t getTimeStepCompensation() const {
|
||||
return m_timeStepCompensation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets duration in seconds from cost
|
||||
@ -60,6 +88,7 @@ public:
|
||||
cfg->SpecialDaysWorktime.size() == 0);
|
||||
}
|
||||
|
||||
// testing public:
|
||||
private:
|
||||
// Introduced for PaymentMethod::Steps (e.g. Schoenau)
|
||||
// For tariff of following structure: only steps, no special days, nonstop.
|
||||
|
Loading…
Reference in New Issue
Block a user