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)
72 static const QSize defaultSizeShown(500, 600);
73 static const QSize defaultSizeHidden(300, 150);
79 ui->comp_CockpitInfoArea->setVisible(
show);
84 ui->comp_CockpitInfoArea->setMinimumHeight(m_minHeightInfoArea);
85 if (m_sizeFloatingShown.
isValid())
88 if (considerCurrentSize) { m_sizeFloatingHidden = manuallySetSize; }
99 ui->comp_CockpitInfoArea->setMinimumHeight(0);
101 if (m_sizeFloatingHidden.
isValid())
104 if (considerCurrentSize) { m_sizeFloatingShown = manuallySetSize; }
110 m_sizeFloatingHidden = this->
window()->
size();
125 void CCockpitComponent::onATCStationsChanged()
130 void CCockpitComponent::onToggleFloating(
bool floating)
132 ui->wip_CockpitComPanelShowHideBar->setVisible(floating);
140 const QSize sizeMinimum(200, 100);
141 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.
Cockpit component: COM unit, show / hide bar, voice rooms.
bool isInfoAreaShown() const
Is the info area shown?
virtual bool setParentDockWidgetInfoArea(swift::gui::CDockWidgetInfoArea *parentDockableWidget)
Corresponding dockable widget in info area.
void setSelectedTransponderModeStateIdent()
Set to ident (transponder state)
CCockpitComponent(QWidget *parent=nullptr)
Constructor.
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual ~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)
bool isValid() const const