GUI fixes

* added missing support for weather component in main info area
* closing the navigator needs to display main window (otherwise no windows is visible)
This commit is contained in:
Klaus Basan
2016-11-13 22:09:54 +01:00
parent 6e6a1d1519
commit 281bae1e6e
7 changed files with 34 additions and 3 deletions

View File

@@ -70,6 +70,11 @@ namespace BlackGui
return ui->comp_Settings;
}
CWeatherComponent *CMainInfoAreaComponent::getWeatherComponent()
{
return ui->comp_Weather;
}
CLogComponent *CMainInfoAreaComponent::getLogComponent()
{
return ui->comp_Log;
@@ -117,6 +122,7 @@ namespace BlackGui
case InfoAreaMappings:
case InfoAreaSettings:
case InfoAreaTextMessages:
case InfoAreaWeather:
return QSize(600, 400);
break;
case InfoAreaFlightPlan:

View File

@@ -93,6 +93,9 @@ namespace BlackGui
//! Settings
CSettingsComponent *getSettingsComponent();
//! Weather component
CWeatherComponent *getWeatherComponent();
//! Log messages
CLogComponent *getLogComponent();

View File

@@ -106,6 +106,12 @@ namespace BlackGui
this->adjustNavigatorSize(gridLayout);
}
void CNavigatorDialog::reject()
{
this->hide();
emit navigatorClosed();
}
void CNavigatorDialog::toggleFrameless()
{
this->setFrameless(!this->isFrameless());
@@ -287,7 +293,7 @@ namespace BlackGui
a->setData("1c");
a = contextMenu->addAction(CIcons::resize16(), "2 columns", this, &CNavigatorDialog::ps_changeLayout);
a->setData("2c");
QString frameLessActionText = this->isFrameless() ? "Normal window" : "Frameless";
const QString frameLessActionText = this->isFrameless() ? "Normal window" : "Frameless";
contextMenu->addAction(BlackMisc::CIcons::tableSheet16(), frameLessActionText, this, SLOT(toggleFrameless()));
contextMenu->addAction("Adjust margins", this, &CNavigatorDialog::ps_dummy);
contextMenu->addAction(this->m_marginMenuAction);

View File

@@ -55,6 +55,13 @@ namespace BlackGui
//! Navigator
void buildNavigator(int columns);
//! Called when dialog is closed
virtual void reject() override;
signals:
//! Navigator closed
void navigatorClosed();
public slots:
//! Toggle frameless mode
void toggleFrameless();