swift
fsxsettingscomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_SIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
7 #define SWIFT_SIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 
15 
16 namespace Ui
17 {
18  class CFsxSettingsComponent;
19 }
20 namespace swift::gui
21 {
22  class COverlayMessagesFrame;
23 }
24 namespace swift::simplugin::fsxcommon
25 {
26  class CSimulatorFsxCommon;
27 
30  {
31  Q_OBJECT
32 
33  public:
35  explicit CFsxSettingsComponent(QWidget *parent = nullptr);
36 
38  virtual ~CFsxSettingsComponent() override;
39 
41  void setSimulator(const swift::misc::simulation::CSimulatorInfo &simulator) { m_simulator = simulator; }
42 
44  swift::misc::simulation::CSimulatorInfo getSimulator() const;
45 
47  void refresh();
48 
49  private:
51  void onSimConnectTraceChanged();
52 
54  void onEnableTerrainProbeChanged();
55 
57  void onSimulatedObjectChanged();
58 
60  void onSBOffsetsChanged();
61 
63  void onSimulatorStatusChanged(int status);
64 
66  void onSimulatorPluginChanged(const swift::misc::simulation::CSimulatorPluginInfo &info);
67 
69  CSimulatorFsxCommon *getFsxOrP3DSimulator() const;
70 
71  swift::misc::simulation::CSimulatorInfo m_simulator { "FSX" };
72  swift::gui::COverlayMessagesFrame *m_mf = nullptr;
73  QScopedPointer<Ui::CFsxSettingsComponent> ui;
74  };
75 } // namespace swift::simplugin::fsxcommon
76 
77 #endif // SWIFT_SIMPLUGIN_FSXCOMMON_FSXSETTINGSCOMPONENT_H
Using this class provides a QFrame with the overlay functionality already integrated.
Simple hardcoded info about the corresponding simulator.
Definition: simulatorinfo.h:41
void setSimulator(const swift::misc::simulation::CSimulatorInfo &simulator)
Simulator, P3D/FSX.
#define FSXCOMMON_EXPORT
FSXCommon Export Macro.
GUI related classes.