KOSMIndoorMap

realtimeequipmentmodel.h
1 /*
2  SPDX-FileCopyrightText: 2020 Volker Krause <[email protected]>
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 namespace KPublicTransport {
13 class Equipment;
14 }
15 
16 class QAbstractItemModel;
17 
18 namespace KOSMIndoorMap {
19 
20 /** Elevator/escalator overlay source augmented with realtime status data where available. */
22 {
23  Q_OBJECT
24  Q_PROPERTY(QObject* realtimeModel READ realtimeModel WRITE setRealtimeModel NOTIFY realtimeModelChanged)
25 
26 public:
27  explicit RealtimeEquipmentModel(QObject *parent = nullptr);
29 
30  QObject *realtimeModel() const;
31  void setRealtimeModel(QObject *model);
32 
33 Q_SIGNALS:
34  void realtimeModelChanged();
35 
36 private:
37  void updateRealtimeState();
38  void updateEquipment(Equipment &eq, const KPublicTransport::Equipment &rtEq) const;
39  void resolveEquipmentPair(int eqRow1, int eqRow2, int rtRow1, int rtRow2);
40 
41  QPointer<QAbstractItemModel> m_realtimeModel;
42  bool m_pendingRealtimeUpdate = false;
43 };
44 
45 }
46 
47 #endif // KOSMINDOORMAP_REALTIMEEQUIPMENTMODEL_H
OSM-based multi-floor indoor maps for buildings.
Elevator/escalator overlay source augmented with realtime status data where available.
Elevator or escalator element.
Overlay source for elevators and escalators.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 23:04:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.