typedef struct RULE { int type; double costs; double len; double after; QTime from, until; struct { QDate from, until; } date; struct { int from, until; } weekday; }; // this class is used for loading and parsing of rules