swift
src
gui
components
copymodelsfromotherswiftversionscomponent.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_COPYMODELSFROMOTHERSWIFTVERSIONS_H
7
#define SWIFT_GUI_COMPONENTS_COPYMODELSFROMOTHERSWIFTVERSIONS_H
8
9
#include <QFrame>
10
#include <QScopedPointer>
11
#include <QWizardPage>
12
13
#include "
gui/overlaymessagesframe.h
"
14
#include "
misc/applicationinfo.h
"
15
#include "
misc/simulation/data/modelcaches.h
"
16
17
namespace
Ui
18
{
19
class
CCopyModelsFromOtherSwiftVersionsComponent;
20
}
21
namespace
swift::gui::components
22
{
26
class
CCopyModelsFromOtherSwiftVersionsComponent
:
public
COverlayMessagesFrame
27
{
28
Q_OBJECT
29
30
public
:
32
explicit
CCopyModelsFromOtherSwiftVersionsComponent
(
QWidget
*
parent
=
nullptr
);
33
35
virtual
~CCopyModelsFromOtherSwiftVersionsComponent
();
36
38
void
reloadOtherVersions
(
int
deferMs = -1);
39
40
private
:
42
void
copy();
43
45
bool
readDataFile(
const
QString
&modelFile,
swift::misc::simulation::CAircraftModelList
&models,
46
const
swift::misc::CApplicationInfo
&otherVersion,
47
const
swift::misc::simulation::CSimulatorInfo
&sim);
48
50
bool
confirmOverride(
const
QString
&msg);
51
53
void
onVersionChanged(
const
swift::misc::CApplicationInfo
&otherVersion);
54
55
QScopedPointer<Ui::CCopyModelsFromOtherSwiftVersionsComponent>
ui;
56
57
// caches will be explicitly initialized in copy
58
swift::misc::simulation::data::CModelCaches
m_modelCaches {
false
,
this
};
59
swift::misc::simulation::data::CModelSetCaches
m_modelSetCaches {
false
,
this
};
60
};
61
65
class
CCopyModelsFromOtherSwiftVersionsWizardPage
:
public
QWizardPage
66
{
67
Q_OBJECT
68
69
public
:
71
using
QWizardPage::QWizardPage
;
72
74
void
setConfigComponent
(
CCopyModelsFromOtherSwiftVersionsComponent
*config) { m_copyModels = config; }
75
77
virtual
void
initializePage
()
override
;
78
80
virtual
bool
validatePage
()
override
;
81
82
private
:
83
CCopyModelsFromOtherSwiftVersionsComponent
*m_copyModels =
nullptr
;
84
};
85
}
// namespace swift::gui::components
86
87
#endif
// SWIFT_GUI_COMPONENTS_COPYMODELSFROMOTHERSWIFTVERSIONS_H
applicationinfo.h
swift::gui::COverlayMessagesFrame
Using this class provides a QFrame with the overlay functionality already integrated.
Definition:
overlaymessagesframe.h:381
swift::gui::components::CCopyModelsFromOtherSwiftVersionsComponent
Copy models from another swift version.
Definition:
copymodelsfromotherswiftversionscomponent.h:27
swift::gui::components::CCopyModelsFromOtherSwiftVersionsComponent::reloadOtherVersions
void reloadOtherVersions(int deferMs=-1)
Reload other versions.
Definition:
copymodelsfromotherswiftversionscomponent.cpp:196
swift::gui::components::CCopyModelsFromOtherSwiftVersionsComponent::~CCopyModelsFromOtherSwiftVersionsComponent
virtual ~CCopyModelsFromOtherSwiftVersionsComponent()
Dtor.
Definition:
copymodelsfromotherswiftversionscomponent.cpp:39
swift::gui::components::CCopyModelsFromOtherSwiftVersionsComponent::CCopyModelsFromOtherSwiftVersionsComponent
CCopyModelsFromOtherSwiftVersionsComponent(QWidget *parent=nullptr)
Ctor.
Definition:
copymodelsfromotherswiftversionscomponent.cpp:27
swift::gui::components::CCopyModelsFromOtherSwiftVersionsWizardPage
Wizard page for CCopyModelsFromOtherSwiftVersionsComponent.
Definition:
copymodelsfromotherswiftversionscomponent.h:66
swift::gui::components::CCopyModelsFromOtherSwiftVersionsWizardPage::setConfigComponent
void setConfigComponent(CCopyModelsFromOtherSwiftVersionsComponent *config)
Set config.
Definition:
copymodelsfromotherswiftversionscomponent.h:74
swift::gui::components::CCopyModelsFromOtherSwiftVersionsWizardPage::validatePage
virtual bool validatePage()
Definition:
copymodelsfromotherswiftversionscomponent.cpp:207
swift::gui::components::CCopyModelsFromOtherSwiftVersionsWizardPage::initializePage
virtual void initializePage()
Definition:
copymodelsfromotherswiftversionscomponent.cpp:201
swift::misc::CApplicationInfo
Description of a swift application.
Definition:
applicationinfo.h:26
swift::misc::simulation::CAircraftModelList
Value object encapsulating a list of aircraft models.
Definition:
aircraftmodellist.h:60
swift::misc::simulation::CSimulatorInfo
Simple hardcoded info about the corresponding simulator.
Definition:
simulatorinfo.h:41
swift::misc::simulation::data::CModelCaches
Bundle of caches for all simulators.
Definition:
modelcaches.h:339
swift::misc::simulation::data::CModelSetCaches
Bundle of caches for model sets of all simulators.
Definition:
modelcaches.h:382
modelcaches.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::CCopyModelsFromOtherSwiftVersionsComponent >
QString
QWidget
QWizardPage
QWizardPage::QWizardPage
QWizardPage(QWidget *parent)
Generated on Sun Oct 12 2025 20:05:10 for swift by
1.9.1