mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-13 01:00:47 +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
|
||||
* for more details. */
|
||||
|
||||
#define TEST_MACROS_ENABLEDoff
|
||||
#include <test_macros.h>
|
||||
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
@ -2101,7 +2104,7 @@ void Profile::loadChannels()
|
||||
|
||||
if (chan->isNull()) {
|
||||
qDebug() << "loadChannels has no idea about channel" << name;
|
||||
if (in.atEnd()) return;
|
||||
if (in.atEnd()) break;
|
||||
continue;
|
||||
}
|
||||
chan->setEnabled(enabled);
|
||||
@ -2122,8 +2125,14 @@ void Profile::loadChannels()
|
||||
chan->setUpperThresholdColor(upperThresholdColor);
|
||||
|
||||
chan->setShowInOverview(showOverview);
|
||||
if (in.atEnd()) return;
|
||||
if (in.atEnd()) break;
|
||||
}
|
||||
|
||||
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 saveChannels();
|
||||
void refrehOxiChannelsPref();
|
||||
|
||||
|
||||
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());
|
||||
profile->session->setLockSummarySessions(ui->LockSummarySessionSplitting->isChecked());
|
||||
profile->session->setWarnOnUntestedMachine(ui->warnOnUntestedMachine->isChecked());
|
||||
@ -986,6 +981,7 @@ bool PreferencesDialog::Save()
|
||||
|
||||
p_pref->Save();
|
||||
profile->Save();
|
||||
profile->refrehOxiChannelsPref();
|
||||
|
||||
if (recompress_events) {
|
||||
mainwin->recompressEvents();
|
||||
|
@ -38,11 +38,13 @@ To turn off the the test macros.
|
||||
#include <QRegularExpression>
|
||||
#include <QFileInfo>
|
||||
|
||||
#define DEBUGQ qDebug().noquote()
|
||||
#define DEBUGL DEBUGQ <<QString("%1[%2]").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
||||
#define DEBUGF DEBUGQ <<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__)
|
||||
#define DEBUGQ qDebug().noquote()
|
||||
#define DEBUGW qWarning().noquote()
|
||||
#define DEBUGL DEBUGQ <<QString("%1[%2]").arg(QFileInfo( __FILE__).baseName()).arg(__LINE__)
|
||||
#define DEBUGF DEBUGQ <<QString("%1[%2]%3").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
|
||||
#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
|
||||
|
||||
#define DEBUGQ
|
||||
#define DEBUGW
|
||||
#define DEBUGL
|
||||
#define DEBUGF
|
||||
#define DEBUGFW
|
||||
#define DEBUGT
|
||||
#define DEBUGTF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user