Ref T384, trigger (show) overlay text messages

This commit is contained in:
Klaus Basan
2018-10-03 02:09:19 +02:00
parent b3c6e22346
commit 792d2ced30
7 changed files with 73 additions and 10 deletions

View File

@@ -22,13 +22,16 @@ namespace BlackGui
namespace Components
{
CCockpitComponent::CCockpitComponent(QWidget *parent) :
QWidget(parent),
COverlayMessagesFrame(parent),
CEnableForDockWidgetInfoArea(),
ui(new Ui::CCockpitComponent)
{
ui->setupUi(this);
this->m_minHeightInfoArea = ui->comp_CockpitInfoArea->minimumHeight();
connect(ui->wip_CockpitComPanelShowHideBar, &BlackGui::CShowHideBar::toggleShowHide, this, &CCockpitComponent::onToggleShowHideDetails);
connect(ui->wip_CockpitComPanelShowHideBar, &CShowHideBar::toggleShowHide, this, &CCockpitComponent::onToggleShowHideDetails);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom1TextMessage, this, &CCockpitComponent::onRequestTextMessageCom1);
connect(ui->comp_CockpitComComponent, &CCockpitComComponent::requestCom2TextMessage, this, &CCockpitComponent::onRequestTextMessageCom2);
}
CCockpitComponent::~CCockpitComponent()
@@ -116,6 +119,25 @@ namespace BlackGui
}
}
void CCockpitComponent::mouseDoubleClickEvent(QMouseEvent *event)
{
if (event)
{
this->showOverlayInlineTextMessage(TextMessagesAll);
}
COverlayMessagesFrame::mouseDoubleClickEvent(event);
}
void CCockpitComponent::onRequestTextMessageCom1()
{
this->showOverlayInlineTextMessage(TextMessagesCom1);
}
void CCockpitComponent::onRequestTextMessageCom2()
{
this->showOverlayInlineTextMessage(TextMessagesCom2);
}
void CCockpitComponent::onToggleFloating(bool floating)
{
ui->wip_CockpitComPanelShowHideBar->setVisible(floating);