mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Ref T554, "auto publish test data" for emulated driver
This commit is contained in:
committed by
Mat Sutcliffe
parent
0f4629d8f4
commit
4fb0db01bd
@@ -10,8 +10,10 @@
|
||||
#include "simulatoremulated.h"
|
||||
#include "ui_simulatoremulatedmonitordialog.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
#include <QIntValidator>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Simulation;
|
||||
@@ -24,7 +26,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
const CLogCategoryList &CSimulatorEmulatedMonitorDialog::getLogCategories()
|
||||
{
|
||||
static const BlackMisc::CLogCategoryList cats { CLogCategory::driver(), CLogCategory::plugin() };
|
||||
static const CLogCategoryList cats { CLogCategory::driver(), CLogCategory::plugin() };
|
||||
return cats;
|
||||
}
|
||||
|
||||
@@ -64,6 +66,7 @@ namespace BlackSimPlugin
|
||||
connect(ui->pb_InterpolatorStartLog, &QPushButton::clicked, this, &CSimulatorEmulatedMonitorDialog::interpolatorLogButton);
|
||||
connect(ui->pb_InterpolatorFetch, &QPushButton::clicked, this, &CSimulatorEmulatedMonitorDialog::interpolatorLogButton);
|
||||
connect(ui->pb_EmitAddedFailed, &QPushButton::clicked, this, &CSimulatorEmulatedMonitorDialog::emitSignal);
|
||||
connect(ui->pb_AddAutoPublishData, &QPushButton::clicked, this, &CSimulatorEmulatedMonitorDialog::addAutoPublishTestData);
|
||||
|
||||
ui->led_Receiving->setToolTips("receiving", "idle");
|
||||
ui->led_Receiving->setShape(CLedWidget::Rounded);
|
||||
@@ -292,5 +295,10 @@ namespace BlackSimPlugin
|
||||
emit m_simulator->physicallyAddingRemoteModelFailed(aircraft, true, ui->cb_Failover->isChecked(), msg);
|
||||
}
|
||||
}
|
||||
|
||||
void CSimulatorEmulatedMonitorDialog::addAutoPublishTestData()
|
||||
{
|
||||
m_simulator->m_autoPublishing.testData();
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -107,6 +107,9 @@ namespace BlackSimPlugin
|
||||
//! Emit a simulator signal
|
||||
void emitSignal();
|
||||
|
||||
//! Test data for auto publishing
|
||||
void addAutoPublishTestData();
|
||||
|
||||
QScopedPointer<Ui::CSimulatorEmulatedMonitorDialog> ui;
|
||||
CSimulatorEmulated *m_simulator = nullptr;
|
||||
QTimer m_uiUpdateTimer;
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<spacer name="hs_AddedFailed">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -552,6 +552,22 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_AutoPublish">
|
||||
<property name="title">
|
||||
<string>Auto publish</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item alignment="Qt::AlignRight">
|
||||
<widget class="QPushButton" name="pb_AddAutoPublishData">
|
||||
<property name="text">
|
||||
<string>add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_LogMessages">
|
||||
<property name="sizePolicy">
|
||||
@@ -574,8 +590,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>546</width>
|
||||
<height>369</height>
|
||||
<width>535</width>
|
||||
<height>339</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_LogMessagesScrollArea">
|
||||
@@ -679,6 +695,11 @@
|
||||
<tabstop>tw_SwiftMonitorDialog</tabstop>
|
||||
<tabstop>le_SimulatorPlugin</tabstop>
|
||||
<tabstop>le_Simulator</tabstop>
|
||||
<tabstop>cb_Connected</tabstop>
|
||||
<tabstop>cb_Simulating</tabstop>
|
||||
<tabstop>cb_Paused</tabstop>
|
||||
<tabstop>cb_Failover</tabstop>
|
||||
<tabstop>pb_EmitAddedFailed</tabstop>
|
||||
<tabstop>le_InterpolatorTimeMs</tabstop>
|
||||
<tabstop>pb_InterpolatorFetch</tabstop>
|
||||
<tabstop>pb_InterpolatorClearLog</tabstop>
|
||||
@@ -695,6 +716,7 @@
|
||||
<tabstop>le_SituationAdded</tabstop>
|
||||
<tabstop>le_PartsAdded</tabstop>
|
||||
<tabstop>le_PartsEnabledAircraft</tabstop>
|
||||
<tabstop>pb_AddAutoPublishData</tabstop>
|
||||
<tabstop>sa_LogMessages</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
@@ -706,8 +728,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>255</x>
|
||||
<y>585</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
@@ -722,8 +744,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>323</x>
|
||||
<y>585</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
|
||||
Reference in New Issue
Block a user