mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
refactor: Remove broken function to add test ATC stations
This commit is contained in:
@@ -97,8 +97,6 @@ namespace swift::gui::components
|
||||
&CAtcStationComponent::onOnlineAtcStationVariantSelected, Qt::QueuedConnection);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::objectSelected, this,
|
||||
&CAtcStationComponent::onOnlineAtcStationVariantSelected, Qt::QueuedConnection);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::testRequestDummyAtcOnlineStations, this,
|
||||
&CAtcStationComponent::testCreateDummyOnlineAtcStations);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestUpdate, this,
|
||||
&CAtcStationComponent::requestOnlineStationsUpdate);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestNewBackendData, this,
|
||||
@@ -289,12 +287,6 @@ namespace swift::gui::components
|
||||
}
|
||||
}
|
||||
|
||||
void CAtcStationComponent::testCreateDummyOnlineAtcStations(int number)
|
||||
{
|
||||
if (!sGui || !sGui->getIContextNetwork()) { return; }
|
||||
if (this->canAccessContext()) { sGui->getIContextNetwork()->testCreateDummyOnlineAtcStations(number); }
|
||||
}
|
||||
|
||||
void CAtcStationComponent::requestOnlineStationsUpdate()
|
||||
{
|
||||
m_timestampLastReadOnlineStations.setMSecsSinceEpoch(0); // mark as outdated
|
||||
|
||||
@@ -108,9 +108,6 @@ namespace swift::gui
|
||||
void connectionStatusChanged(const swift::misc::network::CConnectionStatus &from,
|
||||
const swift::misc::network::CConnectionStatus &to);
|
||||
|
||||
//! Request dummy ATC online stations
|
||||
void testCreateDummyOnlineAtcStations(int number);
|
||||
|
||||
//! Request udpate
|
||||
void requestOnlineStationsUpdate();
|
||||
|
||||
|
||||
@@ -58,9 +58,6 @@ namespace swift::gui
|
||||
void fullResizeToContents();
|
||||
|
||||
signals:
|
||||
//! Request some dummy ATC stations
|
||||
void testRequestDummyAtcOnlineStations(int number);
|
||||
|
||||
//! Request COM frequency
|
||||
void requestComFrequency(const swift::misc::physical_quantities::CFrequency &frequency,
|
||||
swift::misc::aviation::CComSystem::ComUnit unit);
|
||||
|
||||
@@ -44,16 +44,6 @@ namespace swift::gui::views
|
||||
void CAtcStationView::customMenu(CMenuActions &menuActions)
|
||||
{
|
||||
menuActions.addMenuCom();
|
||||
if (CBuildConfig::isDebugBuild())
|
||||
{
|
||||
if (m_debugActions.isEmpty()) { m_debugActions = QList<QAction *>({ nullptr, nullptr }); }
|
||||
m_debugActions[0] = menuActions.addAction(m_debugActions[0], CIcons::tableSheet16(),
|
||||
"Test: 1k ATC online stations", CMenuAction::pathClientCom(),
|
||||
{ this, &CAtcStationView::emitTestRequest1kAtcOnlineDummies });
|
||||
m_debugActions[1] = menuActions.addAction(m_debugActions[1], CIcons::tableSheet16(),
|
||||
"Test: 3k ATC online stations", CMenuAction::pathClientCom(),
|
||||
{ this, &CAtcStationView::emitTestRequest3kAtcOnlineDummies });
|
||||
}
|
||||
|
||||
if (this->hasSelection())
|
||||
{
|
||||
|
||||
@@ -47,9 +47,6 @@ namespace swift::gui
|
||||
void changedAtcStationConnectionStatus(const swift::misc::aviation::CAtcStation &station, bool added);
|
||||
|
||||
signals:
|
||||
//! Request some dummy ATC stations
|
||||
void testRequestDummyAtcOnlineStations(int number);
|
||||
|
||||
//! Request COM frequency
|
||||
void requestComFrequency(const swift::misc::physical_quantities::CFrequency &frequency,
|
||||
swift::misc::aviation::CComSystem::ComUnit unit);
|
||||
@@ -62,14 +59,11 @@ namespace swift::gui
|
||||
virtual void customMenu(swift::gui::menus::CMenuActions &menuActions) override;
|
||||
|
||||
private:
|
||||
void emitTestRequest1kAtcOnlineDummies() { emit this->testRequestDummyAtcOnlineStations(1000); }
|
||||
void emitTestRequest3kAtcOnlineDummies() { emit this->testRequestDummyAtcOnlineStations(3000); }
|
||||
void tuneInAtcCom1();
|
||||
void tuneInAtcCom2();
|
||||
void requestTextMessage();
|
||||
|
||||
QList<QAction *> m_actions; //!< real actions
|
||||
QList<QAction *> m_debugActions; //!< used for debug context menu
|
||||
};
|
||||
} // namespace views
|
||||
} // namespace swift::gui
|
||||
|
||||
Reference in New Issue
Block a user