KPublicTransport

equipmentutil.cpp
1/*
2 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "equipmentutil.h"
8#include "notesutil_p.h"
9
10#include <KPublicTransport/Equipment>
11
12using namespace KPublicTransport;
13
14Equipment EquipmentUtil::merge(const Equipment &lhs, const Equipment &rhs)
15{
16 auto e = lhs;
17 e.setDisruptionEffect(std::max(lhs.disruptionEffect(), rhs.disruptionEffect()));
18 e.setNotes(NotesUtil::mergeNotes(lhs.notes(), rhs.notes()));
19 e.setType(std::max(lhs.type(), rhs.type()));
20 return e;
21}
Status information about equipment such as elevators or escalators.
Definition equipment.h:25
KPublicTransport::Disruption::Effect disruptionEffect
Disruption effect on this section, if any.
Definition equipment.h:38
QStringList notes
General human-readable notes on this service, e.g.
Definition equipment.h:40
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 Dec 6 2024 11:59:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.