swift
src
gui
components
copysettingsandcachescomponent.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_COPYSETTINGSANDCACHESCOMPONENT_H
7
#define SWIFT_GUI_COMPONENTS_COPYSETTINGSANDCACHESCOMPONENT_H
8
9
#include <QCheckBox>
10
#include <QList>
11
#include <QScopedPointer>
12
#include <QWizardPage>
13
14
#include "
core/application/applicationsettings.h
"
15
#include "
core/application/updatesettings.h
"
16
#include "
core/audio/audiosettings.h
"
17
#include "
core/data/launchersetup.h
"
18
#include "
core/data/vatsimsetup.h
"
19
#include "
gui/overlaymessagesframe.h
"
20
#include "
gui/settings/dockwidgetsettings.h
"
21
#include "
gui/settings/guisettings.h
"
22
#include "
gui/settings/textmessagesettings.h
"
23
#include "
gui/settings/viewupdatesettings.h
"
24
#include "
gui/swiftguiexport.h
"
25
#include "
misc/applicationinfo.h
"
26
#include "
misc/audio/audiosettings.h
"
27
#include "
misc/directories.h
"
28
#include "
misc/network/data/lastserver.h
"
29
#include "
misc/network/settings/serversettings.h
"
30
#include "
misc/simulation/data/lastmodel.h
"
31
#include "
misc/simulation/data/modelcaches.h
"
32
#include "
misc/simulation/settings/modelsettings.h
"
33
#include "
misc/simulation/settings/simulatorsettings.h
"
34
35
namespace
Ui
36
{
37
class
CCopySettingsAndCachesComponent;
38
}
39
namespace
swift::gui::components
40
{
44
class
CCopySettingsAndCachesComponent
:
public
COverlayMessagesFrame
45
{
46
Q_OBJECT
47
48
public
:
50
explicit
CCopySettingsAndCachesComponent
(
QWidget
*
parent
=
nullptr
);
51
53
~CCopySettingsAndCachesComponent
()
override
;
54
56
void
reloadOtherVersions
(
int
deferMs = -1);
57
58
private
:
60
void
onOtherVersionChanged(
const
swift::misc::CApplicationInfo
&info);
61
63
void
initAll();
64
66
void
initAudio();
67
69
void
initNetwork();
70
72
void
initUi();
73
75
void
initSimulator();
76
78
void
initMisc();
79
81
void
initModel();
82
84
int
copy();
85
87
void
selectAll();
88
90
void
deselectAll();
91
93
QList<QCheckBox *>
checkBoxes()
const
;
94
96
bool
parsingMessage(
bool
success,
const
QString
&msg,
const
QString
&value);
97
99
void
displayStatusMessage(
const
swift::misc::CStatusMessage
&msg,
const
QString
&value);
100
102
void
allCheckBoxesReadOnly();
103
105
static
void
readOnlyCheckbox(
QCheckBox
*cb,
bool
readOnly);
106
108
static
QString
checkBoxText(
const
QString
&text,
bool
setting);
109
110
QScopedPointer<Ui::CCopySettingsAndCachesComponent>
ui;
111
112
swift::misc::CSetting<swift::core::audio::TInputDevice>
m_settingsAudioInputDevice {
this
};
113
swift::misc::CSetting<swift::core::audio::TOutputDevice>
m_settingsAudioOutputDevice {
this
};
114
swift::misc::CSetting<settings::TGeneralGui>
m_settingsGuiGeneral {
this
};
115
swift::misc::CSetting<settings::TDockWidget>
m_settingsDockWidget {
this
};
116
swift::misc::CSetting<settings::TViewUpdateSettings>
m_settingsViewUpdate {
this
};
117
swift::misc::CSetting<settings::TBackgroundConsolidation>
m_settingsConsolidation {
118
this
119
};
120
swift::misc::CSetting<settings::TextMessageSettings>
m_settingsTextMessage {
this
};
121
swift::misc::CSetting<swift::core::application::TEnabledSimulators>
m_settingsEnabledSimulators {
this
};
122
swift::misc::CSetting<swift::core::application::TActionHotkeys>
m_settingsActionHotkeys {
this
};
123
swift::misc::CSetting<swift::misc::audio::TSettings>
m_settingsAudio {
this
};
124
swift::misc::CSetting<swift::misc::settings::TDirectorySettings>
m_settingsDirectories {
this
};
125
swift::misc::CSetting<swift::misc::network::settings::TTrafficServers>
m_settingsNetworkServers {
this
};
126
swift::misc::CSetting<swift::misc::simulation::settings::TSimulatorFsx>
m_settingsSimulatorFsx {
127
this
128
};
129
swift::misc::CSetting<swift::misc::simulation::settings::TSimulatorFs9>
m_settingsSimulatorFs9 {
130
this
131
};
132
swift::misc::CSetting<swift::misc::simulation::settings::TSimulatorP3D>
m_settingsSimulatorP3D {
133
this
134
};
135
swift::misc::CSetting<swift::misc::simulation::settings::TSimulatorXP>
m_settingsSimulatorXPlane {
136
this
137
};
138
swift::misc::CSetting<swift::misc::simulation::settings::TModel>
m_settingsModel {
this
};
139
140
swift::misc::CData<swift::core::data::TVatsimLastServer>
m_cacheLastVatsimServer {
141
this
142
};
143
swift::misc::CData<swift::core::data::TLauncherSetup>
m_cacheLauncherSetup {
this
};
144
swift::misc::CData<swift::core::data::TVatsimSetup>
m_cacheVatsimSetup {
this
};
145
swift::misc::CData<swift::misc::network::data::TLastServer>
m_cacheLastNetworkServer {
146
this
147
};
148
swift::misc::CData<swift::misc::simulation::data::TSimulatorLastSelection>
m_cacheModelSetCurrentSimulator {
149
this
150
};
151
swift::misc::CData<swift::misc::simulation::data::TModelCacheLastSelection>
m_cacheModelsCurrentSimulator {
152
this
153
};
154
swift::misc::CData<swift::misc::simulation::data::TLastModel>
m_cacheLastAircraftModel {
155
this
156
};
157
};
158
162
class
CCopySettingsAndCachesWizardPage
:
public
QWizardPage
163
{
164
public
:
166
using
QWizardPage::QWizardPage
;
167
169
void
setConfigComponent
(
CCopySettingsAndCachesComponent
*config) { m_copyCachesAndSettings = config; }
170
172
void
initializePage
()
override
;
173
175
bool
validatePage
()
override
;
176
177
private
:
178
CCopySettingsAndCachesComponent
*m_copyCachesAndSettings =
nullptr
;
179
};
180
}
// namespace swift::gui::components
181
182
#endif
// SWIFT_GUI_COMPONENTS_COPYSETTINGSANDCACHESCOMPONENT_H
applicationinfo.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::CCopySettingsAndCachesComponent
Copy settings and caches.
Definition:
copysettingsandcachescomponent.h:45
swift::gui::components::CCopySettingsAndCachesComponent::CCopySettingsAndCachesComponent
CCopySettingsAndCachesComponent(QWidget *parent=nullptr)
Ctor.
Definition:
copysettingsandcachescomponent.cpp:34
swift::gui::components::CCopySettingsAndCachesComponent::reloadOtherVersions
void reloadOtherVersions(int deferMs=-1)
Reload other versions.
Definition:
copysettingsandcachescomponent.cpp:49
swift::gui::components::CCopySettingsAndCachesComponent::~CCopySettingsAndCachesComponent
~CCopySettingsAndCachesComponent()
Dtor.
swift::gui::components::CCopySettingsAndCachesWizardPage
Wizard page for CCopySettingsAndCaches.
Definition:
copysettingsandcachescomponent.h:163
swift::gui::components::CCopySettingsAndCachesWizardPage::initializePage
void initializePage()
Definition:
copysettingsandcachescomponent.cpp:495
swift::gui::components::CCopySettingsAndCachesWizardPage::validatePage
bool validatePage()
Definition:
copysettingsandcachescomponent.cpp:501
swift::gui::components::CCopySettingsAndCachesWizardPage::setConfigComponent
void setConfigComponent(CCopySettingsAndCachesComponent *config)
Set config.
Definition:
copysettingsandcachescomponent.h:169
swift::misc::CApplicationInfo
Description of a swift application.
Definition:
applicationinfo.h:26
swift::misc::CData< swift::core::data::TVatsimLastServer >
swift::misc::CSetting< swift::core::audio::TInputDevice >
swift::misc::CStatusMessage
Streamable status message, e.g.
Definition:
statusmessage.h:394
audiosettings.h
directories.h
dockwidgetsettings.h
guisettings.h
lastmodel.h
lastserver.h
launchersetup.h
audiosettings.h
modelcaches.h
modelsettings.h
swift::gui::components
High level reusable GUI components.
Definition:
aboutdialog.cpp:14
overlaymessagesframe.h
QCheckBox
QList< QCheckBox * >
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QScopedPointer< Ui::CCopySettingsAndCachesComponent >
QString
QWidget
QWizardPage
QWizardPage::QWizardPage
QWizardPage(QWidget *parent)
serversettings.h
simulatorsettings.h
swiftguiexport.h
textmessagesettings.h
updatesettings.h
vatsimsetup.h
viewupdatesettings.h
Generated on Thu Nov 20 2025 23:56:09 for swift by
1.9.1