mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refactor: Remove not used AFV map
Always use the VATSIM online map instead of providing our own map widget
This commit is contained in:
@@ -591,7 +591,6 @@ add_library(gui SHARED
|
||||
components/remoteaircraftselector.ui
|
||||
components/aircraftcombinedtypeselector.ui
|
||||
components/infobarwebreadersstatuscomponent.cpp
|
||||
components/afvmapdialog.ui
|
||||
components/dbdistributorselectorcomponent.cpp
|
||||
components/networkdetailscomponent.h
|
||||
components/otherswiftversionsdialog.h
|
||||
@@ -660,7 +659,6 @@ add_library(gui SHARED
|
||||
components/coreinfoareacomponent.h
|
||||
components/rawfsdmessagesdialog.ui
|
||||
components/dbautostashingcomponent.h
|
||||
components/afvmapdialog.h
|
||||
components/transpondermodecomponent.h
|
||||
components/remoteaircraftselector.cpp
|
||||
components/stringlistdialog.cpp
|
||||
@@ -669,7 +667,6 @@ add_library(gui SHARED
|
||||
components/settingssimulatorcomponent.cpp
|
||||
components/dbairlineicaoselectorbase.h
|
||||
components/dbownmodelsdialog.ui
|
||||
components/afvmapdialog.cpp
|
||||
components/dbmodelcomponent.ui
|
||||
components/modelmatcherlogcomponent.cpp
|
||||
components/airportcompleter.ui
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
// 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/guiapplication.h"
|
||||
#include "blackcore/context/contextaudioimpl.h"
|
||||
#include "blackcore/afv/clients/afvclient.h"
|
||||
#include "blackcore/afv/model/afvmapreader.h"
|
||||
|
||||
#include "afvmapdialog.h"
|
||||
#include "ui_afvmapdialog.h"
|
||||
// #include <QQmlContext>
|
||||
// #include <QQmlEngine>
|
||||
|
||||
using namespace BlackCore::Afv::Model;
|
||||
using namespace BlackCore::Afv::Clients;
|
||||
|
||||
namespace BlackGui::Components
|
||||
{
|
||||
CAfvMapDialog::CAfvMapDialog(QWidget *parent) : QDialog(parent),
|
||||
ui(new Ui::CAfvMapDialog)
|
||||
{
|
||||
/**
|
||||
m_afvMapReader = new CAfvMapReader(this);
|
||||
m_afvMapReader->updateFromMap();
|
||||
|
||||
CAfvClient *afvClient = nullptr;
|
||||
if (sGui && !sGui->isShuttingDown() && sGui->getIContextAudio())
|
||||
{
|
||||
if (sGui->getIContextAudio()->isUsingImplementingObject())
|
||||
{
|
||||
afvClient = sGui->getCoreFacade()->getCContextAudio()->voiceClient();
|
||||
}
|
||||
}
|
||||
|
||||
ui->setupUi(this);
|
||||
QQmlContext *ctxt = ui->qw_AfvMap->rootContext();
|
||||
ctxt->setContextProperty("afvMapReader", m_afvMapReader);
|
||||
|
||||
if (m_afvClient)
|
||||
{
|
||||
ctxt->setContextProperty("voiceClient", afvClient);
|
||||
}
|
||||
|
||||
// ui->qw_AfvMap->engine()->setBaseUrl(":/blackgui/qml");
|
||||
ui->qw_AfvMap->setSource(QUrl("qrc:/blackgui/qml/AFVMap.qml"));
|
||||
**/
|
||||
}
|
||||
|
||||
CAfvMapDialog::~CAfvMapDialog() {}
|
||||
} // ns
|
||||
@@ -1,49 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_COMPONENTS_AFVMAPDIALOG_H
|
||||
#define BLACKGUI_COMPONENTS_AFVMAPDIALOG_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace BlackCore::Afv
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class CAfvMapReader;
|
||||
}
|
||||
namespace Clients
|
||||
{
|
||||
class CAfvClient;
|
||||
}
|
||||
}
|
||||
namespace Ui
|
||||
{
|
||||
class CAfvMapDialog;
|
||||
}
|
||||
namespace BlackGui::Components
|
||||
{
|
||||
//! QML map to display ATC stations
|
||||
class BLACKGUI_EXPORT CAfvMapDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Ctor
|
||||
explicit CAfvMapDialog(QWidget *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CAfvMapDialog() override;
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CAfvMapDialog> ui;
|
||||
BlackCore::Afv::Model::CAfvMapReader *m_afvMapReader = nullptr;
|
||||
BlackCore::Afv::Clients::CAfvClient *m_afvClient = nullptr;
|
||||
};
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CAfvMapDialog</class>
|
||||
<widget class="QDialog" name="CAfvMapDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>AFV map</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_AfvMap">
|
||||
<!-- <item>
|
||||
<widget class="QQuickWidget" name="qw_AfvMap">
|
||||
<property name="resizeMode">
|
||||
<enum>QQuickWidget::SizeRootObjectToView</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item> -->
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="bb_AfvMap">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<!-- <customwidget>
|
||||
<class>QQuickWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">QtQuickWidgets/QQuickWidget</header>
|
||||
</customwidget> -->
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>bb_AfvMap</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CAfvMapDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>bb_AfvMap</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CAfvMapDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/components/dbloaddatadialog.h"
|
||||
#include "blackgui/components/autopublishdialog.h"
|
||||
#include "blackgui/components/afvmapdialog.h"
|
||||
#include "blackgui/components/logindialog.h"
|
||||
#include "blackgui/components/modelbrowserdialog.h"
|
||||
#include "blackgui/components/settingscomponent.h"
|
||||
@@ -645,16 +644,6 @@ bool SwiftGuiStd::startModelBrowser()
|
||||
|
||||
bool SwiftGuiStd::startAFVMap()
|
||||
{
|
||||
/**
|
||||
if (!m_mapDialog)
|
||||
{
|
||||
m_mapDialog.reset(new CAfvMapDialog(this));
|
||||
m_mapDialog->setWindowModality(Qt::NonModal);
|
||||
}
|
||||
m_mapDialog->exec();
|
||||
**/
|
||||
|
||||
//! \todo KB 2019-11 AFV map workaround
|
||||
if (sGui && !sGui->isShuttingDown())
|
||||
{
|
||||
sGui->openUrl(sGui->getGlobalSetup().getAfvMapUrl());
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace BlackGui::Components
|
||||
class CAutoPublishDialog;
|
||||
class CLoginDialog;
|
||||
class CModelBrowserDialog;
|
||||
class CAfvMapDialog;
|
||||
}
|
||||
namespace Ui
|
||||
{
|
||||
@@ -125,7 +124,6 @@ private:
|
||||
QScopedPointer<BlackGui::Components::CAutoPublishDialog> m_autoPublishDialog; //!< auto publish dialog
|
||||
QScopedPointer<BlackGui::Components::CLoginDialog> m_loginDialog; //!< login dialog
|
||||
QScopedPointer<BlackGui::Components::CModelBrowserDialog> m_modelBrower; //!< model browser
|
||||
QScopedPointer<BlackGui::Components::CAfvMapDialog> m_mapDialog; //!< map dialog
|
||||
QScopedPointer<BlackGui::Components::CAircraftModelSetValidationDialog> m_validationDialog; //!< aircraft model validation dialog
|
||||
BlackMisc::CData<BlackMisc::Simulation::Data::TLastAutoPublish> m_lastAutoPublish { this };
|
||||
BlackCore::CActionBind m_actionPtt { BlackMisc::Input::pttHotkeyAction(), BlackMisc::CIcons::StandardIconRadio16, this, &SwiftGuiStd::onPttChanged };
|
||||
|
||||
@@ -519,7 +519,7 @@
|
||||
</action>
|
||||
<action name="menu_AfvMap">
|
||||
<property name="text">
|
||||
<string>AFV map</string>
|
||||
<string>AFV online map</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user