mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
refs #768, model form as combined form of livery/distributor and aircraft ICAO
This commit is contained in:
91
src/blackgui/editors/aircraftmodelform.h
Normal file
91
src/blackgui/editors/aircraftmodelform.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* 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_EDITORS_AIRCRAFTMODELFORM_H
|
||||
#define BLACKGUI_EDITORS_AIRCRAFTMODELFORM_H
|
||||
|
||||
#include "form.h"
|
||||
#include <QFrame>
|
||||
|
||||
namespace Ui { class CAircraftModelForm; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
/**
|
||||
* Combined form of Livery, ICAOs, distributor
|
||||
*/
|
||||
class CAircraftModelForm : public CForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CAircraftModelForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CAircraftModelForm();
|
||||
|
||||
//! Allow to drop data
|
||||
void allowDrop(bool allowDrop);
|
||||
|
||||
//! Set as read only
|
||||
virtual void setReadOnly(bool readOnly) override;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::validate
|
||||
virtual BlackMisc::CStatusMessageList validate(bool withNestedForms = true) const override;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::validate
|
||||
virtual BlackMisc::CStatusMessageList validateLivery(bool withNestedForms = true) const;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::validate
|
||||
virtual BlackMisc::CStatusMessageList validateAircraftIcao(bool withNestedForms = true) const;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::validate
|
||||
virtual BlackMisc::CStatusMessageList validateDistributor(bool withNestedForms = true) const;
|
||||
|
||||
//! Livery
|
||||
BlackMisc::Aviation::CLivery getLivery() const;
|
||||
|
||||
//! Aircraft ICAO
|
||||
BlackMisc::Aviation::CAircraftIcaoCode getAircraftIcao() const;
|
||||
|
||||
//! Distributor
|
||||
BlackMisc::Simulation::CDistributor getDistributor() const;
|
||||
|
||||
//! Livery
|
||||
bool setLivery(const BlackMisc::Aviation::CLivery &livery);
|
||||
|
||||
//! Aircraft
|
||||
bool setAircraftIcao(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
//! Distributor
|
||||
bool setDistributor(const BlackMisc::Simulation::CDistributor &distributor);
|
||||
|
||||
//! Clear entire form
|
||||
void clear();
|
||||
|
||||
//! \copydoc BlackGui::Editors::CLiveryForm::clear
|
||||
void clearLivery();
|
||||
|
||||
//! \copydoc BlackGui::Editors::CAircraftIcaoForm::clear
|
||||
void clearAircraftIcao();
|
||||
|
||||
//! \copydoc BlackGui::Editors::CDistributorForm::clear
|
||||
void clearDistributor();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CAircraftModelForm> ui;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user