mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Ref T536, ATC and cockpit component request overlay text messages and use COverlayMessagesFrameEnableForDockWidgetInfoArea
This commit is contained in:
committed by
Mat Sutcliffe
parent
045f79d0bd
commit
963ac03be0
@@ -58,7 +58,7 @@ namespace BlackGui
|
||||
namespace Components
|
||||
{
|
||||
CAtcStationComponent::CAtcStationComponent(QWidget *parent) :
|
||||
COverlayMessagesFrame(parent),
|
||||
COverlayMessagesFrameEnableForDockWidgetInfoArea(parent),
|
||||
CIdentifiable(this),
|
||||
ui(new Ui::CAtcStationComponent)
|
||||
{
|
||||
@@ -106,7 +106,6 @@ namespace BlackGui
|
||||
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, &CAtcStationComponent::requestOnlineStationsUpdate);
|
||||
// will be manually set
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::modelDataChangedDigest, this, &CAtcStationComponent::onCountChanged);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestComFrequency, this, &CAtcStationComponent::setComFrequency);
|
||||
connect(ui->tvp_AtcStationsOnline, &CAtcStationView::requestTextMessageWidget, this, &CAtcStationComponent::requestTextMessageWidget);
|
||||
@@ -488,7 +487,8 @@ namespace BlackGui
|
||||
|
||||
void CAtcStationComponent::showOverlayInlineTextMessage()
|
||||
{
|
||||
COverlayMessagesFrame::showOverlayInlineTextMessage(TextMessagesCom1);
|
||||
// COverlayMessagesFrame::showOverlayInlineTextMessage(TextMessagesCom1);
|
||||
this->requestTextMessageEntryTab(TextMessagesCom1);
|
||||
}
|
||||
|
||||
void CAtcStationComponent::onDetailsToggled(bool checked)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "blackgui/settings/viewupdatesettings.h"
|
||||
#include "blackgui/settings/atcstationssettings.h"
|
||||
#include "blackgui/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackcore/network.h"
|
||||
@@ -45,8 +44,7 @@ namespace BlackGui
|
||||
{
|
||||
//! ATC stations component
|
||||
class BLACKGUI_EXPORT CAtcStationComponent :
|
||||
public COverlayMessagesFrame,
|
||||
public CEnableForDockWidgetInfoArea,
|
||||
public COverlayMessagesFrameEnableForDockWidgetInfoArea,
|
||||
public BlackMisc::CIdentifiable
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -86,9 +84,6 @@ namespace BlackGui
|
||||
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
|
||||
|
||||
signals:
|
||||
//! Request a text message
|
||||
void requestTextMessageWidget(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Request audio widget
|
||||
void requestAudioWidget();
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ namespace BlackGui
|
||||
namespace Components
|
||||
{
|
||||
CCockpitComponent::CCockpitComponent(QWidget *parent) :
|
||||
COverlayMessagesFrame(parent),
|
||||
CEnableForDockWidgetInfoArea(),
|
||||
COverlayMessagesFrameEnableForDockWidgetInfoArea(parent),
|
||||
ui(new Ui::CCockpitComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -128,12 +127,12 @@ namespace BlackGui
|
||||
|
||||
void CCockpitComponent::onRequestTextMessageCom1()
|
||||
{
|
||||
this->showOverlayInlineTextMessage(TextMessagesCom1);
|
||||
this->requestTextMessageEntryTab(TextMessagesCom1);
|
||||
}
|
||||
|
||||
void CCockpitComponent::onRequestTextMessageCom2()
|
||||
{
|
||||
this->showOverlayInlineTextMessage(TextMessagesCom2);
|
||||
this->requestTextMessageEntryTab(TextMessagesCom2);
|
||||
}
|
||||
|
||||
void CCockpitComponent::onToggleFloating(bool floating)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#ifndef BLACKGUI_COMPONENTS_COCKPITCOMPONENT_H
|
||||
#define BLACKGUI_COMPONENTS_COCKPITCOMPONENT_H
|
||||
|
||||
#include "blackgui/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/overlaymessagesframe.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
|
||||
@@ -29,9 +28,7 @@ namespace BlackGui
|
||||
namespace Components
|
||||
{
|
||||
//! Cockpit component: COM unit, show / hide bar, voice rooms
|
||||
class BLACKGUI_EXPORT CCockpitComponent :
|
||||
public COverlayMessagesFrame,
|
||||
public CEnableForDockWidgetInfoArea
|
||||
class BLACKGUI_EXPORT CCockpitComponent : public COverlayMessagesFrameEnableForDockWidgetInfoArea
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user