mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
UI adjustment to find root cause for crash dump 127
This commit is contained in:
@@ -95,6 +95,7 @@ namespace BlackGui
|
||||
void CDbOwnModelSetFormDialog::simulatorChanged(const CSimulatorInfo &simulator)
|
||||
{
|
||||
Q_ASSERT_X(this->getMappingComponent(), Q_FUNC_INFO, "missing mapping component");
|
||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
||||
this->setSimulator(simulator);
|
||||
this->getMappingComponent()->setOwnModelsSimulator(simulator);
|
||||
this->getMappingComponent()->setOwnModelSetSimulator(simulator);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <QRadioButton>
|
||||
#include <QtGlobal>
|
||||
#include <QPointer>
|
||||
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackGui::Models;
|
||||
@@ -36,11 +37,16 @@ namespace BlackGui
|
||||
ui->comp_SimulatorSelector->setMode(CSimulatorSelector::RadioButtons);
|
||||
ui->comp_SimulatorSelector->setLeftMargin(0);
|
||||
|
||||
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &COwnModelSetForm::onSimulatorChanged);
|
||||
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &COwnModelSetForm::onSimulatorChanged, Qt::QueuedConnection);
|
||||
connect(ui->rb_DisplayAllDistributors, &QRadioButton::clicked, this, &COwnModelSetForm::changeDistributorDisplay);
|
||||
connect(ui->rb_DisplayPreferencesDistributors, &QRadioButton::clicked, this, &COwnModelSetForm::changeDistributorDisplay);
|
||||
|
||||
this->onSimulatorChanged(ui->comp_SimulatorSelector->getValue());
|
||||
QPointer<COwnModelSetForm> myself(this);
|
||||
QTimer::singleShot(1250, [ = ]
|
||||
{
|
||||
if (!myself) { return; }
|
||||
this->onSimulatorChanged(ui->comp_SimulatorSelector->getValue());
|
||||
});
|
||||
}
|
||||
|
||||
COwnModelSetForm::~COwnModelSetForm()
|
||||
@@ -95,6 +101,7 @@ namespace BlackGui
|
||||
|
||||
void COwnModelSetForm::onSimulatorChanged(const CSimulatorInfo &simulator)
|
||||
{
|
||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Expect single simulator");
|
||||
this->setSimulator(simulator);
|
||||
this->reloadData();
|
||||
emit this->simulatorChanged(simulator);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
||||
explicit COwnModelSetForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~COwnModelSetForm();
|
||||
virtual ~COwnModelSetForm() override;
|
||||
|
||||
//! Reload data
|
||||
void reloadData();
|
||||
|
||||
@@ -6,10 +6,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>433</width>
|
||||
<height>324</height>
|
||||
<width>450</width>
|
||||
<height>350</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
@@ -27,211 +33,192 @@
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gq_OwnModelSetForm">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
<widget class="QGroupBox" name="gb_Selection">
|
||||
<property name="title">
|
||||
<string>Selection</string>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QRadioButton" name="rb_DbDataOnly">
|
||||
<property name="toolTip">
|
||||
<string>Own models for which DB data are available</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DB data only</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_SourceSet</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QRadioButton" name="rb_WithIcaoData">
|
||||
<property name="toolTip">
|
||||
<string>Model has ICAO code, but not necessarily valid data</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> ICAO data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_SourceSet</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_Providers">
|
||||
<property name="text">
|
||||
<string>Distributors:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SelectSourceSet">
|
||||
<property name="text">
|
||||
<string>Source set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_Mode">
|
||||
<property name="text">
|
||||
<string>Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QRadioButton" name="rb_DbIcaoCodesOnly">
|
||||
<property name="toolTip">
|
||||
<string>Model has ICAO code known in DB</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DB ICAO data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_SourceSet</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="rb_Full">
|
||||
<property name="toolTip">
|
||||
<string>new set, existing data will be deleted</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>full</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_Mode</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QRadioButton" name="rb_Incremental">
|
||||
<property name="toolTip">
|
||||
<string>add to existing set</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>incremental</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_Mode</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
||||
<property name="text">
|
||||
<string>selected</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_Distributors</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="cb_ConsolidateModelSet">
|
||||
<property name="text">
|
||||
<string>consolidate with DB</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Simulator">
|
||||
<property name="text">
|
||||
<string>Simulator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QRadioButton" name="rb_DisplayPreferencesDistributors">
|
||||
<property name="text">
|
||||
<string>from preferences</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_DisplayedDistributors</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QCheckBox" name="cb_SortByPreferences">
|
||||
<property name="toolTip">
|
||||
<string>If checked the distributors from the settings page will be used</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>sort by dist. preferences</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QRadioButton" name="rb_DisplayAllDistributors">
|
||||
<property name="text">
|
||||
<string>all distributors</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_DisplayedDistributors</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QRadioButton" name="rb_DistributorsAll">
|
||||
<property name="text">
|
||||
<string>all</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_Distributors</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QRadioButton" name="rb_DistributorsFromBelow">
|
||||
<property name="text">
|
||||
<string>all from below</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">bg_Distributors</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<layout class="QGridLayout" name="gl_Selection">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_Mode">
|
||||
<property name="text">
|
||||
<string>Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="rb_Full">
|
||||
<property name="toolTip">
|
||||
<string>new set, existing data will be deleted</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>full</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Simulator">
|
||||
<property name="text">
|
||||
<string>Simulator:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QRadioButton" name="rb_Incremental">
|
||||
<property name="toolTip">
|
||||
<string>add to existing set</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>incremental</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QRadioButton" name="rb_DbIcaoCodesOnly">
|
||||
<property name="toolTip">
|
||||
<string>Model has ICAO code known in DB</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DB ICAO data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QRadioButton" name="rb_WithIcaoData">
|
||||
<property name="toolTip">
|
||||
<string>Model has ICAO code, but not necessarily valid data</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> ICAO data</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="cb_ConsolidateModelSet">
|
||||
<property name="text">
|
||||
<string>consolidate with DB</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SelectSourceSet">
|
||||
<property name="text">
|
||||
<string>Source set:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="3">
|
||||
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QRadioButton" name="rb_DbDataOnly">
|
||||
<property name="toolTip">
|
||||
<string>Own models for which DB data are available</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DB data only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_Providers">
|
||||
<property name="text">
|
||||
<string>Distributors:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
||||
<property name="text">
|
||||
<string>selected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QRadioButton" name="rb_DisplayPreferencesDistributors">
|
||||
<property name="text">
|
||||
<string>from preferences</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QRadioButton" name="rb_DistributorsFromBelow">
|
||||
<property name="text">
|
||||
<string>all from below</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QRadioButton" name="rb_DistributorsAll">
|
||||
<property name="text">
|
||||
<string>all</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QRadioButton" name="rb_DisplayAllDistributors">
|
||||
<property name="text">
|
||||
<string>all distributors</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QCheckBox" name="cb_SortByPreferences">
|
||||
<property name="toolTip">
|
||||
<string>If checked the distributors from the settings page will be used</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>sort by dist. preferences</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CDistributorView" name="tvp_Distributors">
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
<widget class="QGroupBox" name="gb_Distributors">
|
||||
<property name="title">
|
||||
<string>Distributors</string>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_Distributors">
|
||||
<item>
|
||||
<widget class="BlackGui::Views::CDistributorView" name="tvp_Distributors">
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="showGrid">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -249,27 +236,12 @@
|
||||
<header>blackgui/views/distributorview.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>rb_Full</tabstop>
|
||||
<tabstop>rb_Incremental</tabstop>
|
||||
<tabstop>cb_ConsolidateModelSet</tabstop>
|
||||
<tabstop>rb_DbDataOnly</tabstop>
|
||||
<tabstop>rb_DbIcaoCodesOnly</tabstop>
|
||||
<tabstop>rb_WithIcaoData</tabstop>
|
||||
<tabstop>rb_DistributorsSelected</tabstop>
|
||||
<tabstop>rb_DistributorsFromBelow</tabstop>
|
||||
<tabstop>rb_DistributorsAll</tabstop>
|
||||
<tabstop>rb_DisplayPreferencesDistributors</tabstop>
|
||||
<tabstop>rb_DisplayAllDistributors</tabstop>
|
||||
<tabstop>cb_SortByPreferences</tabstop>
|
||||
<tabstop>tvp_Distributors</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="bg_SourceSet"/>
|
||||
<buttongroup name="bg_Distributors"/>
|
||||
<buttongroup name="bg_Mode"/>
|
||||
<buttongroup name="bg_DisplayedDistributors"/>
|
||||
<buttongroup name="bg_SourceSet"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user