mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Some smaller mapping tool improvements
* allow to remove NON DB models (context menu) * renamed radio buttons
This commit is contained in:
committed by
Mat Sutcliffe
parent
7b8db694cc
commit
decdbb4432
@@ -342,6 +342,15 @@ namespace BlackGui
|
|||||||
this->setModelSet(models, simulator);
|
this->setModelSet(models, simulator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDbOwnModelSetComponent::removeNonDBModels()
|
||||||
|
{
|
||||||
|
const CSimulatorInfo simulator = this->getModelSetSimulator();
|
||||||
|
CAircraftModelList models = ui->tvp_OwnModelSet->containerOrFilteredContainer();
|
||||||
|
const int r = models.removeObjectsWithoutDbKey();
|
||||||
|
if (r < 1) { return; }
|
||||||
|
this->setModelSet(models, simulator);
|
||||||
|
}
|
||||||
|
|
||||||
void CDbOwnModelSetComponent::viewModelChanged()
|
void CDbOwnModelSetComponent::viewModelChanged()
|
||||||
{
|
{
|
||||||
const bool hasData = ui->tvp_OwnModelSet->rowCount() > 0;
|
const bool hasData = ui->tvp_OwnModelSet->rowCount() > 0;
|
||||||
@@ -596,6 +605,10 @@ namespace BlackGui
|
|||||||
a = new QAction(CIcons::delete16(), "Remove excluded models", this);
|
a = new QAction(CIcons::delete16(), "Remove excluded models", this);
|
||||||
connect(a, &QAction::triggered, ownModelSetComp, &CDbOwnModelSetComponent::removeExcludedModels, Qt::QueuedConnection);
|
connect(a, &QAction::triggered, ownModelSetComp, &CDbOwnModelSetComponent::removeExcludedModels, Qt::QueuedConnection);
|
||||||
m_setActions.append(a);
|
m_setActions.append(a);
|
||||||
|
|
||||||
|
a = new QAction(CIcons::delete16(), "Remove non DB models", this);
|
||||||
|
connect(a, &QAction::triggered, ownModelSetComp, &CDbOwnModelSetComponent::removeNonDBModels, Qt::QueuedConnection);
|
||||||
|
m_setActions.append(a);
|
||||||
}
|
}
|
||||||
menuActions.addMenuModelSet();
|
menuActions.addMenuModelSet();
|
||||||
menuActions.addActions(m_setActions, CMenuAction::pathModelSet());
|
menuActions.addActions(m_setActions, CMenuAction::pathModelSet());
|
||||||
|
|||||||
@@ -155,6 +155,9 @@ namespace BlackGui
|
|||||||
//! Remove excluded models
|
//! Remove excluded models
|
||||||
void removeExcludedModels();
|
void removeExcludedModels();
|
||||||
|
|
||||||
|
//! Remove NON DB models
|
||||||
|
void removeNonDBModels();
|
||||||
|
|
||||||
//! Default file name
|
//! Default file name
|
||||||
void setSaveFileName(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
void setSaveFileName(const BlackMisc::Simulation::CSimulatorInfo &simulator);
|
||||||
|
|
||||||
|
|||||||
@@ -158,8 +158,11 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QRadioButton" name="rb_DistributorsFromBelow">
|
<widget class="QRadioButton" name="rb_DistributorsFromBelow">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>all distributors shown below</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>all from below</string>
|
<string>all shown below</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string notr="true">bg_Distributors</string>
|
<string notr="true">bg_Distributors</string>
|
||||||
@@ -175,6 +178,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
<widget class="QRadioButton" name="rb_DistributorsSelected">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>all selected distributors from below</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>selected from below</string>
|
<string>selected from below</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -186,7 +192,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 from below</string>
|
<string>all distributors</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -305,9 +311,9 @@
|
|||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
|
<buttongroup name="bg_Mode"/>
|
||||||
<buttongroup name="bg_Displayed"/>
|
<buttongroup name="bg_Displayed"/>
|
||||||
<buttongroup name="bg_SourceSet"/>
|
<buttongroup name="bg_SourceSet"/>
|
||||||
<buttongroup name="bg_Mode"/>
|
|
||||||
<buttongroup name="bg_Distributors"/>
|
<buttongroup name="bg_Distributors"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user