swift
cockpitcomcomponent.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_COMPONENTS_COCKPITCOMCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_COCKPITCOMCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QScopedPointer>
12 
14 #include "gui/swiftguiexport.h"
15 #include "misc/aviation/selcal.h"
17 #include "misc/identifiable.h"
18 #include "misc/identifier.h"
20 
21 class QPaintEvent;
22 
23 namespace Ui
24 {
25  class CCockpitComComponent;
26 }
27 namespace swift::misc::aviation
28 {
29  class CComSystem;
30 }
31 namespace swift::gui::components
32 {
35  public QFrame,
38  {
39  Q_OBJECT
40 
41  public:
43  explicit CCockpitComComponent(QWidget *parent = nullptr);
44 
46  virtual ~CCockpitComComponent() override;
47 
49  void setTransponderModeStateIdent();
50 
51  signals:
54 
57 
63 
64  protected:
66  virtual void paintEvent(QPaintEvent *event) override;
67 
68  private:
70  void testSelcal();
71 
73  swift::misc::simulation::CSimulatedAircraft getOwnAircraft() const;
74 
76  bool updateOwnCockpitInContext(const swift::misc::simulation::CSimulatedAircraft &ownAircraft);
77 
79  void updateSelcalInContext(const swift::misc::aviation::CSelcal &selcal);
80 
82  void updateSelcalFromContext(const swift::misc::aviation::CSelcal &selcal,
83  const swift::misc::CIdentifier &originator);
84 
86  void updateCockpitFromContext(const swift::misc::simulation::CSimulatedAircraft &ownAircraft,
87  const swift::misc::CIdentifier &originator);
88 
90  void forceCockpitUpdateFromOwnAircraftContext();
91 
93  void onAtcStationsChanged();
94 
95  QScopedPointer<Ui::CCockpitComComponent> ui;
96  };
97 } // namespace swift::gui::components
98 
99 #endif // SWIFT_GUI_COMPONENTS_COCKPITCOMCOMPONENT_H
Helper class: If a component is residing in an dockable widget. This class provides access to its inf...
void requestCom1TextMessage()
Request COM text messages.
void transponderModeChanged(swift::misc::aviation::CTransponder::TransponderMode newMode)
Mode / state has been changed.
void requestCom2TextMessage()
Request COM text messages.
void transponderStateIdentEnded()
Ident phase ended.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Definition: identifiable.h:24
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition: identifier.h:29
Value object for SELCAL.
Definition: selcal.h:31
Comprehensive information of an aircraft.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.