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:
Klaus Basan
2015-03-19 23:56:08 +01:00
parent afed33dbbf
commit 48dc360237
22 changed files with 143 additions and 182 deletions

View File

@@ -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());