swift
atcstationlistmodel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_MODELS_ATCLISTMODEL_H
7 #define SWIFT_GUI_MODELS_ATCLISTMODEL_H
8 
9 #include <QObject>
10 
12 #include "gui/swiftguiexport.h"
15 
16 namespace swift::gui::models
17 {
18  class CAtcStationTreeModel;
19 
22  public CListModelCallsignObjects<swift::misc::aviation::CAtcStationList, true>
23  {
24  Q_OBJECT
25 
26  public:
29  {
30  NotSet,
31  StationsOnline
32  };
33 
35  explicit CAtcStationListModel(AtcStationMode stationMode, QObject *parent = nullptr);
36 
38  virtual ~CAtcStationListModel() override {}
39 
41  void setStationMode(AtcStationMode stationMode);
42 
44  AtcStationMode getStationMode() const { return this->m_stationMode; }
45 
47  CAtcStationTreeModel *toAtcTreeModel() const;
48 
49  public slots:
51  void changedAtcStationConnectionStatus(const swift::misc::aviation::CAtcStation &station, bool added);
52 
53  private:
54  AtcStationMode m_stationMode = NotSet;
55  };
56 } // namespace swift::gui::models
57 
58 #endif // SWIFT_GUI_MODELS_ATCLISTMODEL_H
AtcStationMode getStationMode() const
Station mode.
List model for callsign based objects (callsign is unique key)
Value object encapsulating information about an ATC station.
Definition: atcstation.h:38
Models to be used with views, mainly QTableView.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.