#include <line.h>
|
enum | Mode {
Unknown
, Air
, Boat
, Bus
,
Coach
, Ferry
, Funicular
, LocalTrain
,
LongDistanceTrain
, Metro
, RailShuttle
, RapidTransit
,
Shuttle
, Taxi
, Train
, Tramway
,
RideShare
, AerialLift
} |
|
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 |
---|
RailShuttle | rail shuttle service within a complex, as e.g. found at or around airports
|
Shuttle | shuttle bus/coach services, e.g. to/from an airport
|
RideShare | peer-to-peer ride sharing/car pooling
|
AerialLift | aerial cable cars, gondolas, etc
|
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.
◆ iconName
QString KPublicTransport::Line::iconName |
|
read |
The best available icon for this line.
Either the line logo, mode logo or generic mode icon. Can be a file: or qrc: URI or a XDG icon name.
- Note
- Line and product logos are full-color, the generic ones are monochrome colorable Breeze SVG icons.
Definition at line 102 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.
◆ modeIconName
QString KPublicTransport::Line::modeIconName |
|
read |
◆ 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 217 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 240 of file line.cpp.
◆ hasColor()
bool Line::hasColor |
( |
| ) |
const |
|
nodiscard |
◆ hasLogo()
bool Line::hasLogo |
( |
| ) |
const |
|
nodiscard |
◆ hasModeLogo()
bool Line::hasModeLogo |
( |
| ) |
const |
|
nodiscard |
◆ hasTextColor()
bool Line::hasTextColor |
( |
| ) |
const |
|
nodiscard |
◆ iconName()
◆ isSame()
bool Line::isSame |
( |
const Line & | lhs, |
|
|
const Line & | rhs ) |
|
staticnodiscard |
Checks if to instances refer to the same line (which does not necessarily mean they are exactly equal).
Definition at line 167 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 195 of file line.cpp.
◆ modeIconName() [1/2]
QString Line::modeIconName |
( |
| ) |
const |
|
nodiscard |
◆ modeIconName() [2/2]
Name of an icon to represent mode
.
Can be an qrc: URL or a icon name compatbile with QIcon::fromTheme.
Definition at line 98 of file line.cpp.
◆ modeIsRailBound()
true
if mode
is bounds to rail tracks.
Definition at line 139 of file line.cpp.
◆ modeLogo()
◆ toJson()
Serializes one object to JSON.
Definition at line 231 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 Sat Dec 21 2024 16:59:57 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.