mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 18:25:42 +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
83
src/blackgui/editors/aircrafticaoform.h
Normal file
83
src/blackgui/editors/aircrafticaoform.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/* 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_AIRCRAFTICAOFORM_H
|
||||
#define BLACKGUI_EDITORS_AIRCRAFTICAOFORM_H
|
||||
|
||||
#include "blackgui/editors/form.h"
|
||||
#include "blackmisc/aviation/aircrafticaocode.h"
|
||||
#include "blackmisc/network/webdataservicesprovider.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CAircraftIcaoForm; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
/*!
|
||||
* Aircraft ICAO form
|
||||
*/
|
||||
class CAircraftIcaoForm :
|
||||
public CForm,
|
||||
public BlackMisc::Network::CWebDataServicesAware
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CAircraftIcaoForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CAircraftIcaoForm();
|
||||
|
||||
//! Get value
|
||||
const BlackMisc::Aviation::CAircraftIcaoCode &getValue() const;
|
||||
|
||||
//! Validate, empty list means OK
|
||||
BlackMisc::CStatusMessageList validate() const;
|
||||
|
||||
//! Allow to drop
|
||||
void allowDrop(bool allowDrop);
|
||||
|
||||
//! Is drop allowed?
|
||||
bool isDropAllowed() const;
|
||||
|
||||
//! \copydoc CEditor::setReadOnly
|
||||
virtual void setReadOnly(bool readOnly) override;
|
||||
|
||||
//! Clear
|
||||
void clear();
|
||||
|
||||
//! Mapping mode
|
||||
void setMappingMode();
|
||||
|
||||
//! \copydoc CWebDataReaderAware::setProvider
|
||||
virtual void setProvider(BlackMisc::Network::IWebDataServicesProvider *webDataReaderProvider) override;
|
||||
|
||||
public slots:
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
private slots:
|
||||
//! Variant has been dropped
|
||||
void ps_droppedCode(const BlackMisc::CVariant &variantDropped);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CAircraftIcaoForm> ui;
|
||||
mutable BlackMisc::Aviation::CAircraftIcaoCode m_aircraft;
|
||||
};
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user