File indexing completed on 2024-05-12 04:42:51
0001 /* 0002 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org> 0003 SPDX-License-Identifier: LGPL-2.0-or-later 0004 */ 0005 0006 #ifndef KPUBLICTRANSPORT_PLATFORMLAYOUT_H 0007 #define KPUBLICTRANSPORT_PLATFORMLAYOUT_H 0008 0009 #include "kpublictransport_export.h" 0010 0011 #include <KPublicTransport/Vehicle> 0012 0013 namespace KPublicTransport { 0014 0015 class Stopover; 0016 0017 /** Methods for determining positions on a platform. 0018 * 0019 * The sectionsFor* method return a platform section range expression consumable by 0020 * e.g. KOSMIndoorMaps. 0021 */ 0022 class KPUBLICTRANSPORT_EXPORT PlatformLayout 0023 { 0024 public: 0025 /** Returns all platform sections the given vehicle has coaches stopping at. 0026 * This excludes powercars and engines. 0027 */ 0028 static QString sectionsForVehicle(const Stopover &stopover); 0029 0030 /** Returns all platform sections the given vehicle has coaches of class @cls at. */ 0031 static QString sectionsForClass(const Stopover &stopover, VehicleSection::Class cls); 0032 0033 /** Returns all platform sections the coach @p coachName stops at. */ 0034 static QString sectionsForVehicleSection(const Stopover &stopover, const QString &coachName); 0035 }; 0036 0037 } 0038 0039 #endif // KPUBLICTRANSPORT_PLATFORMLAYOUT_H