mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
Own model set dialog / dialog improvements
* better terms * clear button to clear own model set
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>720</width>
|
||||||
<height>480</height>
|
<height>500</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|||||||
@@ -79,17 +79,19 @@ namespace BlackGui
|
|||||||
//! \fixme hardcoded style sheet
|
//! \fixme hardcoded style sheet
|
||||||
ui->pb_SaveAsSetForSimulator->setStyleSheet("padding-left: 3px; padding-right: 3px;");
|
ui->pb_SaveAsSetForSimulator->setStyleSheet("padding-left: 3px; padding-right: 3px;");
|
||||||
|
|
||||||
connect(ui->pb_CreateNewSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_CreateNewSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->pb_LoadExistingSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_LoadExistingSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->pb_SaveAsSetForSimulator, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_ShowStatistics, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->pb_ShowStatistics, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_FirstSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->pb_CopyFromAnotherSwift, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_Clear, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->pb_FirstSet, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked);
|
connect(ui->pb_CopyFromAnotherSwift, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CDbOwnModelSetComponent::setSimulator, Qt::QueuedConnection);
|
connect(ui->pb_SaveAsSetForSimulator, &QPushButton::clicked, this, &CDbOwnModelSetComponent::buttonClicked, Qt::QueuedConnection);
|
||||||
connect(ui->tvp_OwnModelSet, &CAircraftModelView::modelDataChanged, this, &CDbOwnModelSetComponent::onRowCountChanged);
|
|
||||||
connect(ui->tvp_OwnModelSet, &CAircraftModelView::modelChanged, this, &CDbOwnModelSetComponent::viewModelChanged);
|
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CDbOwnModelSetComponent::setSimulator, Qt::QueuedConnection);
|
||||||
connect(ui->tvp_OwnModelSet, &CAircraftModelView::jsonModelsForSimulatorLoaded, this, &CDbOwnModelSetComponent::onJsonDataLoaded);
|
connect(ui->tvp_OwnModelSet, &CAircraftModelView::modelDataChanged, this, &CDbOwnModelSetComponent::onRowCountChanged, Qt::QueuedConnection);
|
||||||
connect(ui->tvp_OwnModelSet, &CAircraftModelView::requestUpdate, this, &CDbOwnModelSetComponent::updateViewToCurrentModels);
|
connect(ui->tvp_OwnModelSet, &CAircraftModelView::modelChanged, this, &CDbOwnModelSetComponent::viewModelChanged, Qt::QueuedConnection);
|
||||||
|
connect(ui->tvp_OwnModelSet, &CAircraftModelView::requestUpdate, this, &CDbOwnModelSetComponent::updateViewToCurrentModels, Qt::QueuedConnection);
|
||||||
|
connect(ui->tvp_OwnModelSet, &CAircraftModelView::jsonModelsForSimulatorLoaded, this, &CDbOwnModelSetComponent::onJsonDataLoaded, Qt::QueuedConnection);
|
||||||
|
|
||||||
this->triggerSetSimulatorDeferred(simulator);
|
this->triggerSetSimulatorDeferred(simulator);
|
||||||
}
|
}
|
||||||
@@ -265,6 +267,12 @@ namespace BlackGui
|
|||||||
this->copyFromAnotherSwift();
|
this->copyFromAnotherSwift();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sender == ui->pb_Clear)
|
||||||
|
{
|
||||||
|
ui->tvp_OwnModelSet->clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDbOwnModelSetComponent::onRowCountChanged(int count, bool withFilter)
|
void CDbOwnModelSetComponent::onRowCountChanged(int count, bool withFilter)
|
||||||
|
|||||||
@@ -116,6 +116,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pb_Clear">
|
||||||
|
<property name="text">
|
||||||
|
<string>clear set</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pb_CreateNewSet">
|
<widget class="QPushButton" name="pb_CreateNewSet">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@@ -196,6 +203,17 @@
|
|||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>tvp_OwnModelSet</tabstop>
|
||||||
|
<tabstop>le_Simulator</tabstop>
|
||||||
|
<tabstop>pb_ShowStatistics</tabstop>
|
||||||
|
<tabstop>pb_Clear</tabstop>
|
||||||
|
<tabstop>pb_CreateNewSet</tabstop>
|
||||||
|
<tabstop>pb_FirstSet</tabstop>
|
||||||
|
<tabstop>pb_CopyFromAnotherSwift</tabstop>
|
||||||
|
<tabstop>pb_LoadExistingSet</tabstop>
|
||||||
|
<tabstop>pb_SaveAsSetForSimulator</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>350</width>
|
<width>600</width>
|
||||||
<height>376</height>
|
<height>400</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>selected</string>
|
<string>selected from below</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string notr="true">bg_Distributors</string>
|
<string notr="true">bg_Distributors</string>
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
<item row="3" column="3">
|
<item row="3" column="3">
|
||||||
<widget class="QRadioButton" name="rb_DistributorsAll">
|
<widget class="QRadioButton" name="rb_DistributorsAll">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>all</string>
|
<string>all from below</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_Distributors">
|
<widget class="QGroupBox" name="gb_Distributors">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Distributors</string>
|
<string>Distributor selection</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_Distributors">
|
<layout class="QVBoxLayout" name="vl_Distributors">
|
||||||
<item>
|
<item>
|
||||||
@@ -305,9 +305,9 @@
|
|||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="bg_SourceSet"/>
|
|
||||||
<buttongroup name="bg_Distributors"/>
|
|
||||||
<buttongroup name="bg_Mode"/>
|
|
||||||
<buttongroup name="bg_Displayed"/>
|
<buttongroup name="bg_Displayed"/>
|
||||||
|
<buttongroup name="bg_SourceSet"/>
|
||||||
|
<buttongroup name="bg_Mode"/>
|
||||||
|
<buttongroup name="bg_Distributors"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user