mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 09:45:44 +08:00
committed by
Mathew Sutcliffe
parent
b475d7eff1
commit
d15d0db431
@@ -12,6 +12,7 @@ using namespace BlackMisc::Aviation;
|
|||||||
using namespace BlackMisc::PhysicalQuantities;
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
using namespace BlackMisc::Geo;
|
using namespace BlackMisc::Geo;
|
||||||
using namespace BlackMisc::Settings;
|
using namespace BlackMisc::Settings;
|
||||||
|
using namespace BlackMisc::Voice;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -19,11 +20,16 @@ using namespace BlackMisc::Settings;
|
|||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent), ui(new Ui::MainWindow),
|
QMainWindow(parent), ui(new Ui::MainWindow),
|
||||||
m_init(false), m_withDBus(true),
|
m_init(false), m_withDBus(true),
|
||||||
|
m_coreAvailable(false), m_contextNetworkAvailable(false), m_contextVoiceAvailable(false),
|
||||||
m_dBusConnection("dummy"), m_coreRuntime(nullptr),
|
m_dBusConnection("dummy"), m_coreRuntime(nullptr),
|
||||||
m_atcListOnline(nullptr), m_atcListBooked(nullptr), m_trafficServerList(nullptr), m_aircraftsInRange(nullptr),
|
m_atcListOnline(nullptr), m_atcListBooked(nullptr),
|
||||||
m_contextNetwork(nullptr), m_contextSettings(nullptr),
|
m_trafficServerList(nullptr), m_aircraftsInRange(nullptr),
|
||||||
m_ownAircraft(),
|
m_contextApplication(nullptr),
|
||||||
m_timerUpdateAtcStationsOnline(nullptr), m_timerUpdateAircraftsInRange(nullptr), m_timerContextWatchdog(nullptr), m_timerCollectedCockpitUpdates(nullptr)
|
m_contextNetwork(nullptr), m_contextVoice(nullptr),
|
||||||
|
m_contextSettings(nullptr),
|
||||||
|
m_ownAircraft(), m_voiceRoomCom1(), m_voiceRoomCom2(),
|
||||||
|
m_timerUpdateAtcStationsOnline(nullptr), m_timerUpdateAircraftsInRange(nullptr),
|
||||||
|
m_timerCollectedCockpitUpdates(nullptr), m_timerContextWatchdog(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
@@ -51,6 +57,11 @@ void MainWindow::gracefulShutdown()
|
|||||||
this->m_contextNetwork->disconnectFromNetwork();
|
this->m_contextNetwork->disconnectFromNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->m_contextVoiceAvailable)
|
||||||
|
{
|
||||||
|
this->m_contextVoice->leaveAllVoiceRooms();
|
||||||
|
}
|
||||||
|
|
||||||
if (this->m_timerUpdateAircraftsInRange)
|
if (this->m_timerUpdateAircraftsInRange)
|
||||||
{
|
{
|
||||||
this->m_timerUpdateAircraftsInRange->disconnect(this);
|
this->m_timerUpdateAircraftsInRange->disconnect(this);
|
||||||
@@ -71,7 +82,6 @@ void MainWindow::gracefulShutdown()
|
|||||||
this->m_timerCollectedCockpitUpdates->disconnect(this);
|
this->m_timerCollectedCockpitUpdates->disconnect(this);
|
||||||
this->m_timerCollectedCockpitUpdates->stop();
|
this->m_timerCollectedCockpitUpdates->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -102,52 +112,6 @@ void MainWindow::setMainPage(bool start)
|
|||||||
this->ui->sw_MainMiddle->setCurrentIndex(6);
|
this->ui->sw_MainMiddle->setCurrentIndex(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Read stations
|
|
||||||
*/
|
|
||||||
void MainWindow::reloadAtcStationsBooked()
|
|
||||||
{
|
|
||||||
if (!this->isContextNetworkAvailableCheck()) return;
|
|
||||||
this->m_atcListBooked->update(this->m_contextNetwork->getAtcStationsBooked());
|
|
||||||
this->ui->tv_AtcStationsBooked->resizeColumnsToContents();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read stations
|
|
||||||
*/
|
|
||||||
void MainWindow::reloadAtcStationsOnline()
|
|
||||||
{
|
|
||||||
if (!this->isContextNetworkAvailableCheck()) return;
|
|
||||||
this->m_atcListOnline->update(this->m_contextNetwork->getAtcStationsOnline());
|
|
||||||
this->ui->tv_AtcStationsOnline->resizeColumnsToContents();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read aircrafts
|
|
||||||
*/
|
|
||||||
void MainWindow::reloadAircraftsInRange()
|
|
||||||
{
|
|
||||||
if (!this->isContextNetworkAvailableCheck()) return;
|
|
||||||
this->m_aircraftsInRange->update(this->m_contextNetwork->getAircraftsInRange());
|
|
||||||
this->ui->tv_AircraftsInRange->resizeColumnsToContents();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read own aircraft
|
|
||||||
*/
|
|
||||||
bool MainWindow::reloadOwnAircraft()
|
|
||||||
{
|
|
||||||
if (!this->isContextNetworkAvailableCheck()) return false;
|
|
||||||
if (this->isCockpitUpdatePending()) return false;
|
|
||||||
CAircraft loadedAircraft = this->m_contextNetwork->getOwnAircraft();
|
|
||||||
if (loadedAircraft == this->m_ownAircraft) return false;
|
|
||||||
|
|
||||||
// changed aircraft
|
|
||||||
this->m_ownAircraft = loadedAircraft;
|
|
||||||
this->updateCockpitFromContext();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Connect to Network
|
* Connect to Network
|
||||||
*/
|
*/
|
||||||
@@ -170,6 +134,7 @@ void MainWindow::toggleNetworkConnection()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
msgs = this->m_contextNetwork->disconnectFromNetwork();
|
msgs = this->m_contextNetwork->disconnectFromNetwork();
|
||||||
|
this->m_contextVoice->leaveAllVoiceRooms();
|
||||||
}
|
}
|
||||||
if (!msgs.isEmpty()) this->displayStatusMessages(msgs);
|
if (!msgs.isEmpty()) this->displayStatusMessages(msgs);
|
||||||
}
|
}
|
||||||
@@ -184,6 +149,16 @@ bool MainWindow::isContextNetworkAvailableCheck()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is the voice context available?
|
||||||
|
*/
|
||||||
|
bool MainWindow::isContextVoiceAvailableCheck()
|
||||||
|
{
|
||||||
|
if (this->m_contextVoiceAvailable) return true;
|
||||||
|
this->displayStatusMessage(CStatusMessage(CStatusMessage::TypeCore, CStatusMessage::SeverityError, "Voice context not available"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Display a status message
|
* Display a status message
|
||||||
*/
|
*/
|
||||||
@@ -265,30 +240,8 @@ void MainWindow::connectionStatusChanged(uint /** from **/, uint to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Station selected
|
* Timer event
|
||||||
*/
|
*/
|
||||||
void MainWindow::onlineAtcStationSelected(QModelIndex index)
|
|
||||||
{
|
|
||||||
this->ui->te_AtcStationsOnlineInfo->setText(""); // reset
|
|
||||||
const CAtcStation stationClicked = this->m_atcListOnline->at(index);
|
|
||||||
QString infoMessage;
|
|
||||||
|
|
||||||
if (stationClicked.hasAtis())
|
|
||||||
{
|
|
||||||
infoMessage.append(stationClicked.getAtis().getMessage());
|
|
||||||
}
|
|
||||||
if (stationClicked.hasMetar())
|
|
||||||
{
|
|
||||||
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
|
|
||||||
infoMessage.append(stationClicked.getMetar().getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
this->ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Timer event
|
|
||||||
*/
|
|
||||||
void MainWindow::updateTimer()
|
void MainWindow::updateTimer()
|
||||||
{
|
{
|
||||||
QObject *sender = QObject::sender();
|
QObject *sender = QObject::sender();
|
||||||
@@ -308,8 +261,7 @@ void MainWindow::updateTimer()
|
|||||||
}
|
}
|
||||||
else if (sender == this->m_timerContextWatchdog)
|
else if (sender == this->m_timerContextWatchdog)
|
||||||
{
|
{
|
||||||
qint64 t = QDateTime::currentMSecsSinceEpoch();
|
this->setContextAvailability();
|
||||||
m_contextNetworkAvailable = (this->m_contextNetwork->usingLocalObjects() || (this->m_contextNetwork->ping(t) == t));
|
|
||||||
this->updateGuiStatusInformation();
|
this->updateGuiStatusInformation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,43 +273,19 @@ void MainWindow::updateTimer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get METAR
|
* Context availability
|
||||||
*/
|
*/
|
||||||
void MainWindow::getMetar(const QString &airportIcaoCode)
|
void MainWindow::setContextAvailability()
|
||||||
{
|
{
|
||||||
if (!this->isContextNetworkAvailableCheck()) return;
|
qint64 t = QDateTime::currentMSecsSinceEpoch();
|
||||||
if (!this->m_contextNetwork->isConnected()) return;
|
this->m_coreAvailable = this->m_contextApplication->ping(t) == t;
|
||||||
QString icao = airportIcaoCode.isEmpty() ? this->ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper();
|
this->m_contextNetworkAvailable = this->m_coreAvailable || this->m_contextNetwork->usingLocalObjects();
|
||||||
this->ui->le_AtcStationsOnlineMetar->setText(icao);
|
this->m_contextVoiceAvailable = this->m_coreAvailable || this->m_contextVoice->usingLocalObjects();
|
||||||
if (icao.length() != 4) return;
|
|
||||||
CInformationMessage metar = this->m_contextNetwork->getMetar(icao);
|
|
||||||
if (metar.getType() != CInformationMessage::METAR) return;
|
|
||||||
if (metar.isEmpty()) return;
|
|
||||||
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ATC station tab changed are changed
|
* Middle panel changed
|
||||||
*/
|
*/
|
||||||
void MainWindow::atcStationTabChanged(int /** tabIndex **/)
|
|
||||||
{
|
|
||||||
if (this->isContextNetworkAvailableCheck())
|
|
||||||
{
|
|
||||||
if (this->ui->tw_AtcStations->currentWidget() == this->ui->tb_AtcStationsBooked)
|
|
||||||
{
|
|
||||||
if (this->m_atcListBooked->rowCount() < 1)
|
|
||||||
this->reloadAtcStationsBooked();
|
|
||||||
}
|
|
||||||
else if (this->ui->tw_AtcStations->currentWidget() == this->ui->tb_AtcStationsOnline)
|
|
||||||
{
|
|
||||||
this->reloadAtcStationsOnline();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Middle panel changed
|
|
||||||
*/
|
|
||||||
void MainWindow::middlePanelChanged(int /* index */)
|
void MainWindow::middlePanelChanged(int /* index */)
|
||||||
{
|
{
|
||||||
if (this->isContextNetworkAvailableCheck())
|
if (this->isContextNetworkAvailableCheck())
|
||||||
@@ -373,17 +301,29 @@ void MainWindow::middlePanelChanged(int /* index */)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update GUI
|
* Update GUI
|
||||||
*/
|
*/
|
||||||
void MainWindow::updateGuiStatusInformation()
|
void MainWindow::updateGuiStatusInformation()
|
||||||
{
|
{
|
||||||
|
const QString now = QDateTime::currentDateTimeUtc().toString("yyyy - MM - dd HH: mm: ss");
|
||||||
|
QString network("unavailable");
|
||||||
if (this->m_contextNetworkAvailable)
|
if (this->m_contextNetworkAvailable)
|
||||||
{
|
{
|
||||||
const QString now = QDateTime::currentDateTimeUtc().toString("yyyy-MM-dd HH:mm:ss");
|
network = this->m_contextNetwork->usingLocalObjects() ? "local" : now;
|
||||||
this->ui->le_networkContextAvailable->setText(
|
}
|
||||||
this->m_contextNetwork->usingLocalObjects() ? "local" :
|
|
||||||
now);
|
QString voice("unavailable");
|
||||||
if (this->m_contextNetwork->isConnected())
|
if (this->m_contextVoiceAvailable)
|
||||||
|
{
|
||||||
|
voice = this->m_contextVoice->usingLocalObjects() ? "local" : now;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->ui->le_StatusNetworkContext->setText(network);
|
||||||
|
this->ui->le_StatusVoiceContext->setText(voice);
|
||||||
|
this->ui->cb_StatusWithDBus->setCheckState(this->m_withDBus ? Qt::Checked : Qt::Unchecked);
|
||||||
|
|
||||||
|
// Connected button
|
||||||
|
if (this->m_contextNetworkAvailable && this->m_contextNetwork->isConnected())
|
||||||
{
|
{
|
||||||
this->ui->pb_MainConnect->setText("Disconnect");
|
this->ui->pb_MainConnect->setText("Disconnect");
|
||||||
this->ui->pb_MainConnect->setStyleSheet("background-color: green");
|
this->ui->pb_MainConnect->setStyleSheet("background-color: green");
|
||||||
@@ -393,12 +333,7 @@ void MainWindow::updateGuiStatusInformation()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->ui->pb_MainConnect->setText("Connect");
|
this->ui->pb_MainConnect->setText("Connect");
|
||||||
this->ui->pb_MainConnect->setStyleSheet("background-color:");
|
this->ui->pb_MainConnect->setStyleSheet("background-color: ");
|
||||||
this->ui->le_StatusNetworkConnected->setText("Disconnected");
|
this->ui->le_StatusNetworkConnected->setText("Disconnected");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this->ui->le_networkContextAvailable->setText("Not available");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
#include "blackgui/aircraftlistmodel.h"
|
#include "blackgui/aircraftlistmodel.h"
|
||||||
#include "blackmisc/statusmessage.h"
|
#include "blackmisc/statusmessage.h"
|
||||||
#include "blackmisc/nwtextmessage.h"
|
#include "blackmisc/nwtextmessage.h"
|
||||||
|
#include "blackcore/context_voice.h"
|
||||||
#include "blackcore/context_network_interface.h"
|
#include "blackcore/context_network_interface.h"
|
||||||
#include "blackcore/context_settings_interface.h"
|
#include "blackcore/context_settings_interface.h"
|
||||||
|
#include "blackcore/context_application_interface.h"
|
||||||
#include "blackcore/coreruntime.h"
|
#include "blackcore/coreruntime.h"
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
@@ -57,20 +59,26 @@ private:
|
|||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
bool m_init;
|
bool m_init;
|
||||||
bool m_withDBus;
|
bool m_withDBus;
|
||||||
|
bool m_coreAvailable;
|
||||||
bool m_contextNetworkAvailable;
|
bool m_contextNetworkAvailable;
|
||||||
|
bool m_contextVoiceAvailable;
|
||||||
QDBusConnection m_dBusConnection;
|
QDBusConnection m_dBusConnection;
|
||||||
BlackCore::CCoreRuntime *m_coreRuntime; /*!< runtime, if working with local core */
|
BlackCore::CCoreRuntime *m_coreRuntime; /*!< runtime, if working with local core */
|
||||||
BlackGui::CAtcListModel *m_atcListOnline;
|
BlackGui::CAtcListModel *m_atcListOnline;
|
||||||
BlackGui::CAtcListModel *m_atcListBooked;
|
BlackGui::CAtcListModel *m_atcListBooked;
|
||||||
BlackGui::CServerListModel *m_trafficServerList;
|
BlackGui::CServerListModel *m_trafficServerList;
|
||||||
BlackGui::CAircraftListModel *m_aircraftsInRange;
|
BlackGui::CAircraftListModel *m_aircraftsInRange;
|
||||||
|
BlackCore::IContextApplication *m_contextApplication; /*!< overall application state */
|
||||||
BlackCore::IContextNetwork *m_contextNetwork;
|
BlackCore::IContextNetwork *m_contextNetwork;
|
||||||
|
BlackCore::IContextVoice *m_contextVoice;
|
||||||
BlackCore::IContextSettings *m_contextSettings;
|
BlackCore::IContextSettings *m_contextSettings;
|
||||||
BlackMisc::Aviation::CAircraft m_ownAircraft;
|
BlackMisc::Aviation::CAircraft m_ownAircraft; /*!< own aircraft's state */
|
||||||
QTimer *m_timerUpdateAtcStationsOnline;
|
BlackMisc::Voice::CVoiceRoom m_voiceRoomCom1;
|
||||||
QTimer *m_timerUpdateAircraftsInRange;
|
BlackMisc::Voice::CVoiceRoom m_voiceRoomCom2;
|
||||||
QTimer *m_timerCollectedCockpitUpdates;
|
QTimer *m_timerUpdateAtcStationsOnline; /*!< update stations */
|
||||||
QTimer *m_timerContextWatchdog;
|
QTimer *m_timerUpdateAircraftsInRange; /*!< update aircrafts */
|
||||||
|
QTimer *m_timerCollectedCockpitUpdates; /*!< collect cockpit updates over a short period before sending */
|
||||||
|
QTimer *m_timerContextWatchdog; /*!< core available? */
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief GUI status update
|
* \brief GUI status update
|
||||||
@@ -95,11 +103,17 @@ private:
|
|||||||
void initialDataReads();
|
void initialDataReads();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Context network available check, otherwise status message
|
* \brief Context network availability check, otherwise status message
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
bool isContextNetworkAvailableCheck();
|
bool isContextNetworkAvailableCheck();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Context voice availability check, otherwise status message
|
||||||
|
* \return
|
||||||
|
*/
|
||||||
|
bool isContextVoiceAvailableCheck();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Own cockpit, update from context
|
* \brief Own cockpit, update from context
|
||||||
*/
|
*/
|
||||||
@@ -138,6 +152,25 @@ private:
|
|||||||
*/
|
*/
|
||||||
BlackMisc::Network::CTextMessage getTextMessageStubForChannel();
|
BlackMisc::Network::CTextMessage getTextMessageStubForChannel();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Audio device lists
|
||||||
|
* \return
|
||||||
|
*/
|
||||||
|
void setAudioDeviceLists();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Context availability, used by watchdog
|
||||||
|
*/
|
||||||
|
void setContextAvailability();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Position of own plane for testing
|
||||||
|
* \param wgsLatitude
|
||||||
|
* \param wgsLongitude
|
||||||
|
* \param altitude
|
||||||
|
*/
|
||||||
|
void setTestPosition(const QString &wgsLatitude, const QString &wgsLongitude, const BlackMisc::Aviation::CAltitude &altitude);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -175,7 +208,7 @@ private slots:
|
|||||||
* \brief Display status messages
|
* \brief Display status messages
|
||||||
* \param messages
|
* \param messages
|
||||||
*/
|
*/
|
||||||
void displayStatusMessages(const BlackMisc::CStatusMessages &messages);
|
void displayStatusMessages(const BlackMisc::CStatusMessageList &messages);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Connection status changed
|
* \brief Connection status changed
|
||||||
@@ -287,6 +320,27 @@ private slots:
|
|||||||
*/
|
*/
|
||||||
void cockpitValuesChanged();
|
void cockpitValuesChanged();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Audio device selected
|
||||||
|
* \param index
|
||||||
|
*/
|
||||||
|
void audioDeviceSelected(int index);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Reset transponder to standby
|
||||||
|
*/
|
||||||
|
void resetTransponderModerToStandby();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Reset transponder to Charly
|
||||||
|
*/
|
||||||
|
void resetTransponderModerToCharly();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Override voice room
|
||||||
|
*/
|
||||||
|
void voiceRoomOverride();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pop_macro("interface")
|
#pragma pop_macro("interface")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>615</width>
|
||||||
<height>541</height>
|
<height>541</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -160,11 +160,24 @@
|
|||||||
<widget class="QWidget" name="pg_StatusStatusPage">
|
<widget class="QWidget" name="pg_StatusStatusPage">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="fl_StatusPage">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="1" column="3">
|
||||||
<widget class="QLabel" name="lbl_StatusNetworkConnected">
|
<widget class="QLineEdit" name="le_StatusVoiceContext">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QCheckBox" name="cb_StatusWithDBus">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Network connected</string>
|
<string>DBus</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -175,6 +188,27 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="le_StatusNetworkContext">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QLabel" name="lbl_StatusNetworkContext">
|
||||||
|
<property name="text">
|
||||||
|
<string>Voice context</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_StatusNetworkConnected">
|
||||||
|
<property name="text">
|
||||||
|
<string>Network connected</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lbl_networkContextAvailable">
|
<widget class="QLabel" name="lbl_networkContextAvailable">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -182,13 +216,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="le_networkContextAvailable">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -591,144 +618,10 @@
|
|||||||
<widget class="QWidget" name="pg_Cockpit">
|
<widget class="QWidget" name="pg_Cockpit">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gl_Cockpit">
|
<layout class="QGridLayout" name="gl_CockpitCom">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="ds_CockpitCom2Active">
|
|
||||||
<property name="accelerated">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>118.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>136.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.250000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>118.250000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="ds_CockpitTransponder">
|
|
||||||
<property name="decimals">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>7777.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>7000.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="ds_CockpitCom1Active">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>75</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<double>118.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<double>136.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.250000000000000</double>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<double>118.000000000000000</double>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_CockpitCom2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>COM 2</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_CockpitTransponder">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Transponder</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_CockpitCom1">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>COM 1</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<spacer name="vs_Cockpit">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QComboBox" name="cb_CockpitTransponderMode">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>S</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>C</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>I</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="ds_CockpitCom1Standby">
|
<widget class="QDoubleSpinBox" name="ds_CockpitCom1Standby">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@@ -760,6 +653,31 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QComboBox" name="cb_CockpitTransponderMode">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>S</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>C</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>I</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="ds_CockpitCom2Standby">
|
<widget class="QDoubleSpinBox" name="ds_CockpitCom2Standby">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
@@ -779,6 +697,174 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_CockpitTransponder">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Transponder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_CockpitCom1">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>COM 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_CockpitCom2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>COM 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="ds_CockpitCom2Active">
|
||||||
|
<property name="accelerated">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>118.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>136.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.250000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>118.250000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="ds_CockpitCom1Active">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>75</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>118.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>136.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.250000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>118.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="ds_CockpitTransponder">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>7777.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>7000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="ql_CockpitVoiceRooms">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QColumnView" name="cv_CockpitVoiceRoom1"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QColumnView" name="cv_CockpitVoiceRoom2"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QWidget" name="qi_CokpitViewRoom2" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="le_CockpitVoiceRoomCom2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>7</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cb_CockpitVoiceRoom2Override">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ovr.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QWidget" name="qi_CokpitViewRoom1" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="le_CockpitVoiceRoomCom1">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>7</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cb_CockpitVoiceRoom1Override">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ovr.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -1002,14 +1088,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="lbl_SettingsTnCsRealname">
|
<widget class="QLabel" name="lbl_SettingsTnCsRealName">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Real name</string>
|
<string>Real name</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="le_SettingsTnCsRealname">
|
<widget class="QLineEdit" name="le_SettingsTnCsRealName">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@@ -1086,22 +1172,56 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tb_SettingsPlane">
|
<widget class="QWidget" name="tb_SettingsVoice">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Whatsoever</string>
|
<string>Voice</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_VoiceInputDevice">
|
||||||
|
<property name="text">
|
||||||
|
<string>In</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="cb_VoiceInputDevice"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_VoiceOutputDevice">
|
||||||
|
<property name="text">
|
||||||
|
<string>Out</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="cb_VoiceOutputDevice"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tb_SettingsAircraft">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Aircraft</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="fl_SettingsPlane">
|
<layout class="QFormLayout" name="fl_SettingsAircraft">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lbl_SettingsPlaneCallsign">
|
<widget class="QLabel" name="lbl_SettingsAircraftCallsign">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Callsign</string>
|
<string>Callsign</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLineEdit" name="le_SettingsPlaneCallsign">
|
<widget class="QLineEdit" name="le_SettingsAircraftCallsign">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>BLACK</string>
|
<string>BLACK</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -1228,7 +1348,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>615</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -1243,6 +1363,7 @@
|
|||||||
<addaction name="menu_TestLocationsEDRY"/>
|
<addaction name="menu_TestLocationsEDRY"/>
|
||||||
<addaction name="menu_TestLocationsEDDF"/>
|
<addaction name="menu_TestLocationsEDDF"/>
|
||||||
<addaction name="menu_TestLocationsEDDM"/>
|
<addaction name="menu_TestLocationsEDDM"/>
|
||||||
|
<addaction name="menu_TestLocationsEDNX"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Reload">
|
<widget class="QMenu" name="menu_Reload">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -1266,17 +1387,17 @@
|
|||||||
<widget class="QStatusBar" name="sb_MainStatusBar"/>
|
<widget class="QStatusBar" name="sb_MainStatusBar"/>
|
||||||
<action name="menu_TestLocationsEDDF">
|
<action name="menu_TestLocationsEDDF">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position EDDF</string>
|
<string>Position EDDF (Frankfurt, GER)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="menu_TestLocationsEDDM">
|
<action name="menu_TestLocationsEDDM">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position EDDM</string>
|
<string>Position EDDM (Munich, GER)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="menu_TestLocationsEDRY">
|
<action name="menu_TestLocationsEDRY">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position EDRY</string>
|
<string>Position EDRY (Speyer, GER)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="menu_ReloadSettings">
|
<action name="menu_ReloadSettings">
|
||||||
@@ -1284,6 +1405,11 @@
|
|||||||
<string>Reload settings</string>
|
<string>Reload settings</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="menu_TestLocationsEDNX">
|
||||||
|
<property name="text">
|
||||||
|
<string>Position EDNX (Schleißheim, GER)</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
@@ -1503,8 +1629,8 @@
|
|||||||
<slot>reloadAtcStationsBooked()</slot>
|
<slot>reloadAtcStationsBooked()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>178</x>
|
<x>175</x>
|
||||||
<y>110</y>
|
<y>72</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>2</x>
|
<x>2</x>
|
||||||
@@ -1519,8 +1645,8 @@
|
|||||||
<slot>onlineAtcStationSelected(QModelIndex)</slot>
|
<slot>onlineAtcStationSelected(QModelIndex)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>253</x>
|
<x>174</x>
|
||||||
<y>116</y>
|
<y>50</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>-1</x>
|
<x>-1</x>
|
||||||
@@ -1583,8 +1709,8 @@
|
|||||||
<slot>commandEntered()</slot>
|
<slot>commandEntered()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>176</x>
|
<x>166</x>
|
||||||
<y>73</y>
|
<y>63</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>4</x>
|
<x>4</x>
|
||||||
@@ -1599,8 +1725,8 @@
|
|||||||
<slot>getMetar()</slot>
|
<slot>getMetar()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>374</x>
|
<x>145</x>
|
||||||
<y>491</y>
|
<y>71</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
@@ -1615,8 +1741,8 @@
|
|||||||
<slot>getMetar()</slot>
|
<slot>getMetar()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>338</x>
|
<x>118</x>
|
||||||
<y>491</y>
|
<y>71</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>341</x>
|
<x>341</x>
|
||||||
@@ -1631,8 +1757,8 @@
|
|||||||
<slot>cockpitValuesChanged()</slot>
|
<slot>cockpitValuesChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>370</x>
|
<x>449</x>
|
||||||
<y>55</y>
|
<y>73</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>337</x>
|
<x>337</x>
|
||||||
@@ -1663,8 +1789,8 @@
|
|||||||
<slot>cockpitValuesChanged()</slot>
|
<slot>cockpitValuesChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>379</x>
|
<x>449</x>
|
||||||
<y>88</y>
|
<y>96</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>253</x>
|
<x>253</x>
|
||||||
@@ -1711,8 +1837,8 @@
|
|||||||
<slot>cockpitValuesChanged()</slot>
|
<slot>cockpitValuesChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>385</x>
|
<x>449</x>
|
||||||
<y>103</y>
|
<y>119</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>1</x>
|
<x>1</x>
|
||||||
@@ -1720,6 +1846,166 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cb_VoiceOutputDevice</sender>
|
||||||
|
<signal>currentIndexChanged(int)</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>audioDeviceSelected(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>166</x>
|
||||||
|
<y>63</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>2</x>
|
||||||
|
<y>316</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cb_VoiceOutputDevice</sender>
|
||||||
|
<signal>currentIndexChanged(int)</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>audioDeviceSelected(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>166</x>
|
||||||
|
<y>63</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>20</x>
|
||||||
|
<y>379</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cb_VoiceInputDevice</sender>
|
||||||
|
<signal>currentIndexChanged(int)</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>audioDeviceSelected(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>166</x>
|
||||||
|
<y>55</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>26</x>
|
||||||
|
<y>355</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>menu_TestLocationsEDNX</sender>
|
||||||
|
<signal>triggered()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>menuClicked()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>307</x>
|
||||||
|
<y>270</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>menu_TestLocationsEDDF</sender>
|
||||||
|
<signal>triggered()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>menuClicked()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>307</x>
|
||||||
|
<y>270</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>menu_TestLocationsEDDM</sender>
|
||||||
|
<signal>triggered()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>menuClicked()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>307</x>
|
||||||
|
<y>270</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>le_CockpitVoiceRoomCom1</sender>
|
||||||
|
<signal>returnPressed()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>voiceRoomOverride()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>232</x>
|
||||||
|
<y>64</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>40</x>
|
||||||
|
<y>388</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>le_CockpitVoiceRoomCom2</sender>
|
||||||
|
<signal>returnPressed()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>voiceRoomOverride()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>253</x>
|
||||||
|
<y>82</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>70</x>
|
||||||
|
<y>304</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cb_CockpitVoiceRoom2Override</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>voiceRoomOverride()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>346</x>
|
||||||
|
<y>91</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>559</x>
|
||||||
|
<y>412</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>cb_CockpitVoiceRoom1Override</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>voiceRoomOverride()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>368</x>
|
||||||
|
<y>61</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>587</x>
|
||||||
|
<y>340</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>setMainPage()</slot>
|
<slot>setMainPage()</slot>
|
||||||
@@ -1732,5 +2018,7 @@
|
|||||||
<slot>commandEntered()</slot>
|
<slot>commandEntered()</slot>
|
||||||
<slot>getMetar()</slot>
|
<slot>getMetar()</slot>
|
||||||
<slot>cockpitValuesChanged()</slot>
|
<slot>cockpitValuesChanged()</slot>
|
||||||
|
<slot>audioDeviceSelected(int)</slot>
|
||||||
|
<slot>voiceRoomOverride()</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
75
samples/blackgui/mainwindow_aircraft.cpp
Normal file
75
samples/blackgui/mainwindow_aircraft.cpp
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
#include "blackgui/atcstationlistmodel.h"
|
||||||
|
#include "blackcore/dbus_server.h"
|
||||||
|
#include "blackcore/context_network.h"
|
||||||
|
|
||||||
|
using namespace BlackCore;
|
||||||
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackGui;
|
||||||
|
using namespace BlackMisc::Network;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
using namespace BlackMisc::Geo;
|
||||||
|
using namespace BlackMisc::Settings;
|
||||||
|
using namespace BlackMisc::Voice;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read aircrafts
|
||||||
|
*/
|
||||||
|
void MainWindow::reloadAircraftsInRange()
|
||||||
|
{
|
||||||
|
if (!this->isContextNetworkAvailableCheck()) return;
|
||||||
|
this->m_aircraftsInRange->update(this->m_contextNetwork->getAircraftsInRange());
|
||||||
|
this->ui->tv_AircraftsInRange->resizeColumnsToContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read own aircraft
|
||||||
|
*/
|
||||||
|
bool MainWindow::reloadOwnAircraft()
|
||||||
|
{
|
||||||
|
if (!this->isContextNetworkAvailableCheck()) return false;
|
||||||
|
if (this->isCockpitUpdatePending()) return false;
|
||||||
|
CAircraft loadedAircraft = this->m_contextNetwork->getOwnAircraft();
|
||||||
|
|
||||||
|
// changed aircraft
|
||||||
|
if (loadedAircraft == this->m_ownAircraft) return false;
|
||||||
|
this->m_ownAircraft = loadedAircraft;
|
||||||
|
|
||||||
|
// update voice rooms
|
||||||
|
if (this->m_contextVoiceAvailable)
|
||||||
|
{
|
||||||
|
CVoiceRoomList selectedRooms = this->m_contextNetwork->getSelectedVoiceRooms();
|
||||||
|
this->m_voiceRoomCom1 = this->ui->cb_CockpitVoiceRoom1Override->isChecked() ?
|
||||||
|
this->ui->le_CockpitVoiceRoomCom1->text().trimmed() :
|
||||||
|
selectedRooms[0];
|
||||||
|
this->m_voiceRoomCom2 = this->ui->cb_CockpitVoiceRoom2Override->isChecked() ?
|
||||||
|
this->ui->le_CockpitVoiceRoomCom2->text().trimmed() :
|
||||||
|
selectedRooms[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
this->updateCockpitFromContext();
|
||||||
|
|
||||||
|
// something has changed
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Position
|
||||||
|
*/
|
||||||
|
void MainWindow::setTestPosition(const QString &wgsLatitude, const QString &wgsLongitude, const CAltitude &altitude)
|
||||||
|
{
|
||||||
|
CCoordinateGeodetic coordinate(
|
||||||
|
CLatitude::fromWgs84(wgsLatitude),
|
||||||
|
CLongitude::fromWgs84(wgsLongitude),
|
||||||
|
CLength(0, CLengthUnit::m()));
|
||||||
|
|
||||||
|
this->m_ownAircraft.setPosition(coordinate);
|
||||||
|
this->m_ownAircraft.setAltitude(altitude);
|
||||||
|
this->m_contextNetwork->updateOwnPosition(
|
||||||
|
coordinate,
|
||||||
|
altitude
|
||||||
|
);
|
||||||
|
}
|
||||||
92
samples/blackgui/mainwindow_atc.cpp
Normal file
92
samples/blackgui/mainwindow_atc.cpp
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
#include "blackgui/atcstationlistmodel.h"
|
||||||
|
#include "blackcore/dbus_server.h"
|
||||||
|
#include "blackcore/context_network.h"
|
||||||
|
|
||||||
|
using namespace BlackCore;
|
||||||
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackGui;
|
||||||
|
using namespace BlackMisc::Network;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
using namespace BlackMisc::Geo;
|
||||||
|
using namespace BlackMisc::Settings;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read booked stations
|
||||||
|
*/
|
||||||
|
void MainWindow::reloadAtcStationsBooked()
|
||||||
|
{
|
||||||
|
if (!this->isContextNetworkAvailableCheck()) return;
|
||||||
|
this->m_atcListBooked->update(this->m_contextNetwork->getAtcStationsBooked());
|
||||||
|
this->ui->tv_AtcStationsBooked->resizeColumnsToContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read online stations
|
||||||
|
*/
|
||||||
|
void MainWindow::reloadAtcStationsOnline()
|
||||||
|
{
|
||||||
|
if (!this->isContextNetworkAvailableCheck()) return;
|
||||||
|
this->m_atcListOnline->update(this->m_contextNetwork->getAtcStationsOnline());
|
||||||
|
this->ui->tv_AtcStationsOnline->resizeColumnsToContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Station selected
|
||||||
|
*/
|
||||||
|
void MainWindow::onlineAtcStationSelected(QModelIndex index)
|
||||||
|
{
|
||||||
|
this->ui->te_AtcStationsOnlineInfo->setText(""); // reset
|
||||||
|
const CAtcStation stationClicked = this->m_atcListOnline->at(index);
|
||||||
|
QString infoMessage;
|
||||||
|
|
||||||
|
if (stationClicked.hasAtis())
|
||||||
|
{
|
||||||
|
infoMessage.append(stationClicked.getAtis().getMessage());
|
||||||
|
}
|
||||||
|
if (stationClicked.hasMetar())
|
||||||
|
{
|
||||||
|
if (!infoMessage.isEmpty()) infoMessage.append("\n\n");
|
||||||
|
infoMessage.append(stationClicked.getMetar().getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
this->ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get METAR
|
||||||
|
*/
|
||||||
|
void MainWindow::getMetar(const QString &airportIcaoCode)
|
||||||
|
{
|
||||||
|
if (!this->isContextNetworkAvailableCheck()) return;
|
||||||
|
if (!this->m_contextNetwork->isConnected()) return;
|
||||||
|
QString icao = airportIcaoCode.isEmpty() ? this->ui->le_AtcStationsOnlineMetar->text().trimmed().toUpper() : airportIcaoCode.trimmed().toUpper();
|
||||||
|
this->ui->le_AtcStationsOnlineMetar->setText(icao);
|
||||||
|
if (icao.length() != 4) return;
|
||||||
|
CInformationMessage metar = this->m_contextNetwork->getMetar(icao);
|
||||||
|
if (metar.getType() != CInformationMessage::METAR) return;
|
||||||
|
if (metar.isEmpty()) return;
|
||||||
|
this->ui->te_AtcStationsOnlineInfo->setText(metar.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ATC station tab changed are changed
|
||||||
|
*/
|
||||||
|
void MainWindow::atcStationTabChanged(int /** tabIndex **/)
|
||||||
|
{
|
||||||
|
if (this->isContextNetworkAvailableCheck())
|
||||||
|
{
|
||||||
|
if (this->ui->tw_AtcStations->currentWidget() == this->ui->tb_AtcStationsBooked)
|
||||||
|
{
|
||||||
|
if (this->m_atcListBooked->rowCount() < 1)
|
||||||
|
this->reloadAtcStationsBooked();
|
||||||
|
}
|
||||||
|
else if (this->ui->tw_AtcStations->currentWidget() == this->ui->tb_AtcStationsOnline)
|
||||||
|
{
|
||||||
|
this->reloadAtcStationsOnline();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -86,6 +86,34 @@ void MainWindow::updateCockpitFromContext()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// voice
|
||||||
|
//
|
||||||
|
if (!this->ui->cb_CockpitVoiceRoom1Override->isChecked())
|
||||||
|
{
|
||||||
|
if (!this->ui->cb_CockpitVoiceRoom1Override->isChecked() && this->m_voiceRoomCom1.isValid())
|
||||||
|
{
|
||||||
|
QString s(this->m_voiceRoomCom1.isConnected() ? "*" : "");
|
||||||
|
s.append(this->m_voiceRoomCom1.getVoiceRoomUrl());
|
||||||
|
this->ui->le_CockpitVoiceRoomCom1->setText(s);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this->ui->le_CockpitVoiceRoomCom1->setText("");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this->ui->cb_CockpitVoiceRoom2Override->isChecked())
|
||||||
|
{
|
||||||
|
if (this->m_voiceRoomCom2.isValid())
|
||||||
|
{
|
||||||
|
QString s(this->m_voiceRoomCom2.isConnected() ? "*" : "");
|
||||||
|
s.append(this->m_voiceRoomCom2.getVoiceRoomUrl());
|
||||||
|
this->ui->le_CockpitVoiceRoomCom2->setText(s);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this->ui->le_CockpitVoiceRoomCom2->setText("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset transponder mode to Standby
|
* Reset transponder mode to Standby
|
||||||
*/
|
*/
|
||||||
@@ -164,4 +192,33 @@ void MainWindow::sendCockpitUpdates()
|
|||||||
changedCockpit = true;
|
changedCockpit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Now with the new voice room data, really set the
|
||||||
|
// voice rooms in the context
|
||||||
|
//
|
||||||
|
if (changedCockpit && this->m_contextVoiceAvailable)
|
||||||
|
{
|
||||||
|
// set voice rooms here, this allows to use local/remote
|
||||||
|
// voice context
|
||||||
|
this->m_contextVoice->setComVoiceRooms(this->m_voiceRoomCom1, this->m_voiceRoomCom2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Voice room override
|
||||||
|
*/
|
||||||
|
void MainWindow::voiceRoomOverride()
|
||||||
|
{
|
||||||
|
this->ui->le_CockpitVoiceRoomCom1->setReadOnly(!this->ui->cb_CockpitVoiceRoom1Override->isChecked());
|
||||||
|
this->ui->le_CockpitVoiceRoomCom2->setReadOnly(!this->ui->cb_CockpitVoiceRoom2Override->isChecked());
|
||||||
|
if (this->ui->cb_CockpitVoiceRoom1Override->isChecked())
|
||||||
|
{
|
||||||
|
this->m_voiceRoomCom1 = this->ui->cb_CockpitVoiceRoom1Override->text().trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->ui->cb_CockpitVoiceRoom2Override->isChecked())
|
||||||
|
{
|
||||||
|
this->m_voiceRoomCom2 = this->ui->cb_CockpitVoiceRoom2Override->text().trimmed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,13 +62,17 @@ void MainWindow::init(bool withDBus)
|
|||||||
{
|
{
|
||||||
this->m_dBusConnection = QDBusConnection::sessionBus();
|
this->m_dBusConnection = QDBusConnection::sessionBus();
|
||||||
this->m_contextNetwork = new BlackCore::IContextNetwork(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
this->m_contextNetwork = new BlackCore::IContextNetwork(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
||||||
|
this->m_contextVoice = new BlackCore::IContextVoice(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
||||||
this->m_contextSettings = new BlackCore::IContextSettings(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
this->m_contextSettings = new BlackCore::IContextSettings(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
||||||
|
this->m_contextApplication = new BlackCore::IContextApplication(BlackCore::CDBusServer::ServiceName, this->m_dBusConnection, this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->m_coreRuntime = new CCoreRuntime(false, this);
|
this->m_coreRuntime = new CCoreRuntime(false, this);
|
||||||
this->m_contextNetwork = this->m_coreRuntime->getIContextNetwork();
|
this->m_contextNetwork = this->m_coreRuntime->getIContextNetwork();
|
||||||
|
this->m_contextVoice = this->m_coreRuntime->getIContextVoice();
|
||||||
this->m_contextSettings = this->m_coreRuntime->getIContextSettings();
|
this->m_contextSettings = this->m_coreRuntime->getIContextSettings();
|
||||||
|
this->m_contextApplication = this->m_coreRuntime->getIContextApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
// relay status messages
|
// relay status messages
|
||||||
@@ -127,6 +131,12 @@ void MainWindow::init(bool withDBus)
|
|||||||
this->m_timerUpdateAtcStationsOnline->start(10 * 1000);
|
this->m_timerUpdateAtcStationsOnline->start(10 * 1000);
|
||||||
this->m_timerContextWatchdog->start(2 * 1000);
|
this->m_timerContextWatchdog->start(2 * 1000);
|
||||||
|
|
||||||
|
// init availability
|
||||||
|
this->setContextAvailability();
|
||||||
|
|
||||||
|
// voice panel
|
||||||
|
this->setAudioDeviceLists();
|
||||||
|
|
||||||
// data
|
// data
|
||||||
this->initialDataReads();
|
this->initialDataReads();
|
||||||
|
|
||||||
|
|||||||
79
samples/blackgui/mainwindow_voice.cpp
Normal file
79
samples/blackgui/mainwindow_voice.cpp
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
#include "blackgui/atcstationlistmodel.h"
|
||||||
|
#include "blackcore/dbus_server.h"
|
||||||
|
#include "blackcore/context_network.h"
|
||||||
|
#include "blackcore/context_voice.h"
|
||||||
|
|
||||||
|
using namespace BlackCore;
|
||||||
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackGui;
|
||||||
|
using namespace BlackMisc::Network;
|
||||||
|
using namespace BlackMisc::Voice;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
using namespace BlackMisc::PhysicalQuantities;
|
||||||
|
using namespace BlackMisc::Geo;
|
||||||
|
using namespace BlackMisc::Settings;
|
||||||
|
using namespace BlackMisc::Math;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set audio device lists
|
||||||
|
*/
|
||||||
|
void MainWindow::setAudioDeviceLists()
|
||||||
|
{
|
||||||
|
if (!this->isContextVoiceAvailableCheck()) return;
|
||||||
|
this->ui->cb_VoiceOutputDevice->clear();
|
||||||
|
this->ui->cb_VoiceInputDevice->clear();
|
||||||
|
|
||||||
|
foreach(CAudioDevice device, this->m_contextVoice->getAudioDevices())
|
||||||
|
{
|
||||||
|
if (device.getType() == CAudioDevice::InputDevice)
|
||||||
|
{
|
||||||
|
this->ui->cb_VoiceInputDevice->addItem(device.toQString(true));
|
||||||
|
}
|
||||||
|
else if (device.getType() == CAudioDevice::OutputDevice)
|
||||||
|
{
|
||||||
|
this->ui->cb_VoiceOutputDevice->addItem(device.toQString(true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(CAudioDevice device, this->m_contextVoice->getCurrentAudioDevices())
|
||||||
|
{
|
||||||
|
if (device.getType() == CAudioDevice::InputDevice)
|
||||||
|
{
|
||||||
|
this->ui->cb_VoiceInputDevice->setCurrentText(device.toQString(true));
|
||||||
|
}
|
||||||
|
else if (device.getType() == CAudioDevice::OutputDevice)
|
||||||
|
{
|
||||||
|
this->ui->cb_VoiceOutputDevice->setCurrentText(device.toQString(true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Select audio device
|
||||||
|
*/
|
||||||
|
void MainWindow::audioDeviceSelected(int index)
|
||||||
|
{
|
||||||
|
if (!this->m_init) return; // not during init
|
||||||
|
if (!this->isContextVoiceAvailableCheck()) return;
|
||||||
|
if (index < 0)return;
|
||||||
|
CAudioDeviceList devices = this->m_contextVoice->getAudioDevices();
|
||||||
|
if (devices.isEmpty()) return;
|
||||||
|
CAudioDevice selectedDevice;
|
||||||
|
QObject *sender = QObject::sender();
|
||||||
|
if (sender == this->ui->cb_VoiceInputDevice)
|
||||||
|
{
|
||||||
|
CAudioDeviceList inputDevices = devices.getInputDevices();
|
||||||
|
if (index >= inputDevices.size()) return;
|
||||||
|
selectedDevice = inputDevices[index];
|
||||||
|
this->m_contextVoice->setCurrentAudioDevice(selectedDevice);
|
||||||
|
}
|
||||||
|
else if (sender == this->ui->cb_VoiceOutputDevice)
|
||||||
|
{
|
||||||
|
CAudioDeviceList outputDevices = devices.getOutputDevices();
|
||||||
|
if (index >= outputDevices.size()) return;
|
||||||
|
selectedDevice = outputDevices[index];
|
||||||
|
this->m_contextVoice->setCurrentAudioDevice(selectedDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
src/blackgui/userlistmodel.cpp
Normal file
27
src/blackgui/userlistmodel.cpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#include "userlistmodel.h"
|
||||||
|
#include "blackmisc/blackmiscfreefunctions.h"
|
||||||
|
#include <QMetaProperty>
|
||||||
|
#include <QBrush>
|
||||||
|
|
||||||
|
using namespace BlackMisc::Network;
|
||||||
|
|
||||||
|
namespace BlackGui
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
CUserListModel::CUserListModel(QObject *parent) :
|
||||||
|
CListModelBase<BlackMisc::Network::CUser, BlackMisc::Network::CUserList>("ViewUserList", parent)
|
||||||
|
{
|
||||||
|
this->m_columns.addColumn(CUser::IndexId, "id");
|
||||||
|
this->m_columns.addColumn(CUser::IndexRealName, "realname");
|
||||||
|
this->m_columns.addColumn(CUser::IndexId, "userid");
|
||||||
|
this->m_columns.addColumn(CUser::IndexEmail, "email");
|
||||||
|
|
||||||
|
// force strings for translation in resource files
|
||||||
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "id");
|
||||||
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "realname");
|
||||||
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "userid");
|
||||||
|
(void)QT_TRANSLATE_NOOP("ViewUserList", "email");
|
||||||
|
}
|
||||||
|
}
|
||||||
31
src/blackgui/userlistmodel.h
Normal file
31
src/blackgui/userlistmodel.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#ifndef BLACKGUI_USERLISTMODEL_H
|
||||||
|
#define BLACKGUI_USERLISTMODEL_H
|
||||||
|
|
||||||
|
#include <QAbstractItemModel>
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include "blackmisc/nwuserlist.h"
|
||||||
|
#include "blackgui/listmodelbase.h"
|
||||||
|
|
||||||
|
namespace BlackGui
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
* \brief Server list model
|
||||||
|
*/
|
||||||
|
class CUserListModel : public CListModelBase<BlackMisc::Network::CUser, BlackMisc::Network::CUserList>
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Constructor
|
||||||
|
* \param parent
|
||||||
|
*/
|
||||||
|
explicit CUserListModel(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Destructor
|
||||||
|
*/
|
||||||
|
virtual ~CUserListModel() {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif // guard
|
||||||
Reference in New Issue
Block a user