mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +08:00
Setting UI improvement
* pressing shift while clicking the button shows overview * hint in overview, that there are shortcuts
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
#include "ui_maininfoareacomponent.h"
|
#include "ui_maininfoareacomponent.h"
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
using namespace BlackGui;
|
using namespace BlackGui;
|
||||||
@@ -108,6 +109,20 @@ namespace BlackGui
|
|||||||
this->selectArea(InfoAreaLog);
|
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()
|
void CMainInfoAreaComponent::selectLog()
|
||||||
{
|
{
|
||||||
this->selectArea(InfoAreaLog);
|
this->selectArea(InfoAreaLog);
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace BlackGui
|
|||||||
void toggleFloating(InfoArea infoArea) { CInfoArea::toggleFloatingByIndex(static_cast<int>(infoArea)); }
|
void toggleFloating(InfoArea infoArea) { CInfoArea::toggleFloatingByIndex(static_cast<int>(infoArea)); }
|
||||||
|
|
||||||
//! Select area
|
//! Select area
|
||||||
void selectArea(InfoArea infoArea) { CInfoArea::selectArea(static_cast<int>(infoArea)); }
|
void selectArea(InfoArea infoArea);
|
||||||
|
|
||||||
//! Select log
|
//! Select log
|
||||||
void selectLog();
|
void selectLog();
|
||||||
|
|||||||
@@ -116,15 +116,15 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
else if (senderButton == ui->pb_CockpitIdent && sGui->getIContextOwnAircraft())
|
else if (senderButton == ui->pb_CockpitIdent && sGui->getIContextOwnAircraft())
|
||||||
{
|
{
|
||||||
emit identPressed();
|
emit this->identPressed();
|
||||||
}
|
}
|
||||||
else if (senderButton == ui->pb_Opacity050)
|
else if (senderButton == ui->pb_Opacity050)
|
||||||
{
|
{
|
||||||
emit changedOpacity(50);
|
emit this->changedOpacity(50);
|
||||||
}
|
}
|
||||||
else if (senderButton == ui->pb_Opacity100)
|
else if (senderButton == ui->pb_Opacity100)
|
||||||
{
|
{
|
||||||
emit changedOpacity(100);
|
emit this->changedOpacity(100);
|
||||||
}
|
}
|
||||||
else if (senderButton == ui->pb_SoundMaxVolume && sGui->getIContextAudio())
|
else if (senderButton == ui->pb_SoundMaxVolume && sGui->getIContextAudio())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
//! Main keypad area as used with main info area
|
//! Main keypad area as used with main info area
|
||||||
//! \sa CMainInfoAreaComponent
|
//! \sa CMainInfoAreaComponent
|
||||||
class BLACKGUI_EXPORT CMainKeypadAreaComponent :
|
class BLACKGUI_EXPORT CMainKeypadAreaComponent : public QFrame
|
||||||
public QFrame
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -259,12 +259,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>62</width>
|
|
||||||
<height>22</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>100%</string>
|
<string>100%</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -307,6 +301,9 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Use "SHIFT" for overview</string>
|
||||||
|
</property>
|
||||||
<property name="layoutDirection">
|
<property name="layoutDirection">
|
||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -326,12 +323,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>62</width>
|
|
||||||
<height>22</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>50%</string>
|
<string>50%</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -423,7 +414,22 @@
|
|||||||
<tabstop>pb_MainAircrafts</tabstop>
|
<tabstop>pb_MainAircrafts</tabstop>
|
||||||
<tabstop>pb_MainAtc</tabstop>
|
<tabstop>pb_MainAtc</tabstop>
|
||||||
<tabstop>pb_MainUsers</tabstop>
|
<tabstop>pb_MainUsers</tabstop>
|
||||||
|
<tabstop>pb_MainCockpit</tabstop>
|
||||||
<tabstop>pb_MainSimulator</tabstop>
|
<tabstop>pb_MainSimulator</tabstop>
|
||||||
|
<tabstop>pb_MainMappings</tabstop>
|
||||||
|
<tabstop>pb_MainInterpolation</tabstop>
|
||||||
|
<tabstop>pb_MainTextMessages</tabstop>
|
||||||
|
<tabstop>pb_MainFlightplan</tabstop>
|
||||||
|
<tabstop>pb_MainLog</tabstop>
|
||||||
|
<tabstop>pb_MainSettings</tabstop>
|
||||||
|
<tabstop>pb_MainWeather</tabstop>
|
||||||
|
<tabstop>pb_Empty</tabstop>
|
||||||
|
<tabstop>pb_SoundMaxVolume</tabstop>
|
||||||
|
<tabstop>pb_Opacity100</tabstop>
|
||||||
|
<tabstop>pb_CockpitIdent</tabstop>
|
||||||
|
<tabstop>pb_Audio</tabstop>
|
||||||
|
<tabstop>pb_SoundMute</tabstop>
|
||||||
|
<tabstop>pb_Opacity050</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -54,16 +54,16 @@ namespace BlackGui
|
|||||||
ui->comp_DataLoadOverview->showVisibleLoadAllButtons(false, false);
|
ui->comp_DataLoadOverview->showVisibleLoadAllButtons(false, false);
|
||||||
|
|
||||||
connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity);
|
connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity);
|
||||||
connect(ui->pb_Advanced, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Advanced, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Audio, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Audio, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Gui, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Gui, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Hotkeys, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Hotkeys, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Network, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Network, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Servers, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Servers, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_Simulator, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_Simulator, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_SimulatorBasics, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_SimulatorBasics, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
connect(ui->pb_SimulatorMessages, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
connect(ui->pb_SimulatorMessages, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||||
|
|
||||||
this->initActions();
|
this->initActions();
|
||||||
}
|
}
|
||||||
@@ -77,49 +77,50 @@ namespace BlackGui
|
|||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("overview");
|
a->setObjectName("overview");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_O));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_O));
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
ui->lbl_Hint->setText("Hint: See tooltips for shortcuts, \"ALT+S, O\" for overview.");
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("audio");
|
a->setObjectName("audio");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_A));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_A));
|
||||||
ui->pb_Audio->setToolTip(a->shortcut().toString());
|
ui->pb_Audio->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("data");
|
a->setObjectName("data");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_D));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_D));
|
||||||
ui->pb_DataLoadAndCaches->setToolTip(a->shortcut().toString());
|
ui->pb_DataLoadAndCaches->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("gui");
|
a->setObjectName("gui");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_G));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_G));
|
||||||
ui->pb_Gui->setToolTip(a->shortcut().toString());
|
ui->pb_Gui->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("hotkeys");
|
a->setObjectName("hotkeys");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_H));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_H));
|
||||||
ui->pb_Hotkeys->setToolTip(a->shortcut().toString());
|
ui->pb_Hotkeys->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("network");
|
a->setObjectName("network");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_N));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_N));
|
||||||
ui->pb_Network->setToolTip(a->shortcut().toString());
|
ui->pb_Network->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
|
|
||||||
a = new QAction(this);
|
a = new QAction(this);
|
||||||
a->setObjectName("simulator");
|
a->setObjectName("simulator");
|
||||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_S));
|
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_S));
|
||||||
ui->pb_Simulator->setToolTip(a->shortcut().toString());
|
ui->pb_Simulator->setToolTip(a->shortcut().toString());
|
||||||
connect(a, &QAction::triggered, this, &CSettingsComponent::ps_actionTriggered);
|
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||||
this->addAction(a);
|
this->addAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,12 +139,17 @@ namespace BlackGui
|
|||||||
this->setCurrentIndex(static_cast<int>(tab));
|
this->setCurrentIndex(static_cast<int>(tab));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSettingsComponent::setSettingsOverviewTab()
|
||||||
|
{
|
||||||
|
this->setSettingsTab(SettingTabOverview);
|
||||||
|
}
|
||||||
|
|
||||||
void CSettingsComponent::setGuiOpacity(double value)
|
void CSettingsComponent::setGuiOpacity(double value)
|
||||||
{
|
{
|
||||||
ui->comp_SettingsGuiGeneral->setGuiOpacity(value);
|
ui->comp_SettingsGuiGeneral->setGuiOpacity(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsComponent::ps_overviewButtonClicked()
|
void CSettingsComponent::onOverviewButtonClicked()
|
||||||
{
|
{
|
||||||
const QObject *sender = QObject::sender();
|
const QObject *sender = QObject::sender();
|
||||||
if (sender == ui->pb_Advanced) { this->setCurrentIndex(SettingTabAdvanced); return; }
|
if (sender == ui->pb_Advanced) { this->setCurrentIndex(SettingTabAdvanced); return; }
|
||||||
@@ -159,7 +165,7 @@ namespace BlackGui
|
|||||||
this->setCurrentIndex(SettingTabOverview);
|
this->setCurrentIndex(SettingTabOverview);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsComponent::ps_actionTriggered()
|
void CSettingsComponent::onActionTriggered()
|
||||||
{
|
{
|
||||||
const QString a = QObject::sender()->objectName().toLower().trimmed();
|
const QString a = QObject::sender()->objectName().toLower().trimmed();
|
||||||
if (a.isEmpty()) { return; }
|
if (a.isEmpty()) { return; }
|
||||||
|
|||||||
@@ -61,6 +61,15 @@ namespace BlackGui
|
|||||||
//! Settings for given simulator
|
//! Settings for given simulator
|
||||||
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
|
BlackMisc::Simulation::Settings::CSpecializedSimulatorSettings getSimulatorSettings(const BlackMisc::Simulation::CSimulatorInfo &simulator) const;
|
||||||
|
|
||||||
|
//! Set the tab
|
||||||
|
void setSettingsTab(SettingTab tab);
|
||||||
|
|
||||||
|
//! Set the overview tab
|
||||||
|
void setSettingsOverviewTab();
|
||||||
|
|
||||||
|
//! GUI Opacity 0-100%
|
||||||
|
void setGuiOpacity(double value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Change the windows opacity 0..100
|
//! Change the windows opacity 0..100
|
||||||
void changedWindowsOpacity(int opacity);
|
void changedWindowsOpacity(int opacity);
|
||||||
@@ -74,21 +83,13 @@ namespace BlackGui
|
|||||||
//! Update interval changed (users)
|
//! Update interval changed (users)
|
||||||
void changedUsersUpdateInterval(int seconds);
|
void changedUsersUpdateInterval(int seconds);
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
//! Set the tab
|
|
||||||
void setSettingsTab(SettingTab tab);
|
|
||||||
|
|
||||||
//! GUI Opacity 0-100%
|
|
||||||
void setGuiOpacity(double value);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
//! An overview button was clicked
|
//! An overview button was clicked
|
||||||
void ps_overviewButtonClicked();
|
void onOverviewButtonClicked();
|
||||||
|
|
||||||
//! Action triggered
|
//! Action triggered
|
||||||
void ps_actionTriggered();
|
void onActionTriggered();
|
||||||
|
|
||||||
private:
|
|
||||||
//! Init actions
|
//! Init actions
|
||||||
void initActions();
|
void initActions();
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>236</width>
|
<width>204</width>
|
||||||
<height>337</height>
|
<height>340</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="8" column="0" colspan="2">
|
||||||
<spacer name="vs_OverviewBottom">
|
<spacer name="vs_OverviewBottom">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@@ -43,20 +43,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QPushButton" name="pb_Network">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Network</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="pb_Servers">
|
<widget class="QPushButton" name="pb_Servers">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@@ -69,7 +56,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QPushButton" name="pb_Advanced">
|
<widget class="QPushButton" name="pb_Advanced">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@@ -82,8 +69,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QPushButton" name="pb_Audio">
|
<widget class="QPushButton" name="pb_Network">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -91,24 +78,11 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Audio</string>
|
<string>Network</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="7" column="0">
|
||||||
<widget class="QPushButton" name="pb_Gui">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>GUI</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QPushButton" name="pb_SimulatorBasics">
|
<widget class="QPushButton" name="pb_SimulatorBasics">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@@ -121,8 +95,8 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QPushButton" name="pb_Simulator">
|
<widget class="QPushButton" name="pb_Audio">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -130,11 +104,24 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Simulator</string>
|
<string>Audio</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
|
<widget class="QPushButton" name="pb_Gui">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>GUI</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
<widget class="QPushButton" name="pb_DataLoadAndCaches">
|
<widget class="QPushButton" name="pb_DataLoadAndCaches">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
@@ -147,33 +134,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="0" colspan="2">
|
||||||
<widget class="QPushButton" name="pb_Hotkeys">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Hotkeys</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QPushButton" name="pb_SimulatorMessages">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Simulator (messages)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<spacer name="vs_OverviewTop">
|
<spacer name="vs_OverviewTop">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@@ -189,6 +150,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QPushButton" name="pb_Hotkeys">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hotkeys</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QPushButton" name="pb_SimulatorMessages">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Simulator (messages)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QPushButton" name="pb_Simulator">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Simulator</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="lbl_Hint">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hint: see tooltips for shortcuts.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tb_SettingsTrafficNetworkServers">
|
<widget class="QWidget" name="tb_SettingsTrafficNetworkServers">
|
||||||
@@ -532,8 +539,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>228</width>
|
<width>196</width>
|
||||||
<height>295</height>
|
<height>298</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_DataLoadOverview">
|
<layout class="QVBoxLayout" name="vl_DataLoadOverview">
|
||||||
|
|||||||
@@ -120,10 +120,10 @@ namespace BlackGui
|
|||||||
|
|
||||||
const bool v = messagesDetail->ui->form_StatusMessage->isVisible();
|
const bool v = messagesDetail->ui->form_StatusMessage->isVisible();
|
||||||
const QString formString(v ? "Hide log details" : "Show log details");
|
const QString formString(v ? "Hide log details" : "Show log details");
|
||||||
this->m_action = menuActions.addAction(this->m_action, BlackMisc::CIcons::databaseTable16(), formString,
|
m_action = menuActions.addAction(m_action, BlackMisc::CIcons::databaseTable16(), formString,
|
||||||
CMenuAction::pathLog(), { messagesDetail->ui->form_StatusMessage, &CStatusMessageForm::toggleVisibility});
|
CMenuAction::pathLog(), { messagesDetail->ui->form_StatusMessage, &CStatusMessageForm::toggleVisibility});
|
||||||
this->m_action->setCheckable(true);
|
m_action->setCheckable(true);
|
||||||
this->m_action->setChecked(v);
|
m_action->setChecked(v);
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -321,13 +321,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CDockWidget::keyPressEvent(QKeyEvent *event)
|
void CDockWidget::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
if (event->key() == Qt::Key_Escape)
|
if (event->key() == Qt::Key_Escape && this->isFloating()) { this->toggleFloating(); }
|
||||||
{
|
|
||||||
if (this->isFloating())
|
|
||||||
{
|
|
||||||
this->toggleFloating();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QDockWidget::keyPressEvent(event);
|
QDockWidget::keyPressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace BlackGui
|
|||||||
//! The parent info area
|
//! The parent info area
|
||||||
CInfoArea *getParentInfoArea();
|
CInfoArea *getParentInfoArea();
|
||||||
|
|
||||||
//! Is this the selected widget, means it is not floating, and the one selected
|
//! Is this the selected widget, means it is not floating, and it is the one selected
|
||||||
bool isSelectedDockWidget() const;
|
bool isSelectedDockWidget() const;
|
||||||
|
|
||||||
//! Visible widget
|
//! Visible widget
|
||||||
@@ -69,7 +69,6 @@ namespace BlackGui
|
|||||||
//! The parent info areas
|
//! The parent info areas
|
||||||
const QList<const CInfoArea *> findParentInfoAreas() const;
|
const QList<const CInfoArea *> findParentInfoAreas() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
Reference in New Issue
Block a user