swift
settingssimulatorcomponent.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_SETTINGSSIMULATORCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_SETTINGSSIMULATORCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QScopedPointer>
12 #include <QString>
13 
15 #include "gui/swiftguiexport.h"
16 #include "misc/settingscache.h"
19 
20 namespace Ui
21 {
22  class CSettingsSimulatorComponent;
23 }
24 namespace swift::core
25 {
26  class CPluginManagerSimulator;
27 }
28 namespace swift::misc::simulation
29 {
30  class CSimulatorPluginInfo;
31 }
32 namespace swift::gui::components
33 {
36  {
37  Q_OBJECT
38 
39  public:
41  explicit CSettingsSimulatorComponent(QWidget *parent = nullptr);
42 
44  virtual ~CSettingsSimulatorComponent() override;
45 
46  private:
48  void pluginStateChanged(const QString &identifier, bool enabled);
49 
51  void onApplyMaxRenderedAircraft();
52 
54  void onApplyMaxRenderedDistance();
55 
57  void onApplyDisableRendering();
58 
60  void onApplyComSync();
61 
63  void onApplyCGSource();
64 
66  void onApplyRecordGnd();
67 
69  void onReload();
70 
72  void onEnabledSimulatorsChanged();
73 
75  void clearRestricedRendering();
76 
78  void simulatorPluginChanged(const swift::misc::simulation::CSimulatorPluginInfo &info);
79 
81  void showPluginConfig(const QString &identifier);
82 
84  void reloadPluginConfig(const swift::misc::simulation::CSimulatorPluginInfoList &plugins);
85 
87  void checkSimulatorPlugins();
88 
90  void setGuiValues();
91 
93  static swift::misc::simulation::CSimulatorPluginInfoList getAvailablePlugins();
94 
96  static swift::misc::simulation::settings::CSimulatorSettings getSimulatorSettings(bool &ok);
97 
99  static void setSimulatorSettings(swift::misc::simulation::settings::CSimulatorSettings &settings);
100 
101  QScopedPointer<Ui::CSettingsSimulatorComponent> ui;
102  bool m_pluginLoaded = false;
103  swift::core::CPluginManagerSimulator *m_plugins = nullptr;
105  this, &CSettingsSimulatorComponent::onEnabledSimulatorsChanged
106  };
107  };
108 } // namespace swift::gui::components
109 
110 #endif // SWIFT_GUI_COMPONENTS_SETTINGSSIMULATORCOMPONENT_H
Manages plugins for the simulator context.
Value object encapsulating a list of SimulatorInfo objects.
Settings for simulator Driver independent parts (such as directories), also used in model loaders.
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.