[Weather] Message that "real weather is loading"

This commit is contained in:
Klaus Basan
2020-04-20 12:46:56 +02:00
committed by Mat Sutcliffe
parent 8f5e24fe0b
commit 170da452ee
2 changed files with 5 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ namespace BlackGui
namespace Components namespace Components
{ {
CWeatherComponent::CWeatherComponent(QWidget *parent) : CWeatherComponent::CWeatherComponent(QWidget *parent) :
QWidget(parent), COverlayMessagesFrameEnableForDockWidgetInfoArea(parent),
CIdentifiable(this), CIdentifiable(this),
ui(new Ui::CWeatherComponent) ui(new Ui::CWeatherComponent)
{ {
@@ -215,8 +215,9 @@ namespace BlackGui
if (m_lastOwnAircraftPosition.isNull() || if (m_lastOwnAircraftPosition.isNull() ||
calculateGreatCircleDistance(position, m_lastOwnAircraftPosition).value(CLengthUnit::km()) > 20) calculateGreatCircleDistance(position, m_lastOwnAircraftPosition).value(CLengthUnit::km()) > 20)
{ {
requestWeatherGrid(position); this->requestWeatherGrid(position);
m_lastOwnAircraftPosition = position; m_lastOwnAircraftPosition = position;
showOverlayHTMLMessage("Weather loading,<br>this may take a while", 7500);
} }
} }
else else
@@ -234,6 +235,7 @@ namespace BlackGui
if (!CWeatherScenario::isRealWeatherScenario(scenario)) { return; } if (!CWeatherScenario::isRealWeatherScenario(scenario)) { return; }
// we have received weather grid data and assume those are real weather updates // we have received weather grid data and assume those are real weather updates
closeOverlay();
} }
ui->lbl_Status->setText({}); ui->lbl_Status->setText({});
setWeatherGrid(weatherGrid); setWeatherGrid(weatherGrid);

View File

@@ -40,8 +40,7 @@ namespace BlackGui
{ {
//! Weather component //! Weather component
class BLACKGUI_EXPORT CWeatherComponent : class BLACKGUI_EXPORT CWeatherComponent :
public QWidget, public COverlayMessagesFrameEnableForDockWidgetInfoArea,
public CEnableForDockWidgetInfoArea,
public BlackMisc::CIdentifiable public BlackMisc::CIdentifiable
{ {
Q_OBJECT Q_OBJECT