Ref T259, Ref T243 split mapping info area, new interpolation info area

* new interpolation info area
* added interpolation and parts history to that area
* adjusted keypad and main swift GUI
This commit is contained in:
Klaus Basan
2018-03-19 21:08:21 +01:00
parent 624eb7ca93
commit 8df74ce0e6
15 changed files with 296 additions and 294 deletions

View File

@@ -61,14 +61,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="BlackGui::Components::CCallsignCompleter" name="comp_CallsignCompleter">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
<widget class="BlackGui::Components::CCallsignCompleter" name="comp_CallsignCompleter"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lbl_Enable">

View File

@@ -91,7 +91,7 @@ namespace BlackGui
QSize CDataMainInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
const InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaData:
@@ -105,19 +105,14 @@ namespace BlackGui
const QPixmap &CDataMainInfoAreaComponent::indexToPixmap(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
const InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaData:
return CIcons::appDatabase16();
case InfoAreaMapping:
return CIcons::appMappings16();
case InfoAreaSettings:
return CIcons::appSettings16();
case InfoAreaLog:
return CIcons::appLog16();
default:
return CIcons::empty();
case InfoAreaData: return CIcons::appDatabase16();
case InfoAreaMapping: return CIcons::appMappings16();
case InfoAreaSettings: return CIcons::appSettings16();
case InfoAreaLog: return CIcons::appLog16();
default: return CIcons::empty();
}
}
} // ns

View File

@@ -69,10 +69,6 @@ namespace BlackGui
connect(ui->cb_DebugContextOwnAircraft, &QCheckBox::stateChanged, this, &CInternalsComponent::enableDebug);
connect(ui->cb_DebugContextSimulator, &QCheckBox::stateChanged, this, &CInternalsComponent::enableDebug);
connect(ui->cb_DebugDriver, &QCheckBox::stateChanged, this, &CInternalsComponent::enableDebug);
connect(ui->cb_ForceFullInterpolation, &QCheckBox::stateChanged, this, &CInternalsComponent::enableDebug);
connect(ui->cb_EnableParts, &QCheckBox::stateChanged, this, &CInternalsComponent::enableDebug);
connect(ui->pb_SendTextMessage, &QPushButton::pressed, this, &CInternalsComponent::sendTextMessage);
connect(ui->tb_LogStatusMessage, &QPushButton::pressed, this, &CInternalsComponent::logStatusMessage);
connect(ui->le_StatusMessage, &QLineEdit::returnPressed, this, &CInternalsComponent::logStatusMessage);
@@ -82,7 +78,6 @@ namespace BlackGui
connect(ui->pb_RequestFromNetwork, &QPushButton::pressed, this, &CInternalsComponent::requestPartsFromNetwork);
connect(ui->comp_RemoteAircraftSelector, &CRemoteAircraftSelector::changedCallsign, this, &CInternalsComponent::selectorChanged);
contextFlagsToGui();
}
@@ -154,14 +149,6 @@ namespace BlackGui
else if (sender == ui->cb_DebugContextNetwork) { sGui->getIContextNetwork()->setDebugEnabled(debug);}
else if (sender == ui->cb_DebugContextOwnAircraft) { sGui->getIContextOwnAircraft()->setDebugEnabled(debug); }
else if (sender == ui->cb_DebugContextSimulator) { sGui->getIContextSimulator()->setDebugEnabled(debug);}
else if (sender == ui->cb_DebugDriver || sender == ui->cb_EnableParts || sender == ui->cb_ForceFullInterpolation)
{
CInterpolationAndRenderingSetup setup;
setup.setForceFullInterpolation(ui->cb_ForceFullInterpolation->isChecked());
setup.setDriverDebuggingMessages(ui->cb_DebugDriver->isChecked());
setup.setEnabledAircraftParts(ui->cb_EnableParts->isChecked());
sGui->getIContextSimulator()->setInterpolationAndRenderingSetup(setup);
}
}
void CInternalsComponent::sendTextMessage()

View File

