[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
this->updateOwnModel(settings.getOwnModel());
this->setObjectName(simulator);
if (m_monitorWidget) { m_monitorWidget->updateWindowTitle(simulator); }
if (m_monitorWidget) { m_monitorWidget->updateWindowTitleAndUiValues(simulator); }
}
void CSimulatorEmulated::connectOwnSignals()

View File

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

View File

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

View File

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

View File

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

View File

@@ -528,7 +528,7 @@ namespace BlackSimPlugin
if (m_isConnecting || isOk(m_lobbyClient->connectFs9ToHost(m_fs9Host->getHostAddress())))
{
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 ...");
}
}