|
| | CommandSegmentsBusinessLogic () |
| |
| virtual | ~CommandSegmentsBusinessLogic () |
| |
| void | GetCommandSegmentTimes (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QTime &startTime, QTime &endTime) |
| | GetCommandSegmentTimes - converts command segment start and end time from "minutes from command start" to QTime. More...
|
| |
| void | CalculateCommandSegmentDateTimes (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QDateTime &startDateTime, QDateTime &endDateTime) |
| | CalculateCommandSegmentDateTimes - calculates command segment start and end date and time from "minutes from command start", dates are calculated by "lowest time to departure". More...
|
| |
| void | CalculateNextCommandSegmentDateTimes (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *previousCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment, const QDate &previousSegmentStartDate, QDateTime &startDateTime, QDateTime &endDateTime) |
| | CalculateNextCommandSegmentDateTimes - calculates command segment start and end date and time from "minutes from command start", dates are calculated in relation to previous command segment. More...
|
| |
| void | GetCommandSegmentLineTripTexts (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &lineText, QString &tripText) |
| | GetCommandSegmentLineTripTexts. More...
|
| |
| bool | GetCommandSegmentBusStopsInfo (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QStringList ×, QStringList &busStops) |
| | GetCommandSegmentBusStopsInfo. More...
|
| |
| bool | IsCrossingCommandSegment (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment) |
| | IsCrossingCommandSegment. More...
|
| |
| bool | GetNextCommandSegment (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *actualCommandSegment, EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&nextCommandSegment) |
| | GetNextCommandSegment. More...
|
| |
| bool | GetCommandSegmentFirstAndLastBusStopID (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, unsigned long &commandSegmentFirstBusStopId, unsigned long &commandSegmentLastBusStopId) |
| | GetCommandSegmentFirstAndLastBusStopID. More...
|
| |
| bool | GetCommandSegmentFirstTripBusStop (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, EM::Strojcek::VstupneUdaje::CestovnePoriadky::ESpojZastavka *&tripBusStop) |
| | GetCommandSegmentFirstTripBusStop returns first bus stop platform on command segment. More...
|
| |
| bool | GetCommandSegmentFirstBusStopPlatformName (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, QString &commandSegmentFirstBusStopPlatformName) |
| | GetCommandSegmentFirstBusStopPlatformName returns first bus stop platform name on command segment. More...
|
| |
| bool | GetCommandSegmentFirstAndLastBusStopTripOrder (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &firstBusStopTripOrder, int &lastBusStopTripOrder) |
| | GetCommandSegmentFirstAndLastBusStopTripOrder returns first and last bus stop trip order. More...
|
| |
| bool | GetCommandSegmentTripBusStopsCount (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *commandSegment, int &tripBusStopsCount) |
| | GetCommandSegmentTripBusStopsCount returns trip bus stops count. More...
|
| |
| bool | FindCommandSegmentByLineAndTrip (EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz *&foundCommandSegment, unsigned short tripNumber, unsigned short binaryLineIndex) |
| | FindCommandSegmentByLineAndTrip returns commandSegment containing specified line and trip. More...
|
| |
| | BusinessLogic (ApplicationDefines::BusinessLogicType businessLogicType, ApplicationDefines::BusinessLogicLifeTimeType businessLogicLifeTimeType) |
| |
| virtual | ~BusinessLogic () |
| |
| ApplicationDefines::BusinessLogicType | GetBusinessLogicType () const |
| |
| ApplicationDefines::BusinessLogicLifeTimeType | GetBusinessLogicLifeTimeType () const |
| |
| void CommandSegmentsBusinessLogic::CalculateCommandSegmentDateTimes |
( |
EM::Strojcek::VstupneUdaje::Turnusy::EPrikazKurz * |
commandSegment, |
|
|
QDateTime & |
startDateTime, |
|
|
QDateTime & |
endDateTime |
|
) |
| |
CalculateCommandSegmentDateTimes - calculates command segment start and end date and time from "minutes from command start", dates are calculated by "lowest time to departure".
- Note
- Command segment start date is calculated in four steps: 1) Calculate time to departure, as if departure was yesterday. 2) Calculate time to departure, as if departure was today. 3) Calculate time to departure, as if departure was tomorrow. 4) Pick lowest time to departure.
Example: Command segment starts at 19:20, current dateTime is "25.10. 06:00". If departure was yesterday ("24.10. 19:20"), time to departure would be "10h 40m". If departure was today ("25.10. 19:20"), time to departure would be "13h 20m". If departure was tomorrow ("26.10. 19:20"), time to departure would be "37h 20m". Command segment start dateTime will be "yesterday" ( "24.10. 19:22").
- Parameters
-
| commandSegment | - used command segment |
| startDateTime | - command segment start datetime |
| endDateTime | - command segment end datetime |