mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
committed by
Roland Winklmeier
parent
67f0c22f09
commit
a9768566e6
@@ -233,7 +233,7 @@ void MainWindow::ps_toggleNetworkConnection()
|
||||
this->m_ownAircraft.setIcaoInfo(icao);
|
||||
|
||||
// set latest aircraft
|
||||
this->getIContextOwnAircraft()->updateOwnAircraft(this->m_ownAircraft, MainWindow::sampleBlackGuiOriginator());
|
||||
this->getIContextOwnAircraft()->updateOwnAircraft(this->m_ownAircraft, MainWindow::swiftGuiStandardOriginator());
|
||||
|
||||
// flight plan
|
||||
this->ui->comp_MainInfoArea->getFlightPlanComponent()->prefillWithAircraftData(this->m_ownAircraft);
|
||||
|
||||
@@ -123,6 +123,9 @@ private:
|
||||
//! Init GUI signals
|
||||
void initGuiSignals();
|
||||
|
||||
//! Init dynamic menus
|
||||
void initDynamicMenus();
|
||||
|
||||
//! Context network availability check, otherwise status message
|
||||
bool isContextNetworkAvailableCheck();
|
||||
|
||||
@@ -169,9 +172,10 @@ private:
|
||||
void updateSimulatorData();
|
||||
|
||||
//! Originator for aircraft context
|
||||
static const QString &sampleBlackGuiOriginator()
|
||||
static const QString &swiftGuiStandardOriginator()
|
||||
{
|
||||
static const QString o = QString("GUISAMPLE1:").append(QString::number(QDateTime::currentMSecsSinceEpoch()));
|
||||
// one time init, timestamp allows "multiple swift GUIs"
|
||||
static const QString o = QString("SWIFTGUISTANDARD:").append(QString::number(QDateTime::currentMSecsSinceEpoch()));
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Aircrafts</string>
|
||||
<string>&Aircrafts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -275,7 +275,10 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ATC</string>
|
||||
<string>A&TC</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+K</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -284,6 +287,9 @@
|
||||
<property name="text">
|
||||
<string>Users</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I, U</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
@@ -303,6 +309,9 @@
|
||||
<property name="text">
|
||||
<string>Cockpit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I, C</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
@@ -329,6 +338,9 @@
|
||||
<property name="text">
|
||||
<string>Text/Chat</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I, T</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
@@ -336,6 +348,9 @@
|
||||
<property name="text">
|
||||
<string>Simulator</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I, S</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
@@ -374,6 +389,9 @@
|
||||
<property name="text">
|
||||
<string>Flightplan</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I, F</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
@@ -582,7 +600,13 @@
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menu_FileClose"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_InfoAreas">
|
||||
<property name="title">
|
||||
<string>Info areas</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menu_File"/>
|
||||
<addaction name="menu_InfoAreas"/>
|
||||
<addaction name="menu_Help"/>
|
||||
<addaction name="menu_Test"/>
|
||||
</widget>
|
||||
|
||||
@@ -45,5 +45,5 @@ void MainWindow::setTestPosition(const QString &wgsLatitude, const QString &wgsL
|
||||
|
||||
this->m_ownAircraft.setPosition(coordinate);
|
||||
this->m_ownAircraft.setAltitude(altitude);
|
||||
this->getIContextOwnAircraft()->updateOwnPosition(coordinate, altitude, MainWindow::sampleBlackGuiOriginator());
|
||||
this->getIContextOwnAircraft()->updateOwnPosition(coordinate, altitude, MainWindow::swiftGuiStandardOriginator());
|
||||
}
|
||||
|
||||
@@ -128,8 +128,9 @@ void MainWindow::init(const CRuntimeConfig &runtimeConfig)
|
||||
// data
|
||||
this->initialDataReads();
|
||||
|
||||
// start screen
|
||||
// start screen and complete menu
|
||||
this->ps_setMainPage(true);
|
||||
this->initDynamicMenus();
|
||||
|
||||
// starting
|
||||
this->getIContextApplication()->notifyAboutComponentChange(IContextApplication::ApplicationGui, IContextApplication::ApplicationStarts);
|
||||
|
||||
@@ -21,7 +21,6 @@ using namespace BlackMisc::Aviation;
|
||||
void MainWindow::ps_onMenuClicked()
|
||||
{
|
||||
QObject *sender = QObject::sender();
|
||||
|
||||
if (sender == this->ui->menu_TestLocationsEDRY)
|
||||
{
|
||||
this->setTestPosition("N 049° 18' 17", "E 008° 27' 05", CAltitude(312, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
|
||||
@@ -68,3 +67,11 @@ void MainWindow::ps_onMenuClicked()
|
||||
this->getIContextSettings()->reset(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::initDynamicMenus()
|
||||
{
|
||||
Q_ASSERT(this->ui->menu_InfoAreas);
|
||||
Q_ASSERT(this->ui->comp_MainInfoArea);
|
||||
this->ui->menu_InfoAreas->addActions(this->ui->comp_MainInfoArea->getInfoAreaSelectActions(this->ui->menu_InfoAreas));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,6 @@ void MainWindow::ps_setAudioVolumes()
|
||||
com1.setEnabled(!muted);
|
||||
com2.setEnabled(!muted);
|
||||
this->ui->pb_SoundMute->setText(muted ? "Unmute" : "Mute");
|
||||
this->ui->comp_InfoBarStatus->setVolume(muted ? 0 : 66); // TODO
|
||||
this->ui->comp_Cockpit->setCockpitVoiceStatusPixmap(muted ? CIcons::volumeMuted16() : CIcons::volumeHigh16());
|
||||
this->ui->pb_SoundMute->setStyleSheet(muted ? "background-color: red;" : "");
|
||||
if (muted) this->m_compInfoWindow->displayStringMessage("Sound is muted!");
|
||||
|
||||
Reference in New Issue
Block a user