mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 16:25:54 +08:00
UI improvements
* mapping component does not need extra identifier as it uses "Identifiable" * misc smaller adjustments
This commit is contained in:
@@ -100,7 +100,7 @@ namespace BlackGui
|
|||||||
const bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AircraftInRange);
|
const bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AircraftInRange);
|
||||||
if (this->countAircraftInView() < 1 || visible)
|
if (this->countAircraftInView() < 1 || visible)
|
||||||
{
|
{
|
||||||
ui->tvp_AircraftInRange->updateContainer(sGui->getIContextNetwork()->getAircraftInRange());
|
ui->tvp_AircraftInRange->updateContainerMaybeAsync(sGui->getIContextNetwork()->getAircraftInRange());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sGui->getIContextSimulator()->getSimulatorStatus() > 0)
|
if (sGui->getIContextSimulator()->getSimulatorStatus() > 0)
|
||||||
@@ -108,7 +108,7 @@ namespace BlackGui
|
|||||||
const bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AirportsInRange);
|
const bool visible = (this->isVisibleWidget() && this->currentWidget() == ui->tb_AirportsInRange);
|
||||||
if (this->countAirportsInRangeInView() < 1 || visible)
|
if (this->countAirportsInRangeInView() < 1 || visible)
|
||||||
{
|
{
|
||||||
ui->tvp_AirportsInRange->updateContainer(sGui->getIContextSimulator()->getAirportsInRange());
|
ui->tvp_AirportsInRange->updateContainerMaybeAsync(sGui->getIContextSimulator()->getAirportsInRange());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<layout class="QVBoxLayout" name="vl_IntroPage">
|
<layout class="QVBoxLayout" name="vl_IntroPage">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="fr_Introduction">
|
<widget class="QFrame" name="fr_Introduction">
|
||||||
<layout class="QHBoxLayout" name="hl_Introduction">
|
<layout class="QHBoxLayout" name="hl_Introduction" stretch="0,1">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -52,26 +52,16 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_IntroText">
|
<widget class="QLabel" name="lbl_IntroText">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>You are about to write a new mapping for your current model to the swift DB. Hereby you agree<br/>with the swift CLA and license terms. For details please consult the swift about and legal page.<br/>Thank you for supporting swift</p></body></html></string>
|
<string><html><head/><body><p>You are about to write a new mapping for your current model to the swift DB. Hereby you agree with the swift CLA and license terms. For details please consult the swift about and legal page. </p><p>Thank you for supporting swift</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="hs_Introduction">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -519,6 +509,12 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CDbDistributorComponent</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/components/dbdistributorcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
|
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
@@ -567,12 +563,6 @@
|
|||||||
<header>blackgui/editors/aircraftmodelform.h</header>
|
<header>blackgui/editors/aircraftmodelform.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>BlackGui::Components::CDbDistributorComponent</class>
|
|
||||||
<extends>QFrame</extends>
|
|
||||||
<header>blackgui/components/dbdistributorcomponent.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::Components::CDbLoginComponent</class>
|
<class>BlackGui::Components::CDbLoginComponent</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ namespace BlackGui
|
|||||||
QPointer<CMappingComponent> myself(this);
|
QPointer<CMappingComponent> myself(this);
|
||||||
QTimer::singleShot(2500, this, [ = ]
|
QTimer::singleShot(2500, this, [ = ]
|
||||||
{
|
{
|
||||||
|
if (!myself) { return; }
|
||||||
const CSimulatorInfo simulator(myself->getConnectedOrSelectedSimulator());
|
const CSimulatorInfo simulator(myself->getConnectedOrSelectedSimulator());
|
||||||
myself->onModelSetSimulatorChanged(simulator);
|
myself->onModelSetSimulatorChanged(simulator);
|
||||||
myself->onModelSetChanged(simulator);
|
myself->onModelSetChanged(simulator);
|
||||||
@@ -512,6 +513,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CMappingComponent::updateRenderedAircraftView(bool forceUpdate)
|
void CMappingComponent::updateRenderedAircraftView(bool forceUpdate)
|
||||||
{
|
{
|
||||||
|
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||||
m_updateTimer.start(); // restart
|
m_updateTimer.start(); // restart
|
||||||
if (!forceUpdate && !this->isVisibleWidget())
|
if (!forceUpdate && !this->isVisibleWidget())
|
||||||
{
|
{
|
||||||
@@ -524,7 +526,7 @@ namespace BlackGui
|
|||||||
if (sGui->getIContextSimulator()->getSimulatorStatus() > 0)
|
if (sGui->getIContextSimulator()->getSimulatorStatus() > 0)
|
||||||
{
|
{
|
||||||
const CSimulatedAircraftList aircraft(sGui->getIContextNetwork()->getAircraftInRange());
|
const CSimulatedAircraftList aircraft(sGui->getIContextNetwork()->getAircraftInRange());
|
||||||
ui->tvp_RenderedAircraft->updateContainer(aircraft);
|
ui->tvp_RenderedAircraft->updateContainerMaybeAsync(aircraft);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -168,9 +168,6 @@ namespace BlackGui
|
|||||||
//! Connection status has been changed
|
//! Connection status has been changed
|
||||||
void onNetworkConnectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to);
|
void onNetworkConnectionStatusChanged(BlackCore::INetwork::ConnectionStatus from, BlackCore::INetwork::ConnectionStatus to);
|
||||||
|
|
||||||
//! Identifier for data send from this component
|
|
||||||
const BlackMisc::CIdentifier &mappingIdentifier() const { return m_identifier; }
|
|
||||||
|
|
||||||
//! Update simulated aircraft view
|
//! Update simulated aircraft view
|
||||||
void updateRenderedAircraftView(bool forceUpdate = false);
|
void updateRenderedAircraftView(bool forceUpdate = false);
|
||||||
|
|
||||||
@@ -192,7 +189,6 @@ namespace BlackGui
|
|||||||
QTimer m_updateTimer;
|
QTimer m_updateTimer;
|
||||||
BlackMisc::CTokenBucket m_bucket { 3, BlackMisc::PhysicalQuantities::CTime(5.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()), 1};
|
BlackMisc::CTokenBucket m_bucket { 3, BlackMisc::PhysicalQuantities::CTime(5.0, BlackMisc::PhysicalQuantities::CTimeUnit::s()), 1};
|
||||||
Views::CCheckBoxDelegate *m_currentMappingsViewDelegate = nullptr; //! checkbox in view
|
Views::CCheckBoxDelegate *m_currentMappingsViewDelegate = nullptr; //! checkbox in view
|
||||||
BlackMisc::CIdentifier m_identifier { "MappingComponent", this };
|
|
||||||
BlackMisc::CSettingReadOnly<BlackGui::Settings::TViewUpdateSettings> m_settings { this, &CMappingComponent::settingsChanged }; //!< settings changed
|
BlackMisc::CSettingReadOnly<BlackGui::Settings::TViewUpdateSettings> m_settings { this, &CMappingComponent::settingsChanged }; //!< settings changed
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ namespace BlackGui
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CModelMatcherComponent();
|
virtual ~CModelMatcherComponent();
|
||||||
|
|
||||||
public slots:
|
|
||||||
//! Tab (where this component is embedded) has been changed
|
//! Tab (where this component is embedded) has been changed
|
||||||
void tabIndexChanged(int index);
|
void tabIndexChanged(int index);
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,12 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Views::CNameVariantPairView" name="tvp_LiveData">
|
<widget class="BlackGui::Views::CNameVariantPairView" name="tvp_LiveData">
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::NoSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
<attribute name="verticalHeaderVisible">
|
<attribute name="verticalHeaderVisible">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|||||||
Reference in New Issue
Block a user