swift
src
gui
components
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
12
#include "
core/application/applicationsettings.h
"
13
#include "
gui/overlaymessagesframe.h
"
14
#include "
gui/swiftguiexport.h
"
15
#include "
misc/logcategories.h
"
16
#include "
misc/simulation/aircraftmodelloader.h
"
17
#include "
misc/simulation/settings/simulatorsettings.h
"
18
#include "
misc/simulation/simulatorinfo.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
32
class
CFirstModelSetComponent
:
public
COverlayMessagesFrame
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;
50
swift::misc::simulation::settings::CMultiSimulatorSettings
m_simulatorSettings {
this
};
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
71
swift::misc::simulation::IAircraftModelLoader
*modelLoader()
const
;
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
aircraftmodelloader.h
applicationsettings.h
swift::gui::COverlayMessagesFrame
Using this class provides a QFrame with the overlay functionality already integrated.
Definition:
overlaymessagesframe.h:381
swift::gui::components::CDbOwnModelSetComponent
Handling of the own model set.
Definition:
dbownmodelsetcomponent.h:64
swift::gui::components::CDbOwnModelsComponent
Handling of own models on disk (the models installed for the simulator)
Definition:
dbownmodelscomponent.h:62
swift::gui::components::CFirstModelSetComponent
Create a first model set.
Definition:
firstmodelsetcomponent.h:33
swift::gui::components::CFirstModelSetComponent::CFirstModelSetComponent
CFirstModelSetComponent(QWidget *parent=nullptr)
Constructor.
Definition:
firstmodelsetcomponent.cpp:37
swift::gui::components::CFirstModelSetComponent::~CFirstModelSetComponent
virtual ~CFirstModelSetComponent()
Destructor.
Definition:
firstmodelsetcomponent.cpp:69
swift::gui::components::CFirstModelSetComponent::getLogCategories
static const QStringList & getLogCategories()
Log categories.
Definition:
firstmodelsetcomponent.cpp:31
swift::gui::components::CFirstModelSetWizardPage
Wizard page for CFirstModelSetComponent.
Definition:
firstmodelsetcomponent.h:91
swift::gui::components::CFirstModelSetWizardPage::validatePage
virtual bool validatePage()
Definition:
firstmodelsetcomponent.cpp:305
swift::gui::components::CFirstModelSetWizardPage::setFirstModelSet
void setFirstModelSet(CFirstModelSetComponent *firstModelSet)
Set config.
Definition:
firstmodelsetcomponent.h:99
swift::misc::simulation::CSimulatorInfo
Simple hardcoded info about the corresponding simulator.
Definition:
simulatorinfo.h:41
swift::misc::simulation::IAircraftModelLoader
Load the aircraft for a simulator.
Definition:
aircraftmodelloader.h:39
swift::misc::simulation::settings::CMultiSimulatorSettings
Bundle of settings for all simulators.
Definition:
simulatorsettings.h:485
logcategories.h
swift::gui::components
High level reusable GUI components.
Definition:
aboutdialog.cpp:13
overlaymessagesframe.h
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QScopedPointer< Ui::CFirstModelSetComponent >
QStringList
QWidget
QWizardPage
QWizardPage::QWizardPage
QWizardPage(QWidget *parent)
simulatorinfo.h
simulatorsettings.h
swiftguiexport.h
Generated on Sun Oct 12 2025 20:05:10 for swift by
1.9.1