[emulated driver] minor fixes

* dialog size
* update sim.value UI fields if emulated simulator changes
* renamed function
This commit is contained in:
Klaus Basan
2020-01-29 20:50:56 +01:00
committed by Mat Sutcliffe
parent 7dcfed613f
commit 6b6a6e0d8e
6 changed files with 15 additions and 14 deletions

View File

@@ -438,7 +438,7 @@ namespace BlackSimPlugin
// update provider, own name, title // update provider, own name, title
this->updateOwnModel(settings.getOwnModel()); this->updateOwnModel(settings.getOwnModel());
this->setObjectName(simulator); this->setObjectName(simulator);
if (m_monitorWidget) { m_monitorWidget->updateWindowTitle(simulator); } if (m_monitorWidget) { m_monitorWidget->updateWindowTitleAndUiValues(simulator); }
} }
void CSimulatorEmulated::connectOwnSignals() void CSimulatorEmulated::connectOwnSignals()

View File

@@ -83,7 +83,7 @@ namespace BlackSimPlugin
this->enableInterpolationLogButtons(false); this->enableInterpolationLogButtons(false);
this->setSimulatorUiValues(); this->setSimulatorUiValues();
this->setInternalAircraftUiValues(); this->setInternalAircraftUiValues();
this->updateWindowTitle(simulator->getSimulatorInfo()); this->updateWindowTitleAndUiValues(simulator->getSimulatorInfo());
} }
CSimulatorEmulatedMonitorDialog::~CSimulatorEmulatedMonitorDialog() CSimulatorEmulatedMonitorDialog::~CSimulatorEmulatedMonitorDialog()
@@ -147,10 +147,11 @@ namespace BlackSimPlugin
ui->pte_TextMessages->setPlainText(message.toQString(true)); ui->pte_TextMessages->setPlainText(message.toQString(true));
} }
void CSimulatorEmulatedMonitorDialog::updateWindowTitle(const CSimulatorInfo &info) void CSimulatorEmulatedMonitorDialog::updateWindowTitleAndUiValues(const CSimulatorInfo &info)
{ {
if (!info.isSingleSimulator()) { return; } if (!info.isSingleSimulator()) { return; }
this->setWindowTitle("Emulated driver : " + info.toQString()); this->setWindowTitle("Emulated driver : " + info.toQString());
this->setSimulatorUiValues();
} }
void CSimulatorEmulatedMonitorDialog::onSimulatorValuesChanged() void CSimulatorEmulatedMonitorDialog::onSimulatorValuesChanged()

View File

@@ -63,7 +63,7 @@ namespace BlackSimPlugin
void displayTextMessage(const BlackMisc::Network::CTextMessage &message); void displayTextMessage(const BlackMisc::Network::CTextMessage &message);
//! The title //! The title
void updateWindowTitle(const BlackMisc::Simulation::CSimulatorInfo &info); void updateWindowTitleAndUiValues(const BlackMisc::Simulation::CSimulatorInfo &info);
private: private:
static int constexpr MaxLogMessages = 500; //!< desired log message number static int constexpr MaxLogMessages = 500; //!< desired log message number

View File

@@ -68,7 +68,7 @@
<item> <item>
<widget class="QTabWidget" name="tw_SwiftMonitorDialog"> <widget class="QTabWidget" name="tw_SwiftMonitorDialog">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>4</number>
</property> </property>
<widget class="QWidget" name="tb_AircraftSituation"> <widget class="QWidget" name="tb_AircraftSituation">
<attribute name="title"> <attribute name="title">
@@ -658,18 +658,18 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>BlackGui::Components::CLogComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/logcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>BlackGui::Components::CSettingsSwiftPlugin</class> <class>BlackGui::Components::CSettingsSwiftPlugin</class>
<extends>QFrame</extends> <extends>QFrame</extends>
<header>blackgui/components/settingsswiftplugin.h</header> <header>blackgui/components/settingsswiftplugin.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>BlackGui::Components::CLogComponent</class>
<extends>QFrame</extends>
<header>blackgui/components/logcomponent.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>BlackGui::Editors::CSituationForm</class> <class>BlackGui::Editors::CSituationForm</class>
<extends>QFrame</extends> <extends>QFrame</extends>

View File

@@ -6,13 +6,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>500</width>
<height>300</height> <height>300</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>500</width>
<height>300</height> <height>300</height>
</size> </size>
</property> </property>

View File

@@ -528,7 +528,7 @@ namespace BlackSimPlugin
if (m_isConnecting || isOk(m_lobbyClient->connectFs9ToHost(m_fs9Host->getHostAddress()))) if (m_isConnecting || isOk(m_lobbyClient->connectFs9ToHost(m_fs9Host->getHostAddress())))
{ {
m_isConnecting = true; m_isConnecting = true;
CLogMessage(this).info(u"swift is joining FS9 to the multiplayer session..."); CLogMessage(this).info(u"swift is joining FS9 to the multiplayer session ...");
} }
} }