diff --git a/src/blackgui/cockpitv1component.ui b/src/blackgui/cockpitv1component.ui
index 37097ba5b..0b0991bd5 100644
--- a/src/blackgui/cockpitv1component.ui
+++ b/src/blackgui/cockpitv1component.ui
@@ -90,7 +90,7 @@
118.000000000000000
- 136.000000000000000
+ 136.974999999999994
0.025000000000000
@@ -141,7 +141,7 @@
118.000000000000000
- 136.000000000000000
+ 136.974999999999994
0.025000000000000
@@ -175,7 +175,7 @@
118.000000000000000
- 136.000000000000000
+ 136.974999999999994
0.025000000000000
@@ -206,7 +206,7 @@
118.000000000000000
- 136.000000000000000
+ 136.974999999999994
0.025000000000000
diff --git a/src/blackgui/textmessagecomponent.cpp b/src/blackgui/textmessagecomponent.cpp
index f3ce087ad..e892efb82 100644
--- a/src/blackgui/textmessagecomponent.cpp
+++ b/src/blackgui/textmessagecomponent.cpp
@@ -42,11 +42,6 @@ namespace BlackGui
delete ui;
}
- void CTextMessageComponent::setToolTip(const QString &tooltipText, CTextMessageComponent::Tab tab)
- {
- this->getTab(tab)->setToolTip(tooltipText);
- }
-
QWidget *CTextMessageComponent::getTab(CTextMessageComponent::Tab tab)
{
switch (tab)
@@ -137,6 +132,16 @@ namespace BlackGui
}
}
+ void CTextMessageComponent::changedAircraftCockpit()
+ {
+ this->showCurrentFrequenciesFromCockpit();
+ }
+
+ void CTextMessageComponent::runtimeHasBeenSet()
+ {
+ connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraftCockpit, this, &CTextMessageComponent::changedAircraftCockpit);
+ }
+
/*
* Is the tab of the message's receiver selected?
*/
@@ -166,6 +171,17 @@ namespace BlackGui
}
}
+ void CTextMessageComponent::showCurrentFrequenciesFromCockpit()
+ {
+ CAircraft ownAircraft = this->getOwnAircraft();
+ const QString f1 = QString("COM1: %1").arg(ownAircraft.getCom1System().getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3));
+ const QString f2 = QString("COM2: %1").arg(ownAircraft.getCom2System().getFrequencyActive().valueRounded(CFrequencyUnit::MHz(), 3));
+ this->ui->tb_TextMessagesCOM1->setToolTip(f1);
+ this->ui->tb_TextMessagesCOM1->setToolTip(f2);
+ this->setTabText(this->indexOf(this->ui->tb_TextMessagesCOM1), f1);
+ this->setTabText(this->indexOf(this->ui->tb_TextMessagesCOM2), f2);
+ }
+
/*
* Add new text message tab
*/
diff --git a/src/blackgui/textmessagecomponent.h b/src/blackgui/textmessagecomponent.h
index c403ece63..49a67743a 100644
--- a/src/blackgui/textmessagecomponent.h
+++ b/src/blackgui/textmessagecomponent.h
@@ -34,9 +34,6 @@ namespace BlackGui
//! Destructor
~CTextMessageComponent();
- //! Set tooltip
- void setToolTip(const QString &tooltipText, Tab tab);
-
//! SELCAL callback, SELCAL is obtained by that
void setSelcalCallback(const std::function &selcalCallback) { this->m_selcalCallback = selcalCallback; }
@@ -55,6 +52,13 @@ namespace BlackGui
*/
void appendTextMessagesToGui(const BlackMisc::Network::CTextMessageList &messages, bool sending = false);
+ //! Cockpit values changed, used to updated some components
+ void changedAircraftCockpit();
+
+ protected:
+ //! \copydoc CRuntimeBasedComponent::runtimeHasBeenSet
+ void runtimeHasBeenSet() override;
+
private:
Ui::CTextMessageComponent *ui;
QWidget *getTab(Tab tab); //!< enum to widget
@@ -94,6 +98,9 @@ namespace BlackGui
//! Network connected?
bool isNetworkConnected() const { return this->getIContextNetwork() && this->getIContextNetwork()->isConnected() ; }
+ //! Show current frequencies
+ void showCurrentFrequenciesFromCockpit();
+
private slots:
//! Close text message tab
void closeTextMessageTab();
diff --git a/src/blackmisc/avcallsign.cpp b/src/blackmisc/avcallsign.cpp
index 4987522b2..fc25b7671 100644
--- a/src/blackmisc/avcallsign.cpp
+++ b/src/blackmisc/avcallsign.cpp
@@ -28,7 +28,7 @@ namespace BlackMisc
const QPixmap &CCallsign::convertToIcon(const CCallsign &callsign)
{
static const QPixmap app(QPixmap(":/blackmisc/icons/aircraft_arrival.jpg").scaledToWidth(16, Qt::SmoothTransformation));
- static const QPixmap gnd(QPixmap(":/blackmisc/icons/tower.png").scaledToWidth(16, Qt::SmoothTransformation));
+ static const QPixmap gnd(QPixmap(":/blackmisc/icons/gnd_framed.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap del(QPixmap(":/blackmisc/icons/aircraft_departure.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap twr(QPixmap(":/blackmisc/icons/tower_framed.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap ctr(QPixmap(":/blackmisc/icons/sky.jpg").scaledToWidth(16, Qt::SmoothTransformation));
diff --git a/src/blackmisc/icons/gnd_framed.jpg b/src/blackmisc/icons/gnd_framed.jpg
new file mode 100644
index 000000000..87f82d7d1
Binary files /dev/null and b/src/blackmisc/icons/gnd_framed.jpg differ
diff --git a/src/blacksound/sounds/voiceroomjoined.wav b/src/blacksound/sounds/voiceroomjoined.wav
index 8149d79bc..dceb968fe 100644
Binary files a/src/blacksound/sounds/voiceroomjoined.wav and b/src/blacksound/sounds/voiceroomjoined.wav differ
diff --git a/src/blacksound/sounds/voiceroomleft.wav b/src/blacksound/sounds/voiceroomleft.wav
index 8149d79bc..855944725 100644
Binary files a/src/blacksound/sounds/voiceroomleft.wav and b/src/blacksound/sounds/voiceroomleft.wav differ