mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
Ref T442, own ATC station tree view class
This commit is contained in:
69
src/blackgui/views/atcstationtreeview.h
Normal file
69
src/blackgui/views/atcstationtreeview.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* Copyright (C) 2018
|
||||
* 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_ATCSTATIONTREEVIEW_H
|
||||
#define BLACKGUI_ATCSTATIONTREEVIEW_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/pq/frequency.h"
|
||||
|
||||
#include <QTreeView>
|
||||
#include <QList>
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Models { class CAtcStationTreeModel; }
|
||||
namespace Views
|
||||
{
|
||||
//! ATC stations view
|
||||
class BLACKGUI_EXPORT CAtcStationTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CAtcStationTreeView(QWidget *parent = nullptr);
|
||||
|
||||
//! \copydoc Models::CAtcStationListModel::changedAtcStationConnectionStatus
|
||||
void changedAtcStationConnectionStatus(const BlackMisc::Aviation::CAtcStation &station, bool added);
|
||||
|
||||
signals:
|
||||
//! Request some dummy ATC stations
|
||||
void testRequestDummyAtcOnlineStations(int number);
|
||||
|
||||
//! Request COM frequency
|
||||
void requestComFrequency(const BlackMisc::PhysicalQuantities::CFrequency &frequency, BlackMisc::Aviation::CComSystem::ComUnit unit);
|
||||
|
||||
//! Request a text message to
|
||||
void requestTextMessageWidget(const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
private:
|
||||
//! Used model
|
||||
const Models::CAtcStationTreeModel *stationModel() const;
|
||||
|
||||
//! The selected object
|
||||
BlackMisc::Aviation::CAtcStation selectedObject() const;
|
||||
|
||||
//! Custom menu
|
||||
void customMenu(const QPoint &point);
|
||||
|
||||
void tuneInAtcCom1();
|
||||
void tuneInAtcCom2();
|
||||
void requestTextMessage();
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user