mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #485, moved central GUI functionality to sGui
* allow to send status message to main window (from everywhere) * Use sGui::changedStylesheet where possible * message when model is stashed * improved application startup
This commit is contained in:
committed by
Mathew Sutcliffe
parent
b1353cefd4
commit
fb046ae1fb
@@ -12,6 +12,7 @@
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/components/datamaininfoareacomponent.h"
|
||||
#include "blackgui/components/datainfoareacomponent.h"
|
||||
#include "blackgui/components/dbmappingcomponent.h"
|
||||
#include "blackgui/components/logcomponent.h"
|
||||
#include "blackgui/stylesheetutility.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
@@ -53,6 +54,18 @@ void CSwiftData::initStyleSheet()
|
||||
CSwiftData::~CSwiftData()
|
||||
{ }
|
||||
|
||||
bool CSwiftData::displayInStatusBar(const CStatusMessage &message)
|
||||
{
|
||||
this->m_statusBar.displayStatusMessage(message);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSwiftData::displayInOverlayWindow(const CStatusMessage &message)
|
||||
{
|
||||
this->ui->comp_MainInfoArea->getMappingComponent()->showOverlayMessage(message);
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSwiftData::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
@@ -80,7 +93,7 @@ void CSwiftData::init()
|
||||
sGui->initMainApplicationWindow(this);
|
||||
this->initStyleSheet();
|
||||
this->initLogDisplay();
|
||||
connect(&CStyleSheetUtility::instance(), &CStyleSheetUtility::styleSheetsChanged, this, &CSwiftData::ps_onStyleSheetsChanged);
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CSwiftData::ps_onStyleSheetsChanged);
|
||||
this->initMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
#ifndef SWIFTDATA_H
|
||||
#define SWIFTDATA_H
|
||||
|
||||
#include "blackgui/systemtraywindow.h"
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackgui/mainwindowaccess.h"
|
||||
#include "blackcore/corefacade.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/data/updateinfo.h"
|
||||
#include "blackcore/setupreader.h"
|
||||
#include "blackgui/systemtraywindow.h"
|
||||
#include "blackgui/managedstatusbar.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include <QScopedPointer>
|
||||
@@ -30,7 +31,8 @@ namespace BlackCore { class CWebDataServices; }
|
||||
*/
|
||||
class CSwiftData :
|
||||
public QMainWindow,
|
||||
public BlackMisc::CIdentifiable
|
||||
public BlackMisc::CIdentifiable,
|
||||
public BlackGui::IMainWindowAccess
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -41,6 +43,12 @@ public:
|
||||
//! Destructor
|
||||
~CSwiftData();
|
||||
|
||||
//! \name direct access to main application window
|
||||
//! @{
|
||||
virtual bool displayInStatusBar(const BlackMisc::CStatusMessage &message) override;
|
||||
virtual bool displayInOverlayWindow(const BlackMisc::CStatusMessage &message) override;
|
||||
//! }@
|
||||
|
||||
protected:
|
||||
//! \copydoc QMainWindow::closeEvent
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user