mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Fix closeEvent's not firing, and not saving settings properly
This commit is contained in:
parent
41622b1ed9
commit
9d6ac34025
@ -79,9 +79,6 @@ public:
|
||||
*/
|
||||
explicit Daily(QWidget *parent, gGraphView *shared);
|
||||
~Daily();
|
||||
void closeEvent(QCloseEvent *);
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
|
||||
/*! \fn ReloadGraphs()
|
||||
\brief Reload all graph information from disk and updates the view.
|
||||
@ -259,6 +256,8 @@ private slots:
|
||||
void doToggleSession(Session *);
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
|
||||
private:
|
||||
/*! \fn CreateJournalSession()
|
||||
|
@ -1,16 +1,18 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1><image src="qrc:/docs/sheep.png" width=64 height=64>SleepyHead v0.9.6 <b>BETA</b></h1>
|
||||
<h1><image src="qrc:/docs/sheep.png" width=64 height=64>SleepyHead v0.9.6 <b>Testing</b></h1>
|
||||
|
||||
<p><h2><b>Release Notes</b></h2></p>
|
||||
<p>Greetings!</p>
|
||||
<p>Here is a new and hopefully improved SleepyHead build.</p>
|
||||
<p>This build features rework to the graphing code which should hopefully increase compatability a little, at the cost of a little performance.</p>
|
||||
|
||||
<b>New features & bugs fixes in v0.9.6</b><br/>
|
||||
<list>
|
||||
<li>Threadsafety improvements to debug/logger</li>
|
||||
<li>Multithreaded PRS1 and ResMed loader improvements</li>
|
||||
<li>Minor user interface tweaks</li>
|
||||
<li>Added ChoiceMMed MD300W1 Oximeter file import support</li>
|
||||
<li>Graph Preferences min/max settings are now honoured correctly</li>
|
||||
<li>Complete Rewrite of CMS50 Importer</li>
|
||||
<li>Completely redesigned Oximetery with new Import Wizard</li>
|
||||
<li>Improved data Purge and Reimport from backup abilities</li>
|
||||
|
@ -306,24 +306,24 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent * event)
|
||||
{
|
||||
// Shutdown and Save the current User profile
|
||||
Profiles::Done();
|
||||
|
||||
if (daily) {
|
||||
//daily->close();
|
||||
daily->close();
|
||||
daily->deleteLater();
|
||||
}
|
||||
|
||||
if (overview) {
|
||||
//overview->close();
|
||||
overview->close();
|
||||
overview->deleteLater();
|
||||
}
|
||||
|
||||
if (oximetry) {
|
||||
//oximetry->close();
|
||||
oximetry->close();
|
||||
oximetry->deleteLater();
|
||||
}
|
||||
|
||||
// Shutdown and Save the current User profile
|
||||
Profiles::Done();
|
||||
|
||||
// Save current window position
|
||||
QSettings settings(getDeveloperName(), getAppName());
|
||||
settings.setValue("MainWindow/geometry", saveGeometry());
|
||||
|
@ -140,13 +140,13 @@ class MainWindow : public QMainWindow
|
||||
//! \brief Internal function to set Records Box html from statistics module
|
||||
void setRecBoxHTML(QString html);
|
||||
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
||||
public slots:
|
||||
//! \brief Recalculate all event summaries and flags
|
||||
void doReprocessEvents();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
|
||||
private slots:
|
||||
|
@ -546,6 +546,7 @@ bool PreferencesDialog::Save()
|
||||
PREF.Save();
|
||||
PROFILE.Save();
|
||||
|
||||
|
||||
if (recalc_events) {
|
||||
// send a signal instead?
|
||||
mainwin->reprocessEvents(needs_restart);
|
||||
@ -553,6 +554,9 @@ bool PreferencesDialog::Save()
|
||||
mainwin->RestartApplication();
|
||||
} else {
|
||||
mainwin->getDaily()->LoadDate(mainwin->getDaily()->getDate());
|
||||
// Save early.. just in case..
|
||||
mainwin->getDaily()->graphView()->SaveSettings("Daily");
|
||||
mainwin->getOverview()->graphView()->SaveSettings("Overview");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user