mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Removed old model/views for aircraft, now all with simulated aircraft
Updates of models in view now manually / automatic possible Allow to reload models (in backend)
This commit is contained in:
@@ -38,6 +38,11 @@ namespace BlackGui
|
||||
this->m_model->setAircraftModelMode(mode);
|
||||
}
|
||||
|
||||
bool CAircraftModelView::displayAutomatically() const
|
||||
{
|
||||
return m_displayAutomatically;
|
||||
}
|
||||
|
||||
bool CAircraftModelView::ps_filterDialogFinished(int status)
|
||||
{
|
||||
if (CViewBase::ps_filterDialogFinished(status)) { return true; }
|
||||
@@ -47,6 +52,24 @@ namespace BlackGui
|
||||
return true;
|
||||
}
|
||||
|
||||
void CAircraftModelView::customMenu(QMenu &menu) const
|
||||
{
|
||||
QAction *a = menu.addAction(CIcons::appMappings16(), "Automatically display", this, SLOT(ps_toggleAutoDisplay()));
|
||||
a->setCheckable(true);
|
||||
a->setChecked(m_displayAutomatically);
|
||||
menu.addAction(CIcons::refresh16(), "Reload model data", this, SIGNAL(requestModelReload()));
|
||||
menu.addSeparator();
|
||||
CViewBase::customMenu(menu);
|
||||
}
|
||||
|
||||
void CAircraftModelView::ps_toggleAutoDisplay()
|
||||
{
|
||||
QAction *a = qobject_cast<QAction *>(QObject::sender());
|
||||
if (!a) { return; }
|
||||
Q_ASSERT(a->isCheckable());
|
||||
this->m_displayAutomatically = a->isChecked();
|
||||
}
|
||||
|
||||
CAircraftModelFilterForm *CAircraftModelView::getFilterForm() const
|
||||
{
|
||||
return static_cast<CAircraftModelFilterForm *>(this->m_filterDialog.data());
|
||||
|
||||
Reference in New Issue
Block a user