mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +08:00
refs #452 editors
the editors allow to enter data for the different value objects
This commit is contained in:
committed by
Mathew Sutcliffe
parent
93e6e1d38e
commit
513eb07a13
67
src/blackgui/editors/modelmappingform.h
Normal file
67
src/blackgui/editors/modelmappingform.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Copyright (C) 2015
|
||||
* 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_EDITORS_MODELMAPPINGFORM_H
|
||||
#define BLACKGUI_EDITORS_MODELMAPPINGFORM_H
|
||||
|
||||
#include "blackgui/editors/form.h"
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CModelMappingForm; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
/*!
|
||||
* Model mapping form
|
||||
*/
|
||||
class CModelMappingForm : public CForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CModelMappingForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CModelMappingForm();
|
||||
|
||||
//! Value
|
||||
const BlackMisc::Simulation::CAircraftModel &getValue() const;
|
||||
|
||||
//! Validate
|
||||
BlackMisc::CStatusMessageList validate(bool withNestedForms) const;
|
||||
|
||||
//! \copydoc CEditor::setReadOnly
|
||||
virtual void setReadOnly(bool readOnly) override;
|
||||
|
||||
public slots:
|
||||
//! Set model
|
||||
void setValue(BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
signals:
|
||||
//! Request validation
|
||||
void requestValidation();
|
||||
|
||||
//! Save
|
||||
void requestSave();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CModelMappingForm> ui;
|
||||
mutable BlackMisc::Simulation::CAircraftModel m_model; //!< cached last value
|
||||
};
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user