KPublicTransport

linemetadata.h
1/*
2 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KPUBLICTRANSPORT_LINEMETADATA_H
8#define KPUBLICTRANSPORT_LINEMETADATA_H
9
10#include "kpublictransport_export.h"
11
12#include <KPublicTransport/Line>
13
14class QColor;
15class QString;
16class QUrl;
17
18namespace KPublicTransport {
19
20struct LineMetaDataContent;
21
22/** Static information about a public transport line.
23 * @internal exported only for unit tests
24 */
25class KPUBLICTRANSPORT_EXPORT LineMetaData
26{
27public:
31 LineMetaData& operator=(const LineMetaData&);
32
33 bool isNull() const;
34 QString name() const;
35 QColor color() const;
36 QUrl logoUrl() const;
37 Line::Mode mode() const;
38 QUrl modeLogoUrl() const;
39
40 /** Attempts to find information about a line with the given name and a stop at the given coordinates. */
41 static LineMetaData find(double latitude, double longitude, const QString &name, Line::Mode mode);
42
43private:
44 LineMetaData(const LineMetaDataContent *dd);
45 const LineMetaDataContent *d = nullptr;
46};
47
48}
49
50#endif // KPUBLICTRANSPORT_LINEMETADATA_H
Static information about a public transport line.
Mode
Mode of transportation.
Definition line.h:27
Query operations and data types for accessing realtime public transport information from online servi...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:57:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.