mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
refs #693, integrated GUI close dialog
* utility function in CGuiApplication containing the logic (dialog needed, ..) * closeEvent function
This commit is contained in:
@@ -58,6 +58,16 @@ void CSwiftData::initStyleSheet()
|
||||
CSwiftData::~CSwiftData()
|
||||
{ }
|
||||
|
||||
void CSwiftData::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (sGui)
|
||||
{
|
||||
// save settings
|
||||
if (sGui->showCloseDialog(this, event) == QDialog::Rejected) { return; }
|
||||
}
|
||||
this->performGracefulShutdown();
|
||||
}
|
||||
|
||||
void CSwiftData::ps_appendLogMessage(const CStatusMessage &message)
|
||||
{
|
||||
CLogComponent *logComponent = ui->comp_MainInfoArea->getLogComponent();
|
||||
|
||||
@@ -46,6 +46,12 @@ public:
|
||||
//! Destructor
|
||||
~CSwiftData();
|
||||
|
||||
protected:
|
||||
//! \name QMainWindow events
|
||||
//! @[
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
//! @}
|
||||
|
||||
private slots:
|
||||
//! Append log message
|
||||
void ps_appendLogMessage(const BlackMisc::CStatusMessage &message);
|
||||
|
||||
Reference in New Issue
Block a user