Setting UI improvement

* pressing shift while clicking the button shows overview
* hint in overview, that there are shortcuts
This commit is contained in:
Klaus Basan
2018-05-28 21:41:05 +02:00
parent 0ef58f03ba
commit 4021822753
11 changed files with 154 additions and 127 deletions

View File

@@ -14,6 +14,7 @@
#include "ui_maininfoareacomponent.h"
#include <QIcon>
#include <QGuiApplication>
using namespace BlackMisc;
using namespace BlackGui;
@@ -108,6 +109,20 @@ namespace BlackGui
this->selectArea(InfoAreaLog);
}
void CMainInfoAreaComponent::selectArea(CMainInfoAreaComponent::InfoArea infoArea)
{
CInfoArea::selectArea(static_cast<int>(infoArea));
if (infoArea == InfoAreaSettings)
{
// pressing shift will go to overview
const Qt::KeyboardModifiers km = QGuiApplication::queryKeyboardModifiers();
if (km.testFlag(Qt::ShiftModifier))
{
ui->comp_Settings->setSettingsOverviewTab();
}
}
}
void CMainInfoAreaComponent::selectLog()
{
this->selectArea(InfoAreaLog);