KPublicTransport

linemetadata.h
1 /*
2  SPDX-FileCopyrightText: 2020 Volker Krause <[email protected]>
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 
14 class QColor;
15 class QString;
16 class QUrl;
17 
18 namespace KPublicTransport {
19 
20 struct LineMetaDataContent;
21 
22 /** Static information about a public transport line.
23  * @internal exported only for unit tests
24  */
25 class KPUBLICTRANSPORT_EXPORT LineMetaData
26 {
27 public:
28  LineMetaData();
29  ~LineMetaData();
30  LineMetaData(const LineMetaData&);
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 
43 private:
44  LineMetaData(const LineMetaDataContent *dd);
45  const LineMetaDataContent *d = nullptr;
46 };
47 
48 }
49 
50 #endif // KPUBLICTRANSPORT_LINEMETADATA_H
Query operations and data types for accessing realtime public transport information from online servi...
Definition: attribution.cpp:16
Mode
Mode of transportation.
Definition: line.h:31
Static information about a public transport line.
Definition: linemetadata.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:05:21 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.