mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #361, own reader to fix unbalanced " issue
* some functions renamed * move some code from .h to .cpp * adjusted samples
This commit is contained in:
@@ -95,7 +95,7 @@ namespace BlackGui
|
||||
Q_ASSERT(getIContextNetwork());
|
||||
connect(getIContextSimulator(), &IContextSimulator::installedAircraftModelsChanged, this, &CMappingComponent::ps_onAircraftModelsLoaded);
|
||||
connect(getIContextSimulator(), &IContextSimulator::modelMatchingCompleted, this, &CMappingComponent::ps_onModelMatchingCompleted);
|
||||
connect(getIContextNetwork(), &IContextNetwork::changedRemoteAircraftModel, this, &CMappingComponent::ps_onRenderedAircraftModelChanged);
|
||||
connect(getIContextNetwork(), &IContextNetwork::changedRemoteAircraftModel, this, &CMappingComponent::ps_onRemoteAircraftModelChanged);
|
||||
connect(getIContextNetwork(), &IContextNetwork::changedRemoteAircraftEnabled, this, &CMappingComponent::ps_onChangedAircraftEnabled);
|
||||
connect(getIContextNetwork(), &IContextNetwork::changedFastPositionUpdates, this, &CMappingComponent::ps_onFastPositionUpdatesEnabled);
|
||||
connect(getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CMappingComponent::ps_onConnectionStatusChanged);
|
||||
@@ -177,7 +177,8 @@ namespace BlackGui
|
||||
const int MaxHeight = 125;
|
||||
this->ui->lbl_AircraftIconDisplayed->setText("");
|
||||
this->ui->lbl_AircraftIconDisplayed->setToolTip(model.getDescription());
|
||||
CPixmap pm = this->getIContextSimulator()->iconForModel(model.getModelString());
|
||||
QString modelString(model.getModelString());
|
||||
CPixmap pm = this->getIContextSimulator()->iconForModel(modelString);
|
||||
if (pm.isNull())
|
||||
{
|
||||
this->ui->lbl_AircraftIconDisplayed->setPixmap(CIcons::crossWhite16());
|
||||
@@ -301,7 +302,7 @@ namespace BlackGui
|
||||
this->ui->le_AircraftModel->setCompleter(this->m_modelCompleter);
|
||||
}
|
||||
|
||||
void CMappingComponent::ps_onRenderedAircraftModelChanged(const CSimulatedAircraft &aircraft, const QString &originator)
|
||||
void CMappingComponent::ps_onRemoteAircraftModelChanged(const CSimulatedAircraft &aircraft, const QString &originator)
|
||||
{
|
||||
this->updateSimulatedAircraftView();
|
||||
Q_UNUSED(originator);
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace BlackGui
|
||||
void ps_onModelsUpdateRequested();
|
||||
|
||||
//! Rendered aircraft changed in backend
|
||||
void ps_onRenderedAircraftModelChanged(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const QString &originator);
|
||||
void ps_onRemoteAircraftModelChanged(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const QString &originator);
|
||||
|
||||
//! Aircraft enabled, disabled in backend
|
||||
void ps_onChangedAircraftEnabled(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const QString &originator);
|
||||
|
||||
@@ -64,6 +64,12 @@
|
||||
</item>
|
||||
<item row="0" column="0" colspan="5">
|
||||
<widget class="QTabWidget" name="tw_ListViews">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -86,6 +92,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CSimulatedAircraftView" name="tvp_SimulatedAircraft">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
@@ -118,6 +130,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CAircraftModelView" name="tvp_AircraftModels">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
|
||||
Reference in New Issue
Block a user