refs #618, GUI dialog to create own model set

* new tab in model mapping component
* form + dialog to select appropriate models
This commit is contained in:
Klaus Basan
2016-03-14 20:27:46 +01:00
parent 17cbd31095
commit 42d5ceff32
14 changed files with 992 additions and 74 deletions

View File

@@ -0,0 +1,74 @@
/* Copyright (C) 2016
* swift project Community / Contributors
*
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_COMPONENTS_DBOWNMODELSETDIALOG_H
#define BLACKGUI_COMPONENTS_DBOWNMODELSETDIALOG_H
#include <QDialog>
#include <QScopedPointer>
#include "blackmisc/logcategorylist.h"
#include "blackmisc/simulation/aircraftmodellist.h"
#include "blackgui/components/dbmappingcomponentaware.h"
namespace Ui { class CDbOwnModelSetDialog; }
namespace BlackGui
{
namespace Components
{
/*!
* Dialog to create new model set
*/
class CDbOwnModelSetDialog :
public QDialog,
public CDbMappingComponentAware
{
Q_OBJECT
public:
//! Categories
static const BlackMisc::CLogCategoryList &getLogCategories();
//! Constructor
explicit CDbOwnModelSetDialog(QWidget *parent = nullptr);
//! Destructor
virtual ~CDbOwnModelSetDialog();
//! Last build set
const BlackMisc::Simulation::CAircraftModelList &getModelSet() const { return m_modelSet; }
//! Simulator info
const BlackMisc::Simulation::CSimulatorInfo &getSimulatorInfo() const { return m_simulatorInfo; }
//! Reload data
void reloadData();
//! Exec and display simulator
virtual int exec() override;
private slots:
//! Button clicked
void ps_buttonClicked();
private:
QScopedPointer<Ui::CDbOwnModelSetDialog> ui;
BlackMisc::Simulation::CAircraftModelList m_modelSet;
BlackMisc::Simulation::CSimulatorInfo m_simulatorInfo;
//! Build the set
BlackMisc::Simulation::CAircraftModelList buildSet();
};
} // ns
} // ns
#endif // guard