9#include "ui_cockpitcomponent.h"
22 ui->wip_CockpitComPanelShowHideBar->setVisible(
false);
23 m_minHeightInfoArea = ui->comp_CockpitInfoArea->minimumHeight();
37 Q_ASSERT(parentDockableWidget);
39 if (ok && parentDockableWidget)
51 ui->comp_CockpitComComponent->setTransponderModeStateIdent();
56 ui->comp_CockpitInfoArea->selectArea(CCockpitInfoAreaComponent::InfoAreaAudio);
59 void CCockpitComponent::onToggleShowHideDetails(
bool show)
62 this->toggleShowHideDetails(
show,
true);
65 void CCockpitComponent::toggleShowHideDetails(
bool show,
bool considerCurrentSize)
75 static const QSize defaultSizeShown(500, 600);
76 static const QSize defaultSizeHidden(300, 150);
82 ui->comp_CockpitInfoArea->setVisible(
show);
87 ui->comp_CockpitInfoArea->setMinimumHeight(m_minHeightInfoArea);
88 if (m_sizeFloatingShown.
isValid())
91 if (considerCurrentSize)
93 m_sizeFloatingHidden = manuallySetSize;
105 ui->comp_CockpitInfoArea->setMinimumHeight(0);
107 if (m_sizeFloatingHidden.isValid())
110 if (considerCurrentSize)
112 m_sizeFloatingShown = manuallySetSize;
119 m_sizeFloatingHidden = this->
window()->
size();
137 void CCockpitComponent::onATCStationsChanged()
142 void CCockpitComponent::onToggleFloating(
bool floating)
144 ui->wip_CockpitComPanelShowHideBar->setVisible(floating);
152 const QSize sizeMinimum(200, 100);
153 ui->comp_CockpitInfoArea->setVisible(
true);
void requestTextMessageEntryTab(components::TextMessageTab tab)
Request an text message entry.
void toggleShowHide(bool show)
Show or hide cockpit details.
void requestCom1TextMessage()
Request COM text messages.
void requestCom2TextMessage()
Request COM text messages.
bool isInfoAreaShown() const
Is the info area shown?
bool setParentDockWidgetInfoArea(swift::gui::CDockWidgetInfoArea *parentDockableWidget)
Corresponding dockable widget in info area.
void setSelectedTransponderModeStateIdent()
Set to ident (transponder state).
CCockpitComponent(QWidget *parent=nullptr)
Constructor.
void mouseDoubleClickEvent(QMouseEvent *event)
~CCockpitComponent()
Destructor.
void showAudio()
Show the audio UI.
High level reusable GUI components.
virtual bool event(QEvent *e) override
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
bool isValid() const const