mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-14 01:30:49 +00:00
channels Updated With Preferences - allows oxi preferences flagPulseAbove/Below and flagSPO2 to work.
This commit is contained in:
parent
9543cbd9c2
commit
71373d38b5
@ -7,6 +7,9 @@
|
|||||||
* License. See the file COPYING in the main directory of the source code
|
* License. See the file COPYING in the main directory of the source code
|
||||||
* for more details. */
|
* for more details. */
|
||||||
|
|
||||||
|
#define TEST_MACROS_ENABLEDoff
|
||||||
|
#include <test_macros.h>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -2101,7 +2104,7 @@ void Profile::loadChannels()
|
|||||||
|
|
||||||
if (chan->isNull()) {
|
if (chan->isNull()) {
|
||||||
qDebug() << "loadChannels has no idea about channel" << name;
|
qDebug() << "loadChannels has no idea about channel" << name;
|
||||||
if (in.atEnd()) return;
|
if (in.atEnd()) break;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
chan->setEnabled(enabled);
|
chan->setEnabled(enabled);
|
||||||
@ -2122,8 +2125,14 @@ void Profile::loadChannels()
|
|||||||
chan->setUpperThresholdColor(upperThresholdColor);
|
chan->setUpperThresholdColor(upperThresholdColor);
|
||||||
|
|
||||||
chan->setShowInOverview(showOverview);
|
chan->setShowInOverview(showOverview);
|
||||||
if (in.atEnd()) return;
|
if (in.atEnd()) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
f.close();
|
f.close();
|
||||||
|
refrehOxiChannelsPref();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Profile::refrehOxiChannelsPref() {
|
||||||
|
schema::channel[OXI_Pulse].setLowerThreshold(oxi->flagPulseBelow());
|
||||||
|
schema::channel[OXI_Pulse].setUpperThreshold(oxi->flagPulseAbove());
|
||||||
|
schema::channel[OXI_SPO2].setLowerThreshold(oxi->oxiDesaturationThreshold());
|
||||||
|
};
|
||||||
|
@ -216,6 +216,7 @@ class Profile : public Preferences
|
|||||||
|
|
||||||
void loadChannels();
|
void loadChannels();
|
||||||
void saveChannels();
|
void saveChannels();
|
||||||
|
void refrehOxiChannelsPref();
|
||||||
|
|
||||||
|
|
||||||
bool is_first_day;
|
bool is_first_day;
|
||||||
|
@ -820,11 +820,6 @@ bool PreferencesDialog::Save()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
schema::channel[OXI_SPO2].setLowerThreshold(ui->oxiDesaturationThreshold->value());
|
|
||||||
schema::channel[OXI_Pulse].setLowerThreshold(ui->flagPulseBelow->value());
|
|
||||||
schema::channel[OXI_Pulse].setUpperThreshold(ui->flagPulseAbove->value());
|
|
||||||
|
|
||||||
|
|
||||||
AppSetting->setUserEventPieChart(ui->showUserFlagsInPie->isChecked());
|
AppSetting->setUserEventPieChart(ui->showUserFlagsInPie->isChecked());
|
||||||
profile->session->setLockSummarySessions(ui->LockSummarySessionSplitting->isChecked());
|
profile->session->setLockSummarySessions(ui->LockSummarySessionSplitting->isChecked());
|
||||||
profile->session->setWarnOnUntestedMachine(ui->warnOnUntestedMachine->isChecked());
|
profile->session->setWarnOnUntestedMachine(ui->warnOnUntestedMachine->isChecked());
|
||||||
@ -986,6 +981,7 @@ bool PreferencesDialog::Save()
|
|||||||
|
|
||||||
p_pref->Save();
|
p_pref->Save();
|
||||||
profile->Save();
|
profile->Save();
|
||||||
|
profile->refrehOxiChannelsPref();
|
||||||
|
|
||||||
if (recompress_events) {
|
if (recompress_events) {
|
||||||
mainwin->recompressEvents();
|
mainwin->recompressEvents();
|
||||||
|
@ -38,11 +38,13 @@ To turn off the the test macros.
|
|||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
#define DEBUGQ qDebug().noquote()
|
#define DEBUGQ qDebug().noquote()
|
||||||
#define DEBUGL DEBUGQ <<QString("%1[%2]").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
#define DEBUGW qWarning().noquote()
|
||||||
#define DEBUGF DEBUGQ <<QString("%1[%2]%3").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__).arg(__func__)
|
#define DEBUGL DEBUGQ <<QString("%1[%2]").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
||||||
#define DEBUGT DEBUGQ <<QString("%1 %2[%3]%4").arg(QDateTime::currentDateTime().time().toString("hh:mm:ss.zzz")).arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
#define DEBUGF DEBUGQ <<QString("%1[%2]%3").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__).arg(__func__)
|
||||||
#define DEBUGTF DEBUGQ <<QString("%1 %2[%3]%4").arg(QDateTime::currentDateTime().time().toString("hh:mm:ss.zzz")).arg(QFileInfo( __FILE__).baseName()).arg(__LINE__).arg(__func__)
|
#define DEBUGFW DEBUGW <<QString("%1[%2]%3").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__).arg(__func__)
|
||||||
|
#define DEBUGT DEBUGQ <<QString("%1 %2[%3]%4").arg(QDateTime::currentDateTime().time().toString("hh:mm:ss.zzz")).arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
||||||
|
#define DEBUGTF DEBUGQ <<QString("%1 %2[%3]%4").arg(QDateTime::currentDateTime().time().toString("hh:mm:ss.zzz")).arg(QFileInfo( __FILE__).baseName()).arg(__LINE__).arg(__func__)
|
||||||
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
#define Z( EXPRESSION ) /* comment out display of variable */
|
#define Z( EXPRESSION ) /* comment out display of variable */
|
||||||
@ -100,8 +102,10 @@ To turn off the the test macros.
|
|||||||
// Turn debugging off. macros expands to white space
|
// Turn debugging off. macros expands to white space
|
||||||
|
|
||||||
#define DEBUGQ
|
#define DEBUGQ
|
||||||
|
#define DEBUGW
|
||||||
#define DEBUGL
|
#define DEBUGL
|
||||||
#define DEBUGF
|
#define DEBUGF
|
||||||
|
#define DEBUGFW
|
||||||
#define DEBUGT
|
#define DEBUGT
|
||||||
#define DEBUGTF
|
#define DEBUGTF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user