@@ -29,7 +29,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tw_Internals">
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="tb_Debug">
<attribute name="title">
@@ -104,51 +104,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_DebugDriverAndInterpolator">
<property name="title">
<string>Driver plugin and interpolator</string>
</property>
<layout class="QGridLayout" name="gl_DriverAndInterpolator">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="cb_DebugDriver">
<property name="text">
<string>driver dbg. msgs.</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cb_ForceFullInterpolation">
<property name="text">
<string>force full interpolation</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cb_EnableParts">
<property name="text">
<string>enable parts</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_StatusMessage">
<property name="title">

View File

@@ -46,11 +46,16 @@ namespace BlackGui
return ui->comp_Aircraft;
}
CMappingComponent *CMainInfoAreaComponent::getMappingComponet()
CMappingComponent *CMainInfoAreaComponent::getMappingComponent()
{
return ui->comp_Mappings;
}
CInterpolationComponent *CMainInfoAreaComponent::getInterpolationComponent()
{
return ui->comp_Interpolation;
}
CUserComponent *CMainInfoAreaComponent::getUserComponent()
{
return ui->comp_Users;
@@ -110,7 +115,7 @@ namespace BlackGui
QSize CMainInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
const InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaCockpit:
@@ -120,7 +125,8 @@ namespace BlackGui
case InfoAreaLog:
case InfoAreaSimulator:
return QSize(400, 300);
case InfoAreaMappings:
case InfoAreaMapping:
case InfoAreaInterpolation:
case InfoAreaSettings:
case InfoAreaTextMessages:
case InfoAreaWeather:
@@ -140,33 +146,22 @@ namespace BlackGui
const QPixmap &CMainInfoAreaComponent::indexToPixmap(int areaIndex) const
{
InfoArea area = static_cast<InfoArea>(areaIndex);
const InfoArea area = static_cast<InfoArea>(areaIndex);
switch (area)
{
case InfoAreaCockpit:
return CIcons::appCockpit16();
case InfoAreaUsers:
return CIcons::appUsers16();
case InfoAreaWeather:
return CIcons::appWeather16();
case InfoAreaAtc:
return CIcons::appAtc16();
case InfoAreaAircraft:
return CIcons::appAircraft16();
case InfoAreaSettings:
return CIcons::appSettings16();
case InfoAreaFlightPlan:
return CIcons::appFlightPlan16();
case InfoAreaTextMessages:
return CIcons::appTextMessages16();
case InfoAreaSimulator:
return CIcons::appSimulator16();
case InfoAreaMappings:
return CIcons::appMappings16();
case InfoAreaLog:
return CIcons::appLog16();
default:
return CIcons::empty();
case InfoAreaCockpit: return CIcons::appCockpit16();
case InfoAreaUsers: return CIcons::appUsers16();
case InfoAreaWeather: return CIcons::appWeather16();
case InfoAreaAtc: return CIcons::appAtc16();
case InfoAreaAircraft: return CIcons::appAircraft16();
case InfoAreaSettings: return CIcons::appSettings16();
case InfoAreaFlightPlan: return CIcons::appFlightPlan16();
case InfoAreaTextMessages: return CIcons::appTextMessages16();
case InfoAreaSimulator: return CIcons::appSimulator16();
case InfoAreaMapping: return CIcons::appMappings16();
case InfoAreaLog: return CIcons::appLog16();
case InfoAreaInterpolation: return CIcons::appInterpolation16();
default: return CIcons::empty();
}
}
} // namespace

View File

