mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 11:10:44 +00:00
Shut down GraphView tabs a little more cleanly
This commit is contained in:
parent
924a988769
commit
7eea8ca365
@ -396,15 +396,12 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
|||||||
previous_date=QDate();
|
previous_date=QDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Daily::~Daily()
|
Daily::~Daily()
|
||||||
{
|
{
|
||||||
GraphView->SaveSettings("Daily");
|
|
||||||
// disconnect(sessbar, SIGNAL(toggledSession(Session*)), this, SLOT(doToggleSession(Session*)));
|
// disconnect(sessbar, SIGNAL(toggledSession(Session*)), this, SLOT(doToggleSession(Session*)));
|
||||||
|
|
||||||
disconnect(webView,SIGNAL(linkClicked(QUrl)),this,SLOT(Link_clicked(QUrl)));
|
|
||||||
// Save any last minute changes..
|
// Save any last minute changes..
|
||||||
if (previous_date.isValid())
|
|
||||||
Unload(previous_date);
|
|
||||||
|
|
||||||
// delete splitter;
|
// delete splitter;
|
||||||
delete ui;
|
delete ui;
|
||||||
@ -412,6 +409,17 @@ Daily::~Daily()
|
|||||||
delete icon_off;
|
delete icon_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Daily::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
disconnect(webView,SIGNAL(linkClicked(QUrl)),this,SLOT(Link_clicked(QUrl)));
|
||||||
|
|
||||||
|
if (previous_date.isValid())
|
||||||
|
Unload(previous_date);
|
||||||
|
GraphView->SaveSettings("Daily");
|
||||||
|
QWidget::closeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Daily::doToggleSession(Session * sess)
|
void Daily::doToggleSession(Session * sess)
|
||||||
{
|
{
|
||||||
Q_UNUSED(sess)
|
Q_UNUSED(sess)
|
||||||
|
@ -79,6 +79,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
explicit Daily(QWidget *parent, gGraphView *shared);
|
explicit Daily(QWidget *parent, gGraphView *shared);
|
||||||
~Daily();
|
~Daily();
|
||||||
|
void closeEvent(QCloseEvent *);
|
||||||
|
|
||||||
/*! \fn ReloadGraphs()
|
/*! \fn ReloadGraphs()
|
||||||
\brief Reload all graph information from disk and updates the view.
|
\brief Reload all graph information from disk and updates the view.
|
||||||
*/
|
*/
|
||||||
|
@ -242,17 +242,20 @@ void MainWindow::closeEvent(QCloseEvent * event)
|
|||||||
{
|
{
|
||||||
if (daily) {
|
if (daily) {
|
||||||
daily->close();
|
daily->close();
|
||||||
delete daily;
|
daily->deleteLater();
|
||||||
|
// delete daily;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overview) {
|
if (overview) {
|
||||||
overview->close();
|
overview->close();
|
||||||
delete overview;
|
overview->deleteLater();
|
||||||
|
// delete overview;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oximetry) {
|
if (oximetry) {
|
||||||
oximetry->close();
|
oximetry->close();
|
||||||
delete oximetry;
|
oximetry->deleteLater();
|
||||||
|
// delete oximetry;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown and Save the current User profile
|
// Shutdown and Save the current User profile
|
||||||
|
@ -299,13 +299,19 @@ Overview::Overview(QWidget *parent, gGraphView *shared) :
|
|||||||
}
|
}
|
||||||
Overview::~Overview()
|
Overview::~Overview()
|
||||||
{
|
{
|
||||||
GraphView->SaveSettings("Overview");//no trans
|
|
||||||
disconnect(this, SLOT(dateStart_currentPageChanged(int, int)));
|
|
||||||
disconnect(this, SLOT(dateEnd_currentPageChanged(int, int)));
|
|
||||||
delete ui;
|
delete ui;
|
||||||
delete icon_on;
|
delete icon_on;
|
||||||
delete icon_off;
|
delete icon_off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Overview::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
GraphView->SaveSettings("Overview");//no trans
|
||||||
|
disconnect(this, SLOT(dateStart_currentPageChanged(int, int)));
|
||||||
|
disconnect(this, SLOT(dateEnd_currentPageChanged(int, int)));
|
||||||
|
QWidget::closeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
gGraph *Overview::createGraph(QString name, QString units, YTickerType yttype)
|
gGraph *Overview::createGraph(QString name, QString units, YTickerType yttype)
|
||||||
{
|
{
|
||||||
int default_height = PROFILE.appearance->graphHeight();
|
int default_height = PROFILE.appearance->graphHeight();
|
||||||
|
@ -39,6 +39,7 @@ class Overview : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit Overview(QWidget *parent, gGraphView *shared = nullptr);
|
explicit Overview(QWidget *parent, gGraphView *shared = nullptr);
|
||||||
~Overview();
|
~Overview();
|
||||||
|
void closeEvent(QCloseEvent *);
|
||||||
|
|
||||||
//! \brief Returns Overview gGraphView object containing it's graphs
|
//! \brief Returns Overview gGraphView object containing it's graphs
|
||||||
gGraphView *graphView() { return GraphView; }
|
gGraphView *graphView() { return GraphView; }
|
||||||
|
@ -1248,10 +1248,16 @@ Oximetry::Oximetry(QWidget *parent, gGraphView *shared) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
Oximetry::~Oximetry()
|
Oximetry::~Oximetry()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Oximetry::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
delete oximeter;
|
delete oximeter;
|
||||||
GraphView->SaveSettings("Oximetry");
|
GraphView->SaveSettings("Oximetry");
|
||||||
delete ui;
|
|
||||||
|
QWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Oximetry::on_RefreshPortsButton_clicked()
|
void Oximetry::on_RefreshPortsButton_clicked()
|
||||||
|
@ -306,6 +306,7 @@ class Oximetry : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit Oximetry(QWidget *parent, gGraphView *shared = nullptr);
|
explicit Oximetry(QWidget *parent, gGraphView *shared = nullptr);
|
||||||
~Oximetry();
|
~Oximetry();
|
||||||
|
void closeEvent(QCloseEvent *);
|
||||||
|
|
||||||
//! \brief Calls updateGL to redraw the graphs
|
//! \brief Calls updateGL to redraw the graphs
|
||||||
void RedrawGraphs();
|
void RedrawGraphs();
|
||||||
|
Loading…
Reference in New Issue
Block a user