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