KPublicTransport::Line
Search for usage in LXR
#include <line.h>
|
enum | Mode {
Unknown
, Air
, Boat
, Bus
,
BusRapidTransit
, Coach
, Ferry
, Funicular
,
LocalTrain
, LongDistanceTrain
, Metro
, RailShuttle
,
RapidTransit
, Shuttle
, Taxi
, Train
,
Tramway
, RideShare
} |
|
A public transport line.
Definition at line 19 of file line.h.
◆ Mode
Mode of transportation.
@toto direct copy from Navitia, we maybe can reduce that a bit
Enumerator |
---|
RideShare | peer-to-peer ride sharing/car pooling
|
Definition at line 27 of file line.h.
◆ color
Color of the line.
Definition at line 52 of file line.h.
◆ hasColor
bool KPublicTransport::Line::hasColor |
|
read |
true
if a line color is set.
Definition at line 54 of file line.h.
◆ hasLogo
bool KPublicTransport::Line::hasLogo |
|
read |
true
if the line has a logo.
Definition at line 74 of file line.h.
◆ hasModeLogo
bool KPublicTransport::Line::hasModeLogo |
|
read |
true
if the line has a mode logo.
Definition at line 85 of file line.h.
◆ hasTextColor
bool KPublicTransport::Line::hasTextColor |
|
read |
true
if a text color is set.
Definition at line 58 of file line.h.
◆ logo
QString KPublicTransport::Line::logo |
|
read |
Path of a local file containing the line logo.
A line logo is typically a simple icon containing the short line name and color. This is downloaded on demand, and therefore might not be available immediately.
Definition at line 72 of file line.h.
◆ mode
Type of transport.
Definition at line 60 of file line.h.
◆ modeLogo
QString KPublicTransport::Line::modeLogo |
|
read |
Path of a local file containing the line mode logo.
A mode logo is the logo of the mode of transportation, or "product" this line belongs to, such as the general logo for a subway or metro service of this operator or in this city. This is downloaded on demand, and therefore might not be available immediately.
Definition at line 83 of file line.h.
◆ modeString
QString KPublicTransport::Line::modeString |
|
readwrite |
Human readable representation of the type of transport.
This is not necessarily a simple 1:1 mapping from mode, but can contain e.g. a product name.
Definition at line 65 of file line.h.
◆ name
QString KPublicTransport::Line::name |
|
readwrite |
Name of the line.
Definition at line 50 of file line.h.
◆ operatorName
QString KPublicTransport::Line::operatorName |
|
readwrite |
Name of the operator running this line.
Definition at line 88 of file line.h.
◆ textColor
QColor KPublicTransport::Line::textColor |
|
readwrite |
Text color to use on top of the line color.
Definition at line 56 of file line.h.
◆ applyMetaData()
void Line::applyMetaData |
( |
const Location & | location, |
|
|
bool | download ) |
Look up line meta data and apply what is found.
- Parameters
-
location | A location on or close to the line. |
download | When set to true , not yet locally present logo URLs are retrieved. |
Definition at line 142 of file line.cpp.
◆ fromJson()
Deserialize an object from JSON.
- Note
- Line meta data isn't serialized, so you might need to call applyLineMetaData() again after loading a line.
Definition at line 165 of file line.cpp.
◆ hasColor()
bool Line::hasColor |
( |
| ) |
const |
◆ hasLogo()
bool Line::hasLogo |
( |
| ) |
const |
◆ hasModeLogo()
bool Line::hasModeLogo |
( |
| ) |
const |
◆ hasTextColor()
bool Line::hasTextColor |
( |
| ) |
const |
◆ isSame()
bool Line::isSame |
( |
const Line & | lhs, |
|
|
const Line & | rhs ) |
|
static |
Checks if to instances refer to the same line (which does not necessarily mean they are exactly equal).
Definition at line 92 of file line.cpp.
◆ logo()
◆ merge()
Merge two Line instances.
This assumes isSame(lhs, rhs) and tries to preserve the most detailed information.
Definition at line 120 of file line.cpp.
◆ modeLogo()
◆ toJson()
Serializes one object to JSON.
Definition at line 156 of file line.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:06 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.