mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 11:25:33 +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
79
src/blackgui/editors/airlineicaoform.h
Normal file
79
src/blackgui/editors/airlineicaoform.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* 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_AIRLINEICAOFORM_H
|
||||
#define BLACKGUI_EDITORS_AIRLINEICAOFORM_H
|
||||
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/network/webdataservicesprovider.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackgui/editors/form.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CAirlineIcaoForm; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
/*!
|
||||
* Airline ICAO code form
|
||||
*/
|
||||
class CAirlineIcaoForm :
|
||||
public CForm,
|
||||
public BlackMisc::Network::CWebDataServicesAware
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CAirlineIcaoForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CAirlineIcaoForm();
|
||||
|
||||
//! Set value
|
||||
void setValue(const BlackMisc::Aviation::CAirlineIcaoCode &icao = BlackMisc::Aviation::CAirlineIcaoCode());
|
||||
|
||||
//! Get value
|
||||
const BlackMisc::Aviation::CAirlineIcaoCode &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();
|
||||
|
||||
//! \copydoc CWebDataReaderAware::setProvider
|
||||
virtual void setProvider(BlackMisc::Network::IWebDataServicesProvider *webDataReaderProvider) override;
|
||||
|
||||
private slots:
|
||||
//! Variant has been dropped
|
||||
void ps_droppedCode(const BlackMisc::CVariant &variantDropped);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CAirlineIcaoForm> ui;
|
||||
mutable BlackMisc::Aviation::CAirlineIcaoCode m_airline; // object allowing to override values
|
||||
};
|
||||
|
||||
} // ns
|
||||
} //ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user