mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
refs #391, allow to send aircraft parts from GUI
* GUI component for aircraft parts * remote aircraft selector component * Adjusted GUI for internals component * Enable / disable debug messages from GUI * Allow to init engines directly * Removed unused async sort in sequence In same step fixed found issues in interpolator * allow to set max rendered aircraft
This commit is contained in:
69
src/blackgui/components/remoteaircraftselector.h
Normal file
69
src/blackgui/components/remoteaircraftselector.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* 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_REMOTEAIRCRAFTSELECTOR_H
|
||||
#define BLACKGUI_REMOTEAIRCRAFTSELECTOR_H
|
||||
|
||||
#include "enableforruntime.h"
|
||||
#include "blackmisc/avcallsign.h"
|
||||
#include "blackmisc/simulation/simulatedaircraftlist.h"
|
||||
|
||||
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CRemoteAircraftSelector; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
//! Select a remote aircraft
|
||||
class CRemoteAircraftSelector : public QFrame, public CEnableForRuntime
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CRemoteAircraftSelector(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CRemoteAircraftSelector();
|
||||
|
||||
//! Selected callsign
|
||||
BlackMisc::Aviation::CCallsign getSelectedCallsign() const;
|
||||
|
||||
protected:
|
||||
//! \copydoc CEnableForRuntime::runtimeHasBeenSet
|
||||
virtual void runtimeHasBeenSet() override;
|
||||
|
||||
//! \copydoc QWidget::showEvent
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
|
||||
private slots:
|
||||
//! Change content of combobox
|
||||
void ps_onAddedAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
|
||||
|
||||
//! IContextNetwork::removedAircraft
|
||||
void ps_onRemovedAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CRemoteAircraftSelector> ui;
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_aircraft;
|
||||
|
||||
//! Set combobox items
|
||||
void fillComboBox();
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user