mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
refactor: Rename blackgui to swift::gui
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
#include "swiftguistd.h"
|
||||
#include "swiftguistdapplication.h"
|
||||
|
||||
#include "blackgui/enableforframelesswindow.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include "gui/enableforframelesswindow.h"
|
||||
#include "gui/guiapplication.h"
|
||||
#include "gui/guiutility.h"
|
||||
#include "misc/audio/audioutils.h"
|
||||
#include "misc/crashhandler.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
using namespace BlackGui;
|
||||
using namespace swift::gui;
|
||||
using namespace swift::misc;
|
||||
using namespace swift::misc::audio;
|
||||
using namespace swift::core;
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
#include "ui_swiftguistd.h"
|
||||
|
||||
#include "blackgui/components/infobarstatuscomponent.h"
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/components/dbloaddatadialog.h"
|
||||
#include "blackgui/components/autopublishdialog.h"
|
||||
#include "blackgui/components/modelbrowserdialog.h"
|
||||
#include "blackgui/components/settingscomponent.h"
|
||||
#include "blackgui/components/textmessagecomponent.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/guiutility.h"
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "gui/components/infobarstatuscomponent.h"
|
||||
#include "gui/components/logcomponent.h"
|
||||
#include "gui/components/dbloaddatadialog.h"
|
||||
#include "gui/components/autopublishdialog.h"
|
||||
#include "gui/components/modelbrowserdialog.h"
|
||||
#include "gui/components/settingscomponent.h"
|
||||
#include "gui/components/textmessagecomponent.h"
|
||||
#include "gui/guiapplication.h"
|
||||
#include "gui/guiutility.h"
|
||||
#include "gui/overlaymessagesframe.h"
|
||||
#include "core/context/contextapplication.h"
|
||||
#include "core/context/contextaudio.h"
|
||||
#include "core/context/contextnetwork.h"
|
||||
@@ -48,7 +48,7 @@ class QEvent;
|
||||
class QMouseEvent;
|
||||
class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
namespace swift::gui
|
||||
{
|
||||
class CEnableForFramelessWindow;
|
||||
class IMainWindowAccess;
|
||||
@@ -60,8 +60,8 @@ namespace swift::misc
|
||||
|
||||
using namespace swift::core;
|
||||
using namespace swift::core::context;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Components;
|
||||
using namespace swift::gui;
|
||||
using namespace swift::gui::components;
|
||||
using namespace swift::misc;
|
||||
using namespace swift::misc::network;
|
||||
using namespace swift::misc::aviation;
|
||||
@@ -73,10 +73,10 @@ using namespace swift::misc::simulation;
|
||||
using namespace swift::config;
|
||||
|
||||
// Constructor
|
||||
SwiftGuiStd::SwiftGuiStd(BlackGui::CEnableForFramelessWindow::WindowMode windowMode, QWidget *parent) : QMainWindow(parent, CEnableForFramelessWindow::modeToWindowFlags(windowMode)),
|
||||
CIdentifiable(this),
|
||||
CEnableForFramelessWindow(windowMode, true, "framelessMainWindow", this),
|
||||
ui(new Ui::SwiftGuiStd)
|
||||
SwiftGuiStd::SwiftGuiStd(swift::gui::CEnableForFramelessWindow::WindowMode windowMode, QWidget *parent) : QMainWindow(parent, CEnableForFramelessWindow::modeToWindowFlags(windowMode)),
|
||||
CIdentifiable(this),
|
||||
CEnableForFramelessWindow(windowMode, true, "framelessMainWindow", this),
|
||||
ui(new Ui::SwiftGuiStd)
|
||||
{
|
||||
// GUI
|
||||
Q_ASSERT_X(sGui, Q_FUNC_INFO, "Need sGui");
|
||||
@@ -584,7 +584,7 @@ void SwiftGuiStd::onShowOverlayVariant(const CVariant &variant, int durationMs)
|
||||
ui->fr_CentralFrameInside->showOverlayVariant(variant, durationMs);
|
||||
}
|
||||
|
||||
void SwiftGuiStd::onShowOverlayInlineTextMessageTab(Components::TextMessageTab tab)
|
||||
void SwiftGuiStd::onShowOverlayInlineTextMessageTab(components::TextMessageTab tab)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
ui->fr_CentralFrameInside->showOverlayInlineTextMessage(tab);
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
#ifndef STDGUI_SWIFTGUISTD_H
|
||||
#define STDGUI_SWIFTGUISTD_H
|
||||
|
||||
#include "blackgui/components/maininfoareacomponent.h"
|
||||
#include "blackgui/components/navigatordialog.h"
|
||||
#include "blackgui/components/aircraftmodelsetvalidationdialog.h"
|
||||
#include "blackgui/components/textmessagecomponenttab.h"
|
||||
#include "blackgui/enableforframelesswindow.h"
|
||||
#include "blackgui/mainwindowaccess.h"
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackgui/guiactionbind.h"
|
||||
#include "gui/components/maininfoareacomponent.h"
|
||||
#include "gui/components/navigatordialog.h"
|
||||
#include "gui/components/aircraftmodelsetvalidationdialog.h"
|
||||
#include "gui/components/textmessagecomponenttab.h"
|
||||
#include "gui/enableforframelesswindow.h"
|
||||
#include "gui/mainwindowaccess.h"
|
||||
#include "gui/managedstatusbar.h"
|
||||
#include "gui/guiactionbind.h"
|
||||
#include "core/actionbind.h"
|
||||
#include "misc/network/connectionstatus.h"
|
||||
#include "misc/simulation/simulatedaircraft.h"
|
||||
@@ -43,7 +43,7 @@ namespace swift::misc::aviation
|
||||
{
|
||||
class CAltitude;
|
||||
}
|
||||
namespace BlackGui::Components
|
||||
namespace swift::gui::components
|
||||
{
|
||||
class CDbLoadDataDialog;
|
||||
class CAutoPublishDialog;
|
||||
@@ -58,11 +58,11 @@ namespace Ui
|
||||
class SwiftGuiStd :
|
||||
public QMainWindow,
|
||||
public swift::misc::CIdentifiable,
|
||||
public BlackGui::CEnableForFramelessWindow,
|
||||
public BlackGui::IMainWindowAccess
|
||||
public swift::gui::CEnableForFramelessWindow,
|
||||
public swift::gui::IMainWindowAccess
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackGui::IMainWindowAccess)
|
||||
Q_INTERFACES(swift::gui::IMainWindowAccess)
|
||||
|
||||
public:
|
||||
//! Main page indexes
|
||||
@@ -118,15 +118,15 @@ protected:
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::SwiftGuiStd> ui;
|
||||
QScopedPointer<BlackGui::Components::CNavigatorDialog> m_navigator { new BlackGui::Components::CNavigatorDialog() }; //!< navigator dialog bar, if I pass the parent, the dialog is always centered over the parent
|
||||
QScopedPointer<BlackGui::Components::CDbLoadDataDialog> m_dbLoadDialog; //!< load DB data, lazy init UI component
|
||||
QScopedPointer<BlackGui::Components::CAutoPublishDialog> m_autoPublishDialog; //!< auto publish dialog
|
||||
QScopedPointer<BlackGui::Components::CModelBrowserDialog> m_modelBrower; //!< model browser
|
||||
QScopedPointer<BlackGui::Components::CAircraftModelSetValidationDialog> m_validationDialog; //!< aircraft model validation dialog
|
||||
QScopedPointer<swift::gui::components::CNavigatorDialog> m_navigator { new swift::gui::components::CNavigatorDialog() }; //!< navigator dialog bar, if I pass the parent, the dialog is always centered over the parent
|
||||
QScopedPointer<swift::gui::components::CDbLoadDataDialog> m_dbLoadDialog; //!< load DB data, lazy init UI component
|
||||
QScopedPointer<swift::gui::components::CAutoPublishDialog> m_autoPublishDialog; //!< auto publish dialog
|
||||
QScopedPointer<swift::gui::components::CModelBrowserDialog> m_modelBrower; //!< model browser
|
||||
QScopedPointer<swift::gui::components::CAircraftModelSetValidationDialog> m_validationDialog; //!< aircraft model validation dialog
|
||||
swift::misc::CData<swift::misc::simulation::data::TLastAutoPublish> m_lastAutoPublish { this };
|
||||
swift::core::CActionBind m_actionPtt { swift::misc::input::pttHotkeyAction(), swift::misc::CIcons::StandardIconRadio16, this, &SwiftGuiStd::onPttChanged };
|
||||
swift::core::CActionBindings m_menuHotkeyHandlers;
|
||||
BlackGui::CManagedStatusBar m_statusBar;
|
||||
swift::gui::CManagedStatusBar m_statusBar;
|
||||
swift::misc::CLogHistoryReplica m_logHistoryForLogButtons { this };
|
||||
swift::misc::CLogHistoryReplica m_logHistoryForOverlay { this };
|
||||
swift::misc::CSetting<swift::misc::audio::TSettings> m_audioSettings { this };
|
||||
@@ -222,7 +222,7 @@ private:
|
||||
void setMainPage(MainPageIndex mainPage);
|
||||
|
||||
//! Set the main info area
|
||||
void setMainPageInfoArea(BlackGui::Components::CMainInfoAreaComponent::InfoArea infoArea);
|
||||
void setMainPageInfoArea(swift::gui::components::CMainInfoAreaComponent::InfoArea infoArea);
|
||||
|
||||
//! Display the settings page
|
||||
void setSettingsPage(int settingsTabIndex = -1);
|
||||
@@ -322,7 +322,7 @@ private:
|
||||
//! @{
|
||||
//! Request overlay inline text message
|
||||
void onShowOverlayVariant(const swift::misc::CVariant &variant, int durationMs);
|
||||
void onShowOverlayInlineTextMessageTab(BlackGui::Components::TextMessageTab tab);
|
||||
void onShowOverlayInlineTextMessageTab(swift::gui::components::TextMessageTab tab);
|
||||
void onShowOverlayInlineTextMessageCallsign(const swift::misc::aviation::CCallsign &callsign);
|
||||
//! @}
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::COverlayMessagesFrame" name="fr_CentralFrameInside">
|
||||
<widget class="swift::gui::COverlayMessagesFrame" name="fr_CentralFrameInside">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -126,7 +126,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CMainInfoAreaComponent" name="comp_MainInfoArea" native="true"/>
|
||||
<widget class="swift::gui::components::CMainInfoAreaComponent" name="comp_MainInfoArea" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -148,7 +148,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CLoginComponent" name="comp_Login" native="true"/>
|
||||
<widget class="swift::gui::components::CLoginComponent" name="comp_Login" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -170,14 +170,14 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CInternalsComponent" name="comp_Internals" native="true"/>
|
||||
<widget class="swift::gui::components::CInternalsComponent" name="comp_Internals" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CMainKeypadAreaComponent" name="comp_MainKeypadArea">
|
||||
<widget class="swift::gui::components::CMainKeypadAreaComponent" name="comp_MainKeypadArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -301,7 +301,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="BlackGui::CDockWidgetInfoBar" name="dw_InfoBarStatus">
|
||||
<widget class="swift::gui::CDockWidgetInfoBar" name="dw_InfoBarStatus">
|
||||
<property name="features">
|
||||
<set>QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable</set>
|
||||
</property>
|
||||
@@ -332,7 +332,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignLeft|Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true">
|
||||
<widget class="swift::gui::components::CInfoBarStatusComponent" name="comp_InfoBarStatus" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
@@ -526,45 +526,45 @@
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::COverlayMessagesFrame</class>
|
||||
<class>swift::gui::COverlayMessagesFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/overlaymessagesframe.h</header>
|
||||
<header>gui/overlaymessagesframe.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CInfoBarStatusComponent</class>
|
||||
<class>swift::gui::components::CInfoBarStatusComponent</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>blackgui/components/infobarstatuscomponent.h</header>
|
||||
<header>gui/components/infobarstatuscomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CMainInfoAreaComponent</class>
|
||||
<class>swift::gui::components::CMainInfoAreaComponent</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>blackgui/components/maininfoareacomponent.h</header>
|
||||
<header>gui/components/maininfoareacomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::CDockWidgetInfoBar</class>
|
||||
<class>swift::gui::CDockWidgetInfoBar</class>
|
||||
<extends>QDockWidget</extends>
|
||||
<header>blackgui/dockwidgetinfobar.h</header>
|
||||
<header>gui/dockwidgetinfobar.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CMainKeypadAreaComponent</class>
|
||||
<class>swift::gui::components::CMainKeypadAreaComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/mainkeypadareacomponent.h</header>
|
||||
<header>gui/components/mainkeypadareacomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CLoginComponent</class>
|
||||
<class>swift::gui::components::CLoginComponent</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>blackgui/components/logincomponent.h</header>
|
||||
<header>gui/components/logincomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CInternalsComponent</class>
|
||||
<class>swift::gui::components::CInternalsComponent</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>blackgui/components/internalscomponent.h</header>
|
||||
<header>gui/components/internalscomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
||||
|
||||
#include "core/context/contextownaircraft.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "gui/guiapplication.h"
|
||||
#include "misc/mixin/mixincompare.h"
|
||||
#include "misc/geo/coordinategeodetic.h"
|
||||
#include "misc/geo/latitude.h"
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
using namespace swift::core;
|
||||
using namespace swift::misc;
|
||||
using namespace BlackGui;
|
||||
using namespace swift::gui;
|
||||
using namespace swift::misc::network;
|
||||
using namespace swift::misc::aviation;
|
||||
using namespace swift::misc::simulation;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef SWIFTGUISTDAPPLICATION_H
|
||||
#define SWIFTGUISTDAPPLICATION_H
|
||||
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "gui/guiapplication.h"
|
||||
|
||||
#include <QCommandLineOption>
|
||||
#include <QCoreApplication>
|
||||
@@ -17,7 +17,7 @@
|
||||
* Specialized GUI application for swift pilot client.
|
||||
* Handles parsing of some specialized CMD line argumenets and startup of core
|
||||
*/
|
||||
class CSwiftGuiStdApplication : public BlackGui::CGuiApplication
|
||||
class CSwiftGuiStdApplication : public swift::gui::CGuiApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -3,25 +3,25 @@
|
||||
|
||||
#include "swiftguistd.h"
|
||||
#include "ui_swiftguistd.h"
|
||||
#include "blackgui/components/aircraftcomponent.h"
|
||||
#include "blackgui/components/atcstationcomponent.h"
|
||||
#include "blackgui/components/cockpitcomponent.h"
|
||||
#include "blackgui/components/flightplancomponent.h"
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/components/logincomponent.h"
|
||||
#include "blackgui/components/interpolationcomponent.h"
|
||||
#include "blackgui/components/maininfoareacomponent.h"
|
||||
#include "blackgui/components/mainkeypadareacomponent.h"
|
||||
#include "blackgui/components/mappingcomponent.h"
|
||||
#include "blackgui/components/navigatordialog.h"
|
||||
#include "blackgui/components/settingscomponent.h"
|
||||
#include "blackgui/components/textmessagecomponent.h"
|
||||
#include "blackgui/components/usercomponent.h"
|
||||
#include "blackgui/dockwidgetinfobar.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "gui/components/aircraftcomponent.h"
|
||||
#include "gui/components/atcstationcomponent.h"
|
||||
#include "gui/components/cockpitcomponent.h"
|
||||
#include "gui/components/flightplancomponent.h"
|
||||
#include "gui/components/logcomponent.h"
|
||||
#include "gui/components/logincomponent.h"
|
||||
#include "gui/components/interpolationcomponent.h"
|
||||
#include "gui/components/maininfoareacomponent.h"
|
||||
#include "gui/components/mainkeypadareacomponent.h"
|
||||
#include "gui/components/mappingcomponent.h"
|
||||
#include "gui/components/navigatordialog.h"
|
||||
#include "gui/components/settingscomponent.h"
|
||||
#include "gui/components/textmessagecomponent.h"
|
||||
#include "gui/components/usercomponent.h"
|
||||
#include "gui/dockwidgetinfobar.h"
|
||||
#include "gui/guiapplication.h"
|
||||
#include "gui/managedstatusbar.h"
|
||||
#include "gui/overlaymessagesframe.h"
|
||||
#include "gui/stylesheetutility.h"
|
||||
#include "core/webdataservices.h"
|
||||
#include "core/context/contextnetwork.h"
|
||||
#include "core/context/contextsimulator.h"
|
||||
@@ -54,8 +54,8 @@ using namespace swift::misc;
|
||||
using namespace swift::misc::aviation;
|
||||
using namespace swift::misc::network;
|
||||
using namespace swift::misc::input;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Components;
|
||||
using namespace swift::gui;
|
||||
using namespace swift::gui::components;
|
||||
|
||||
void SwiftGuiStd::init()
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
||||
|
||||
#include "blackgui/components/maininfoareacomponent.h"
|
||||
#include "blackgui/components/settingscomponent.h"
|
||||
#include "blackgui/components/autopublishdialog.h"
|
||||
#include "blackgui/guiactionbind.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/foreignwindows.h"
|
||||
#include "blackgui/copyxswiftbusdialog.h"
|
||||
#include "gui/components/maininfoareacomponent.h"
|
||||
#include "gui/components/settingscomponent.h"
|
||||
#include "gui/components/autopublishdialog.h"
|
||||
#include "gui/guiactionbind.h"
|
||||
#include "gui/guiapplication.h"
|
||||
#include "gui/foreignwindows.h"
|
||||
#include "gui/copyxswiftbusdialog.h"
|
||||
#include "misc/aviation/altitude.h"
|
||||
#include "misc/pq/units.h"
|
||||
#include "misc/logmessage.h"
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace swift::config;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Components;
|
||||
using namespace swift::gui;
|
||||
using namespace swift::gui::components;
|
||||
using namespace swift::core;
|
||||
using namespace swift::misc;
|
||||
using namespace swift::misc::physical_quantities;
|
||||
@@ -70,7 +70,7 @@ void SwiftGuiStd::onMenuClicked()
|
||||
else if (sender == ui->menu_WindowFont)
|
||||
{
|
||||
this->setMainPageToInfoArea();
|
||||
ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui);
|
||||
ui->comp_MainInfoArea->selectSettingsTab(swift::gui::components::CSettingsComponent::SettingTabGui);
|
||||
}
|
||||
else if (sender == ui->menu_InternalsPage)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user