KOSMIndoorMap

realtimeequipmentmodel.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 KOSMINDOORMAP_REALTIMEEQUIPMENTMODEL_H
8#define KOSMINDOORMAP_REALTIMEEQUIPMENTMODEL_H
9
10#include <KOSMIndoorMap/EquipmentModel>
11
12#include <qqmlregistration.h>
13
14namespace KPublicTransport {
15class Equipment;
16}
17
19
20namespace KOSMIndoorMap {
21
22/** Elevator/escalator overlay source augmented with realtime status data where available. */
24{
26 Q_PROPERTY(QObject* realtimeModel READ realtimeModel WRITE setRealtimeModel NOTIFY realtimeModelChanged)
27 QML_ELEMENT
28
29public:
30 explicit RealtimeEquipmentModel(QObject *parent = nullptr);
32
33 QObject *realtimeModel() const;
34 void setRealtimeModel(QObject *model);
35
37 void realtimeModelChanged();
38
39private:
40 void updateRealtimeState();
41 void updateEquipment(Equipment &eq, const KPublicTransport::Equipment &rtEq) const;
42 void resolveEquipmentPair(int eqRow1, int eqRow2, int rtRow1, int rtRow2);
43
44 QPointer<QAbstractItemModel> m_realtimeModel;
45 bool m_pendingRealtimeUpdate = false;
46};
47
48}
49
50#endif // KOSMINDOORMAP_REALTIMEEQUIPMENTMODEL_H
Overlay source for elevators and escalators.
Elevator or escalator element.
Elevator/escalator overlay source augmented with realtime status data where available.
OSM-based multi-floor indoor maps for buildings.
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.