swift
Loading...
Searching...
No Matches
simulatedaircraftview.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_VIEWS_SIMULATEDAIRCRAFTVIEW_H
7#define SWIFT_GUI_VIEWS_SIMULATEDAIRCRAFTVIEW_H
8
9#include <QObject>
10
12#include "gui/swiftguiexport.h"
14#include "misc/pq/angle.h"
16
17namespace swift::misc
18{
19 namespace aviation
20 {
21 class CCallsign;
22 }
23 namespace simulation
24 {
26 }
27} // namespace swift::misc
28
29namespace swift::core::context
30{
32 class IContextNetwork;
33} // namespace swift::core::context
34namespace swift::gui
35{
36 namespace menus
37 {
38 class CMenuActions;
39 }
40 namespace views
41 {
43
46 public CViewWithCallsignObjects<models::CSimulatedAircraftListModel>
47 {
49
50 public:
52 explicit CSimulatedAircraftView(QWidget *parent = nullptr);
53
56
58 void configureMenu(bool menuRecalculate, bool menuHighlightAndFollow, bool menuEnableAircraft,
59 bool menuFastPositionUpdates, bool menuGndFlag, bool menuFlightPlan);
60
62 void configureMenuFastPositionUpdates(bool menuFastPositionUpdates);
63
64 signals:
67
70
71 protected:
73 void customMenu(menus::CMenuActions &menuActions) override;
74
75 private:
77 void requestTextMessage();
78
80 void toggleEnabledAircraft();
81
83 void toggleFastPositionUpdates();
84
86 void toggleSupportingGndFlag();
87
89 void requestFollowInSimulator();
90
93 void requestEnableParts();
94 void requestDisableParts();
96
99 void request0PitchOnGround();
100 void requestNullPitchOnGround();
102
104 void requestTempDisable();
105
107 void showPositionLogInSimulator();
108
110 void enableAllDisabledAircraft();
111
113 void disableAllEnabledAircraft();
114
116 void reEnableAllUnrenderedAircraft();
117
119 void enableOrDisableAircraft(const swift::misc::simulation::CSimulatedAircraftList &aircraft,
120 bool newEnabled);
121
123 static void followAircraftInSimulator(const swift::misc::simulation::CSimulatedAircraft &aircraft);
124
126 void enableParts(const swift::misc::simulation::CSimulatedAircraft &aircraft, bool enabled);
127
129 void setPitchOnGround(const swift::misc::simulation::CSimulatedAircraft &aircraft,
131
133 bool isSupportingAircraftParts(const swift::misc::aviation::CCallsign &cs) const;
134
136 void recalculateAllAircraft();
137
139 void doMatchingsAgain();
140
142 void doMatchingsAgainForSelected();
143
145 static void enableFastPositionUpdates(const swift::misc::simulation::CSimulatedAircraft &aircraft);
146
148 static void updateAircraftEnabled(const swift::misc::simulation::CSimulatedAircraft &aircraft);
149
151 static void updateAircraftSupportingGndFLag(const swift::misc::simulation::CSimulatedAircraft &aircraft);
152
154 void showFlightPlanDialog();
155
157 static swift::core::context::IContextSimulator *simulatorContext();
158
160 static swift::core::context::IContextNetwork *networkContext();
161
162 bool m_withRecalculate = true;
163 bool m_withMenuHighlightAndFollow = true;
164 bool m_withMenuEnableAircraft = true;
165 bool m_withMenuEnableGndFlag = true;
166 bool m_withMenuFastPosition = true;
167 bool m_withMenuFlightPlan = true;
168
169 CFlightPlanDialog *m_fpDialog = nullptr;
170 };
171 } // namespace views
172} // namespace swift::gui
173#endif // SWIFT_GUI_VIEWS_SIMULATEDAIRCRAFTVIEW_H
Bunch of CMenuAction objects.
Definition menuaction.h:384
Flight plan as dialog, also meant for other callsigns.
void customMenu(menus::CMenuActions &menuActions)
Method creating the menu.
void setAircraftMode(models::CSimulatedAircraftListModel::AircraftMode mode)
Mode.
CSimulatedAircraftView(QWidget *parent=nullptr)
Constructor.
void requestTextMessageWidget(const swift::misc::aviation::CCallsign &callsign)
Request a text message.
void requestTempDisableModelsForMatching(const swift::misc::simulation::CAircraftModelList &models)
Disable for matching.
void configureMenuFastPositionUpdates(bool menuFastPositionUpdates)
Configure fast position updates menu.
void configureMenu(bool menuRecalculate, bool menuHighlightAndFollow, bool menuEnableAircraft, bool menuFastPositionUpdates, bool menuGndFlag, bool menuFlightPlan)
Configure the menu.
Value object encapsulating information of a callsign.
Definition callsign.h:30
Physical unit angle (radians, degrees).
Definition angle.h:23
Value object encapsulating a list of aircraft models.
Comprehensive information of an aircraft.
Value object encapsulating a list of aircraft.
Models to be used with views, mainly QTableView.
Views, mainly QTableView.
GUI related classes.
Free functions in swift::misc.
Q_OBJECTQ_OBJECT
QObject * parent() const const
#define SWIFT_GUI_EXPORT
Export a class or function from the library.