swift
aircraftmodelvalidationcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 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_AIRCRAFTMODELVALIDATIONCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_AIRCRAFTMODELVALIDATIONCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 
13 #include "gui/swiftguiexport.h"
14 #include "misc/settingscache.h"
16 
17 namespace Ui
18 {
19  class CAircraftModelValidationComponent;
20 }
21 namespace swift::misc
22 {
23  class CStatusMessageList;
24  namespace simulation
25  {
26  class CSimulatorInfo;
27  class CAircraftModelList;
28  } // namespace simulation
29 } // namespace swift::misc
30 namespace swift::gui::components
31 {
36  {
37  Q_OBJECT
38 
39  public:
41  explicit CAircraftModelValidationComponent(QWidget *parent = nullptr);
42 
44  virtual ~CAircraftModelValidationComponent() override;
45 
48  void validatedModelSet(const swift::misc::simulation::CSimulatorInfo &simulator,
50  const swift::misc::simulation::CAircraftModelList &invalid, bool stopped,
52 
53  private:
54  QScopedPointer<Ui::CAircraftModelValidationComponent> ui;
56  this
57  };
58  qint64 m_lastResults = -1;
59 
61  void tempDisableModels(const swift::misc::simulation::CAircraftModelList &models);
62 
64  void onCheckAtStartupChanged(bool checked);
65 
67  void onOnlyErrorWarningChanged(bool checked);
68 
70  void triggerValidation();
71 
73  void requestLastResults();
74 
76  void onTempDisabledButtonClicked();
77 
79  void onRemoveButtonClicked();
80 
82  void showHelp();
83 
85  void saveInvalidModels(const swift::misc::simulation::CAircraftModelList &models) const;
86  };
87 } // namespace swift::gui::components
88 #endif // SWIFT_GUI_COMPONENTS_AIRCRAFTMODELVALIDATIONCOMPONENT_H
Using this class provides a QFrame with the overlay functionality already integrated.
Status messages, e.g. from Core -> GUI.
Value object encapsulating a list of aircraft models.
Simple hardcoded info about the corresponding simulator.
Definition: simulatorinfo.h:41
High level reusable GUI components.
Definition: aboutdialog.cpp:13
Free functions in swift::misc.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.