@@ -14,7 +14,6 @@
#include "blackgui/blackguiexport.h"
#include "blackgui/infoarea.h"
#include <QObject>
#include <QScopedPointer>
#include <QSize>
@@ -23,7 +22,6 @@ class QPixmap;
class QWidget;
namespace Ui { class CMainInfoAreaComponent; }
namespace BlackGui
{
namespace Components
@@ -35,6 +33,7 @@ namespace BlackGui
class CFlightPlanComponent;
class CLogComponent;
class CMappingComponent;
class CInterpolationComponent;
class CSettingsComponent;
class CSimulatorComponent;
class CTextMessageComponent;
@@ -57,18 +56,19 @@ namespace BlackGui
enum InfoArea
{
// index must match tab index!
InfoAreaCockpit = 0,
InfoAreaAircraft = 1,
InfoAreaAtc = 2,
InfoAreaUsers = 3,
InfoAreaTextMessages = 4,
InfoAreaSimulator = 5,
InfoAreaFlightPlan = 6,
InfoAreaWeather = 7,
InfoAreaMappings = 8,
InfoAreaLog = 9,
InfoAreaSettings = 10,
InfoAreaNone = -1
InfoAreaCockpit = 0,
InfoAreaAircraft = 1,
InfoAreaAtc = 2,
InfoAreaUsers = 3,
InfoAreaTextMessages = 4,
InfoAreaSimulator = 5,
InfoAreaFlightPlan = 6,
InfoAreaWeather = 7,
InfoAreaMapping = 8, //!< aka rendering, models
InfoAreaInterpolation = 9,
InfoAreaSettings = 10,
InfoAreaLog = 11,
InfoAreaNone = -1
};
//! Cockpit
@@ -81,7 +81,10 @@ namespace BlackGui
CAircraftComponent *getAircraftComponent();
//! Mappings
CMappingComponent *getMappingComponet();
CMappingComponent *getMappingComponent();
//! Interpolation
CInterpolationComponent *getInterpolationComponent();
//! User component
CUserComponent *getUserComponent();

View File

@@ -6,32 +6,13 @@
<rect>
<x>0</x>
<y>0</y>
<width>1630</width>
<width>1779</width>
<height>79</height>
</rect>
</property>
<property name="windowTitle">
<string>Main info area</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/own/icons/own/swift/swift24.png</normaloff>:/own/icons/own/swift/swift24.png</iconset>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="animated">
<bool>false</bool>
</property>
<property name="documentMode">
<bool>false</bool>
</property>
<property name="dockNestingEnabled">
<bool>false</bool>
</property>
<property name="dockOptions">
<set>QMainWindow::AllowTabbedDocks|QMainWindow::ForceTabbedDocks</set>
</property>
<widget class="QWidget" name="qw_centralWidgetEmptyUsedAsPadding">
<property name="enabled">
<bool>false</bool>
@@ -44,10 +25,10 @@
</property>
</widget>
<widget class="BlackGui::CDockWidgetInfoArea" name="dwp_Cockpit">
<property name="maximumSize">
<property name="minimumSize">
<size>
<width>524287</width>
<height>524287</height>
<width>125</width>
<height>33</height>
</size>
</property>
<property name="allowedAreas">
@@ -577,7 +558,7 @@
<set>Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>Rendering</string>
<string>Models</string>
</property>
<attribute name="dockWidgetArea">
<number>4</number>
@@ -626,27 +607,18 @@
</layout>
</widget>
</widget>
<widget class="BlackGui::CDockWidgetInfoArea" name="dwp_Log">
<property name="minimumSize">
<size>
<width>125</width>
<height>70</height>
</size>
</property>
<widget class="BlackGui::CDockWidgetInfoArea" name="dwp_Interpolation">
<property name="allowedAreas">
<set>Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>Log</string>
<string>Interpolation</string>
</property>
<attribute name="dockWidgetArea">
<number>4</number>
</attribute>
<widget class="QWidget" name="qw_LogOuter">
<layout class="QVBoxLayout" name="vl_LogOuter">
<property name="spacing">
<number>0</number>
</property>
<widget class="QWidget" name="qw_InterpolationOuter">
<layout class="QVBoxLayout" name="vl_InterpolationOuter">
<property name="leftMargin">
<number>0</number>
</property>
@@ -660,11 +632,8 @@
<number>0</number>
</property>
<item>
<widget class="QFrame" name="fr_LogInner">
<layout class="QVBoxLayout" name="vl_LogInner">
<property name="spacing">
<number>0</number>
</property>
<widget class="QFrame" name="fr_InterpolationInner">
<layout class="QVBoxLayout" name="vl_InterpolationInner">
<property name="leftMargin">
<number>0</number>
</property>
@@ -678,7 +647,14 @@
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CLogComponent" name="comp_Log"/>
<widget class="BlackGui::Components::CInterpolationComponent" name="comp_Interpolation">
<property name="minimumSize">
<size>
<width>125</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
@@ -755,6 +731,66 @@
</layout>
</widget>
</widget>
<widget class="BlackGui::CDockWidgetInfoArea" name="dwp_Log">
<property name="minimumSize">
<size>
<width>125</width>
<height>70</height>
</size>
</property>
<property name="allowedAreas">
<set>Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>Log</string>
</property>
<attribute name="dockWidgetArea">
<number>4</number>
</attribute>
<widget class="QWidget" name="qw_LogOuter">
<layout class="QVBoxLayout" name="vl_LogOuter">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="fr_LogInner">
<layout class="QVBoxLayout" name="vl_LogInner">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="BlackGui::Components::CLogComponent" name="comp_Log"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<customwidgets>
<customwidget>
@@ -829,6 +865,12 @@
<header>blackgui/components/weathercomponent.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>BlackGui::Components::CInterpolationComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/interpolationcomponent.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View File

@@ -47,6 +47,7 @@ namespace BlackGui
connect(ui->pb_MainFlightplan, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainLog, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainMappings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainInterpolation, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainSettings, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainSimulator, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
connect(ui->pb_MainTextMessages, &QPushButton::released, this, &CMainKeypadAreaComponent::buttonSelected);
@@ -109,7 +110,7 @@ namespace BlackGui
if (ia != CMainInfoAreaComponent::InfoAreaNone)
{
Q_ASSERT(senderButton->isCheckable());
emit selectedMainInfoAreaDockWidget(ia);
emit this->selectedMainInfoAreaDockWidget(ia);
senderButton->setChecked(true); // re-check if got unchecked, we use checked buttons like normal buttons
return;
}
@@ -189,7 +190,8 @@ namespace BlackGui
if (button == ui->pb_MainCockpit) return CMainInfoAreaComponent::InfoAreaCockpit;
if (button == ui->pb_MainFlightplan) return CMainInfoAreaComponent::InfoAreaFlightPlan;
if (button == ui->pb_MainLog) return CMainInfoAreaComponent::InfoAreaLog;
if (button == ui->pb_MainMappings) return CMainInfoAreaComponent::InfoAreaMappings;
if (button == ui->pb_MainMappings) return CMainInfoAreaComponent::InfoAreaMapping;
if (button == ui->pb_MainInterpolation) return CMainInfoAreaComponent::InfoAreaInterpolation;
if (button == ui->pb_MainSettings) return CMainInfoAreaComponent::InfoAreaSettings;
if (button == ui->pb_MainSimulator) return CMainInfoAreaComponent::InfoAreaSimulator;
if (button == ui->pb_MainTextMessages) return CMainInfoAreaComponent::InfoAreaTextMessages;
@@ -207,7 +209,8 @@ namespace BlackGui
case CMainInfoAreaComponent::InfoAreaCockpit: return ui->pb_MainCockpit;
case CMainInfoAreaComponent::InfoAreaFlightPlan: return ui->pb_MainFlightplan;
case CMainInfoAreaComponent::InfoAreaLog: return ui->pb_MainLog;
case CMainInfoAreaComponent::InfoAreaMappings: return ui->pb_MainMappings;
case CMainInfoAreaComponent::InfoAreaMapping: return ui->pb_MainMappings;
case CMainInfoAreaComponent::InfoAreaInterpolation: return ui->pb_MainInterpolation;
case CMainInfoAreaComponent::InfoAreaSettings: return ui->pb_MainSettings;
case CMainInfoAreaComponent::InfoAreaSimulator: return ui->pb_MainSimulator;
case CMainInfoAreaComponent::InfoAreaTextMessages: return ui->pb_MainTextMessages;
@@ -226,6 +229,7 @@ namespace BlackGui
ui->pb_MainFlightplan->setChecked(false);
ui->pb_MainLog->setChecked(false);
ui->pb_MainMappings->setChecked(false);
ui->pb_MainInterpolation->setChecked(false);
ui->pb_MainSettings->setChecked(false);
ui->pb_MainSimulator->setChecked(false);
ui->pb_MainTextMessages->setChecked(false);

View File

@@ -62,8 +62,21 @@
<property name="spacing">
<number>2</number>
</property>
<item row="1" column="4">
<widget class="QPushButton" name="pb_CockpitIdent">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Ident</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="pb_Empty_2">
<widget class="QPushButton" name="pb_Empty">
<property name="enabled">
<bool>false</bool>
</property>
@@ -78,6 +91,35 @@
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QPushButton" name="pb_Audio">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Audio</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pb_MainLog">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Log</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pb_MainFlightplan">
<property name="sizePolicy">
@@ -97,8 +139,8 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pb_MainLog">
<item row="1" column="0">
<widget class="QPushButton" name="pb_Connect">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -106,39 +148,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Log</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QPushButton" name="pb_Audio">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Audio</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pb_Empty">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
<string>Connect</string>
</property>
</widget>
</item>
@@ -150,6 +160,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Models and rendering</string>
</property>
<property name="text">
<string>Models</string>
</property>
@@ -158,8 +171,8 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pb_MainCockpit">
<item row="2" column="0">
<widget class="QPushButton" name="pb_MainAircrafts">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -167,7 +180,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Cockpit</string>
<string>Aircraft</string>
</property>
<property name="checkable">
<bool>true</bool>
@@ -190,8 +203,8 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_Connect">
<item row="1" column="1">
<widget class="QPushButton" name="pb_MainCockpit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -199,74 +212,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pb_MainAircrafts">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Aircraft</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="pb_MainAtc">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ATC</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="pb_Opacity100">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>62</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>100%</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="pb_MainWeather">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Weather</string>
<string>Cockpit</string>
</property>
<property name="checkable">
<bool>true</bool>
@@ -289,6 +235,41 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="pb_MainAtc">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ATC</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="pb_Opacity100">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>62</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>100%</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QPushButton" name="pb_MainUsers">
<property name="sizePolicy">
@@ -305,8 +286,8 @@
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="pb_CockpitIdent">
<item row="3" column="4">
<widget class="QPushButton" name="pb_SoundMute">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -314,7 +295,26 @@
</sizepolicy>
</property>
<property name="text">
<string>Ident</string>
<string>Mute</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pb_MainSettings">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Settings</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
@@ -353,8 +353,8 @@
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QPushButton" name="pb_SoundMute">
<item row="1" column="3">
<widget class="QPushButton" name="pb_MainWeather">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -362,23 +362,26 @@
</sizepolicy>
</property>
<property name="text">
<string>Mute</string>
<string>Weather</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pb_MainSettings">
<item row="4" column="1">
<widget class="QPushButton" name="pb_MainInterpolation">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
<property name="toolTip">
<string>Interpolation</string>
</property>
<property name="text">
<string>Settings</string>
<string>Interpol.</string>
</property>
<property name="checkable">
<bool>true</bool>
@@ -421,7 +424,6 @@
<tabstop>pb_MainAtc</tabstop>
<tabstop>pb_MainUsers</tabstop>
<tabstop>pb_MainSimulator</tabstop>
<tabstop>pb_MainWeather</tabstop>
</tabstops>
<resources/>
<connections/>

View File

@@ -660,7 +660,7 @@ namespace BlackGui
int CInfoArea::countDockedWidgetInfoAreas() const
{
if (!m_tabBar) return 0;
if (!m_tabBar) { return 0; }
return m_tabBar->count();
}
@@ -671,7 +671,7 @@ namespace BlackGui
const QString t(m_tabBar->tabText(tabBarIndex));
// we have a title and search by that (best option, as order does not matter)
if (!t.isEmpty()) { return getDockWidgetInfoAreaByWindowTitle(t); }
if (!t.isEmpty()) { return this->getDockWidgetInfoAreaByWindowTitle(t); }
// no title, we assume the n-th not floating tab is correct
// this will work if the order in m_dockWidgetInfoAreas matches

View File

@@ -773,6 +773,11 @@ namespace BlackMisc
return tableRelationship16();
}
const QPixmap &CIcons::appInterpolation16()
{
return paperPlane16();
}
const QPixmap &CIcons::appLog16()
{
return monitorError16();

View File

@@ -551,6 +551,9 @@ namespace BlackMisc
//! Application mappings
static const QPixmap &appMappings16();
//! Application interpolation
static const QPixmap &appInterpolation16();
//! Application log/status messages
static const QPixmap &appLog16();

View File

@@ -201,6 +201,13 @@ void SwiftGuiStd::setMainPageInfoArea(CMainInfoAreaComponent::InfoArea infoArea)
ui->comp_MainInfoArea->selectArea(infoArea);
}
void SwiftGuiStd::setSettingsPage(int settingsTabIndex)
{
this->setMainPageInfoArea(CMainInfoAreaComponent::InfoAreaSettings);
if (settingsTabIndex < 0) { return; }
ui->comp_MainInfoArea->getSettingsComponent()->setCurrentIndex(settingsTabIndex);
}
bool SwiftGuiStd::isMainPageSelected(SwiftGuiStd::MainPageIndex mainPage) const
{
return ui->sw_MainMiddle->currentIndex() == static_cast<int>(mainPage);

View File

@@ -199,6 +199,9 @@ private:
//! Set the main info area
void setMainPageInfoArea(BlackGui::Components::CMainInfoAreaComponent::InfoArea infoArea);
//! Display the settings page
void setSettingsPage(int settingsTabIndex = -1);
//! Login requested
void loginRequested();

View File

@@ -15,6 +15,7 @@
#include "blackgui/components/flightplancomponent.h"
#include "blackgui/components/logcomponent.h"
#include "blackgui/components/logincomponent.h"
#include "blackgui/components/interpolationcomponent.h"
#include "blackgui/components/maininfoareacomponent.h"
#include "blackgui/components/mainkeypadareacomponent.h"
#include "blackgui/components/mappingcomponent.h"
@@ -138,7 +139,8 @@ void SwiftGuiStd::init()
Q_ASSERT_X(log, Q_FUNC_INFO, "Missing log component");
if (clear) { log->clearConsole(); }
log->appendPlainTextToConsole(logMsg);
}, Qt::QueuedConnection);
},
Qt::QueuedConnection);
Q_ASSERT(s);
s = connect(&m_timerContextWatchdog, &QTimer::timeout, this, &SwiftGuiStd::handleTimerBasedUpdates);
Q_ASSERT(s);
@@ -201,7 +203,7 @@ void SwiftGuiStd::initGuiSignals()
// main keypad
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::selectedMainInfoAreaDockWidget, this, &SwiftGuiStd::setMainPageInfoArea);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::connectPressed, this, &SwiftGuiStd::loginRequested);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::changedOpacity, this , &SwiftGuiStd::onChangedWindowOpacity);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::changedOpacity, this, &SwiftGuiStd::onChangedWindowOpacity);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::identPressed, ui->comp_MainInfoArea->getCockpitComponent(), &CCockpitComponent::setSelectedTransponderModeStateIdent);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::textEntered, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::handleGlobalCommandLineText);
connect(ui->comp_MainKeypadArea, &CMainKeypadAreaComponent::audioPressed, [ = ]
@@ -247,9 +249,15 @@ void SwiftGuiStd::initGuiSignals()
// text messages
connect(ui->comp_MainInfoArea->getAtcStationComponent(), &CAtcStationComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab);
connect(ui->comp_MainInfoArea->getMappingComponet(), &CMappingComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab);
connect(ui->comp_MainInfoArea->getMappingComponent(), &CMappingComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab);
connect(ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::requestTextMessageWidget, ui->comp_MainInfoArea->getTextMessageComponent(), &CTextMessageComponent::showCorrespondingTab);
// interpolation
connect(ui->comp_MainInfoArea->getInterpolationComponent(), &CInterpolationComponent::requestRenderingRestrictionsWidget, [ = ]
{
this->setSettingsPage(CSettingsComponent::SettingTabSimulator);
});
// main info area
connect(ui->comp_MainInfoArea, &CMainInfoAreaComponent::changedWholeInfoAreaFloating, this, &SwiftGuiStd::onChangedMainInfoAreaFloating);
}