Also allow to use SHIFT + button for models, aircraft

* added setTab functions
* shift can be used to reset to first tab
This commit is contained in:
Klaus Basan
2018-08-08 01:12:31 +02:00
parent 461d146619
commit 92deb19572
11 changed files with 62 additions and 29 deletions

View File

@@ -104,13 +104,13 @@ namespace BlackGui
{
QPushButton *senderButton = static_cast<QPushButton *>(QObject::sender());
Q_ASSERT_X(senderButton, Q_FUNC_INFO, "No sender button");
Q_ASSERT_X(sGui, Q_FUNC_INFO, "Need sGui");
if (!sGui || sGui->isShuttingDown()) { return; }
if (!senderButton) { return; }
const CMainInfoAreaComponent::InfoArea ia = buttonToMainInfoArea(senderButton);
if (ia != CMainInfoAreaComponent::InfoAreaNone)
const CMainInfoAreaComponent::InfoArea infoArea = buttonToMainInfoArea(senderButton);
if (infoArea != CMainInfoAreaComponent::InfoAreaNone)
{
Q_ASSERT(senderButton->isCheckable());
emit this->selectedMainInfoAreaDockWidget(ia);
emit this->selectedMainInfoAreaDockWidget(infoArea);
senderButton->setChecked(true); // re-check if got unchecked, we use checked buttons like normal buttons
return;
}
@@ -137,11 +137,11 @@ namespace BlackGui
}
else if (senderButton == ui->pb_Connect)
{
emit connectPressed();
emit this->connectPressed();
}
else if (senderButton == ui->pb_Audio)
{
emit audioPressed();
emit this->audioPressed();
}
}