18
18
#include " gui/components/maininfoareacomponent.h"
19
19
#include " gui/components/settingscomponent.h"
20
20
#include " gui/copyxswiftbusdialog.h"
21
- #include " gui/foreignwindows.h"
22
21
#include " gui/guiactionbind.h"
23
22
#include " gui/guiapplication.h"
24
23
#include " misc/aviation/altitude.h"
@@ -86,26 +85,6 @@ void SwiftGuiStd::onMenuClicked()
86
85
}
87
86
}
88
87
89
- void SwiftGuiStd::attachSimulatorWindow ()
90
- {
91
- this ->activateWindow (); // attaching requires active window
92
- QWindow *w = CForeignWindows::getFirstFoundSimulatorWindow ();
93
- if (!w)
94
- {
95
- CLogMessage (this ).warning (u" No simulator window found" );
96
- return ;
97
- }
98
- const bool a = CForeignWindows::setSimulatorAsParent (w, this );
99
- if (a) { CLogMessage (this ).info (u" Attached to simulator" ); }
100
- else { CLogMessage (this ).warning (u" No simulator window found" ); }
101
- }
102
-
103
- void SwiftGuiStd::detachSimulatorWindow ()
104
- {
105
- if (CForeignWindows::unsetSimulatorAsParent (this )) { CLogMessage (this ).info (u" Detached simulator window" ); }
106
- else { CLogMessage (this ).info (u" No simulator window to detach" ); }
107
- }
108
-
109
88
void SwiftGuiStd::initMenus ()
110
89
{
111
90
Q_ASSERT_X (ui->menu_InfoAreas , Q_FUNC_INFO, " No menu" );
@@ -114,13 +93,6 @@ void SwiftGuiStd::initMenus()
114
93
sGui ->addMenuFile (*ui->menu_File );
115
94
sGui ->addMenuInternals (*ui->menu_Internals );
116
95
sGui ->addMenuWindow (*ui->menu_Window );
117
- ui->menu_Window ->addSeparator ();
118
- QAction *a = ui->menu_Window ->addAction (" Attach simulator window" );
119
- bool c = connect (a, &QAction::triggered, this , &SwiftGuiStd::attachSimulatorWindow);
120
- Q_ASSERT_X (c, Q_FUNC_INFO, " connect failed" );
121
- a = ui->menu_Window ->addAction (" Detach simulator window" );
122
- c = connect (a, &QAction::triggered, this , &SwiftGuiStd::detachSimulatorWindow);
123
- Q_ASSERT_X (c, Q_FUNC_INFO, " connect failed" );
124
96
125
97
sGui ->addMenuHelp (*ui->menu_Help );
126
98
ui->menu_InfoAreas ->addActions (ui->comp_MainInfoArea ->getInfoAreaSelectActions (true , ui->menu_InfoAreas ));
@@ -130,7 +102,7 @@ void SwiftGuiStd::initMenus()
130
102
QAction *act = new QAction (CIcons::swift16 (), " Copy xswiftbus dialog" );
131
103
ui->menu_File ->insertAction (ui->menu_File ->actions ().at (5 ), act);
132
104
// clang-format off
133
- c = connect (act, &QAction::triggered, this ,
105
+ bool c = connect (act, &QAction::triggered, this ,
134
106
[=] { this ->copyXSwiftBusDialog (false ); }, Qt::QueuedConnection);
135
107
// clang-format on
136
108
Q_ASSERT_X (c, Q_FUNC_INFO, " connect failed" );
0 commit comments