File indexing completed on 2025-02-02 05:02:28

0001 /*
0002     SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef GPXEXPORT_H
0008 #define GPXEXPORT_H
0009 
0010 #include "gpx/gpxwriter.h"
0011 
0012 namespace KPublicTransport {
0013 class JourneySection;
0014 }
0015 
0016 class FavoriteLocation;
0017 class Transfer;
0018 
0019 /** Trip group to GPX export. */
0020 class GpxExport
0021 {
0022 public:
0023     explicit GpxExport(QIODevice *out);
0024     ~GpxExport();
0025 
0026     void writeReservation(const QVariant &res, const KPublicTransport::JourneySection &journey, const Transfer &before, const Transfer &after);
0027     void writeFavoriteLocation(const FavoriteLocation &fav);
0028 
0029 private:
0030     void writeSelfContainedTransfer(const Transfer &transfer);
0031     void writeTransfer(const Transfer &transfer);
0032     void writeJourneySection(const KPublicTransport::JourneySection &section);
0033 
0034     Gpx::Writer m_writer;
0035 };
0036 
0037 #endif // GPXEXPORT_H