MOBILISIS-Calculator/library/include/mobilisis/tariff_carryover.h

71 lines
4.2 KiB
C

#ifndef TARIFF_CARRYOVER_H_INCLUDED
#define TARIFF_CARRYOVER_H_INCLUDED
#include <QTime>
struct ATBCarryOver {
struct week {
int day;
bool seemless;
bool never;
QTime static_start;
QTime static_end;
} carryover[8];
int id;
friend QDebug operator<<(QDebug debug, ATBCarryOver const &co) {
QDebugStateSaver saver(debug);
debug.nospace()
<< " id:" << co.id << "\n"
<< " **** Monday **** \n"
<< " day: " << co.carryover[(int)Qt::Monday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Monday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Monday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Monday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Monday].never << "\n"
<< " **** Tuesday **** \n"
<< " day: " << co.carryover[(int)Qt::Tuesday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Tuesday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Tuesday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Tuesday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Tuesday].never << "\n"
<< " **** Wednesday **** \n"
<< " day: " << co.carryover[(int)Qt::Wednesday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Wednesday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Wednesday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Wednesday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Wednesday].never << "\n"
<< " **** Thursday **** \n"
<< " day: " << co.carryover[(int)Qt::Thursday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Thursday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Thursday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Thursday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Thursday].never << "\n"
<< " **** Friday **** \n"
<< " day: " << co.carryover[(int)Qt::Friday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Friday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Friday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Friday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Friday].never << "\n"
<< " **** Saturday **** \n"
<< " day: " << co.carryover[(int)Qt::Saturday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Saturday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Saturday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Saturday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Saturday].never << "\n"
<< " **** Sunday **** \n"
<< " day: " << co.carryover[(int)Qt::Sunday].day << "\n"
<< " static_start: " << co.carryover[(int)Qt::Sunday].static_start.toString(Qt::ISODate) << "\n"
<< " static_end: " << co.carryover[(int)Qt::Sunday].static_end.toString(Qt::ISODate) << "\n"
<< " anytime: " << co.carryover[(int)Qt::Sunday].seemless << "\n"
<< " never: " << co.carryover[(int)Qt::Sunday].never << "\n";
return debug;
}
};
#endif // TARIFF_CARRYOVER_H_INCLUDED