mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #927, linked button with component
This commit is contained in:
committed by
Mathew Sutcliffe
parent
81caa32003
commit
6863bf2937
@@ -55,6 +55,11 @@ namespace BlackGui
|
||||
ui->comp_CockpitComComponent->setSelectedTransponderModeStateIdent();
|
||||
}
|
||||
|
||||
void CCockpitComponent::showAudio()
|
||||
{
|
||||
ui->comp_CockpitInfoArea->selectArea(CCockpitInfoAreaComponent::InfoAreaAudio);
|
||||
}
|
||||
|
||||
void CCockpitComponent::ps_onToggleShowHideDetails(bool show)
|
||||
{
|
||||
// use the toggle method to set the sizes
|
||||
|
||||
@@ -14,14 +14,12 @@
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackgui/components/enablefordockwidgetinfoarea.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
#include <QSize>
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui { class CCockpitComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
class CDockWidgetInfoArea;
|
||||
@@ -40,7 +38,7 @@ namespace BlackGui
|
||||
explicit CCockpitComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CCockpitComponent();
|
||||
virtual ~CCockpitComponent();
|
||||
|
||||
//! \copydoc CEnableForDockWidgetInfoArea::setParentDockWidgetInfoArea
|
||||
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
|
||||
@@ -52,6 +50,9 @@ namespace BlackGui
|
||||
//! \copydoc BlackGui::Components::CTransponderModeSelector::setSelectedTransponderModeStateIdent
|
||||
void setSelectedTransponderModeStateIdent();
|
||||
|
||||
//! Show the audio ui
|
||||
void showAudio();
|
||||
|
||||
private slots:
|
||||
//! Show or hide cockpit details
|
||||
void ps_onToggleShowHideDetails(bool show);
|
||||
@@ -68,9 +69,7 @@ namespace BlackGui
|
||||
QSize m_sizeFloatingHidden; //! size when info area is hidden
|
||||
int m_minHeightInfoArea = -1; //! minimum height of the info area
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -23,7 +23,6 @@ class QPixmap;
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CCockpitInfoAreaComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
@@ -39,7 +38,7 @@ namespace BlackGui
|
||||
explicit CCockpitInfoAreaComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CCockpitInfoAreaComponent();
|
||||
virtual ~CCockpitInfoAreaComponent();
|
||||
|
||||
//! Info areas
|
||||
enum InfoArea
|
||||
|
||||
@@ -189,6 +189,11 @@ void SwiftGuiStd::initGuiSignals()
|
||||
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::identPressed, ui->comp_MainInfoArea->getCockpitComponent(), &CCockpitComponent::setSelectedTransponderModeStateIdent);
|
||||
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::commandEntered, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::handleGlobalCommandLine);
|
||||
connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedInfoAreaStatus, ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::onMainInfoAreaChanged);
|
||||
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::audioPressed, [ = ]
|
||||
{
|
||||
ui->comp_MainInfoArea->getCockpitComponent()->showAudio();
|
||||
ui->comp_MainInfoArea->selectArea(CMainInfoAreaComponent::InfoAreaCockpit);
|
||||
});
|
||||
|
||||
// menu
|
||||
connect(ui->menu_TestLocationsEDDF, &QAction::triggered, this, &SwiftGuiStd::ps_onMenuClicked);
|
||||
|
||||
Reference in New Issue
Block a user