swift
firstmodelsetcomponent.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_GUI_COMPONENTS_FIRSTMODELSETCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_FIRSTMODELSETCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QWizardPage>
11 
14 #include "gui/swiftguiexport.h"
15 #include "misc/logcategories.h"
19 
20 namespace Ui
21 {
22  class CFirstModelSetComponent;
23 }
24 namespace swift::gui::components
25 {
26  class CDbOwnModelsDialog;
27  class CDbOwnModelsComponent;
28  class CDbOwnModelSetDialog;
29  class CDbOwnModelSetComponent;
30 
33  {
34  Q_OBJECT
35 
36  public:
38  static const QStringList &getLogCategories();
39 
41  explicit CFirstModelSetComponent(QWidget *parent = nullptr);
42 
44  virtual ~CFirstModelSetComponent();
45 
46  private:
47  QScopedPointer<Ui::CFirstModelSetComponent> ui;
48  QScopedPointer<CDbOwnModelsDialog> m_modelsDialog;
49  QScopedPointer<CDbOwnModelSetDialog> m_modelSetDialog;
51 
53  void onSimulatorChanged(const swift::misc::simulation::CSimulatorInfo &simulator);
54 
56  void onSettingsChanged(const swift::misc::simulation::CSimulatorInfo &simulator);
57 
59  void onModelsLoaded(const swift::misc::simulation::CSimulatorInfo &simulator, int count);
60 
62  void triggerSettingsChanged(const swift::misc::simulation::CSimulatorInfo &simulator);
63 
65  const CDbOwnModelsComponent *modelsComponent() const;
66 
68  const CDbOwnModelSetComponent *modelSetComponent() const;
69 
72 
74  void openOwnModelsDialog();
75 
77  void openOwnModelSetDialog();
78 
80  void changeModelDirectory();
81 
83  void createModelSet();
84 
86  QWidget *mainWindow();
87  };
88 
90  class CFirstModelSetWizardPage : public QWizardPage
91  {
92  Q_OBJECT
93 
94  public:
96  using QWizardPage::QWizardPage;
97 
99  void setFirstModelSet(CFirstModelSetComponent *firstModelSet) { m_firstModelSet = firstModelSet; }
100 
102  virtual bool validatePage() override;
103 
104  private:
105  CFirstModelSetComponent *m_firstModelSet = nullptr;
106  };
107 } // namespace swift::gui::components
108 #endif // SWIFT_GUI_COMPONENTS_FIRSTMODELSETCOMPONENT_H
Using this class provides a QFrame with the overlay functionality already integrated.
Handling of own models on disk (the models installed for the simulator)
CFirstModelSetComponent(QWidget *parent=nullptr)
Constructor.
static const QStringList & getLogCategories()
Log categories.
Wizard page for CFirstModelSetComponent.
void setFirstModelSet(CFirstModelSetComponent *firstModelSet)
Set config.
Simple hardcoded info about the corresponding simulator.
Definition: simulatorinfo.h:41
Load the aircraft for a simulator.
High level reusable GUI components.
Definition: aboutdialog.cpp:13