mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Multi select dialog not working on mac, more oximetry stuff
This commit is contained in:
parent
c60cdc754d
commit
3ec70b660d
@ -323,7 +323,7 @@ int calcPulseChange(Session *session)
|
||||
tmp=fabs(val2-val);
|
||||
if (tmp > lv) {
|
||||
lastt=time2;
|
||||
lv=tmp;
|
||||
//lv=tmp;
|
||||
li=j;
|
||||
}
|
||||
}
|
||||
@ -361,13 +361,13 @@ int calcSPO2Drop(Session *session)
|
||||
bool ok;
|
||||
qint64 window=PROFILE["SPO2DropDuration"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["SPO2DropDuration"]=4;
|
||||
window=4000;
|
||||
PROFILE["SPO2DropDuration"]=10;
|
||||
window=10000;
|
||||
} else window*=1000;
|
||||
change=PROFILE["SPO2DropPercentage"].toDouble(&ok);
|
||||
if (!ok) {
|
||||
PROFILE["SPO2DropPercentage"]=4;
|
||||
change=4;
|
||||
PROFILE["SPO2DropPercentage"]=3;
|
||||
change=3;
|
||||
}
|
||||
|
||||
EventList *pc=new EventList(EVL_Event);
|
||||
@ -375,40 +375,59 @@ int calcSPO2Drop(Session *session)
|
||||
EventDataType lv=0;
|
||||
int li=0;
|
||||
|
||||
const int ringsize=10;
|
||||
EventDataType ring[ringsize];
|
||||
int rp=0;
|
||||
|
||||
for (int e=0;e<it.value().size();e++) {
|
||||
EventList & el=*(it.value()[e]);
|
||||
|
||||
for (unsigned i=0;i<el.count();i++) {
|
||||
val=el.data(i);
|
||||
if (!val) continue;
|
||||
ring[rp]=val;
|
||||
rp=++rp % ringsize;
|
||||
if (i<ringsize) {
|
||||
for (int j=i;j<ringsize;j++) {
|
||||
ring[j]=val;
|
||||
}
|
||||
}
|
||||
tmp=0;
|
||||
for (int j=0;j<ringsize;j++) {
|
||||
tmp+=ring[j];
|
||||
}
|
||||
tmp/=EventDataType(ringsize);
|
||||
|
||||
val=tmp;
|
||||
time=el.time(i);
|
||||
lastt=0;
|
||||
lv=val-change;
|
||||
lv=val;
|
||||
|
||||
|
||||
for (unsigned j=i+1;j<el.count();j++) { // scan ahead in the window
|
||||
time2=el.time(j);
|
||||
if (time2 > time+window) break;
|
||||
|
||||
val2=el.data(j);
|
||||
|
||||
if (val2<=lv) {
|
||||
lv=val2;
|
||||
if (val2 <= (val-change)) {
|
||||
lastt=time2;
|
||||
li=j;
|
||||
//tmp=val-val2;
|
||||
//if (tmp > change) {
|
||||
// pc->AddEvent(time2,tmp);
|
||||
//break;
|
||||
//}
|
||||
}
|
||||
//lv=val2;
|
||||
} else if (val2 <= lv) {
|
||||
lv=val2;
|
||||
//lastt=time2;
|
||||
//li=j;
|
||||
} else break;
|
||||
}
|
||||
if (lastt>0) {
|
||||
qint64 len=(lastt-time)/1000.0;
|
||||
pc->AddEvent(lastt,len);
|
||||
qint64 len=(lastt-time);
|
||||
if (len>=window) {
|
||||
pc->AddEvent(lastt,len/1000);
|
||||
|
||||
i=li;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pc->count()==0) {
|
||||
delete pc;
|
||||
return 0;
|
||||
|
@ -204,8 +204,12 @@ Daily::Daily(QWidget *parent,gGraphView * shared, MainWindow *mw)
|
||||
TgMV->AddLayer(AddCPAP(new gLineChart(CPAP_TgMV,Qt::darkCyan,square)));
|
||||
INTPULSE->AddLayer(AddCPAP(new gLineChart(OXI_Pulse,Qt::red,square)));
|
||||
INTSPO2->AddLayer(AddCPAP(new gLineChart(OXI_SPO2,Qt::blue,square)));
|
||||
|
||||
PULSE->AddLayer(AddOXI(new gLineOverlayBar(OXI_PulseChange,QColor("light gray"),"PD",FT_Span)));
|
||||
SPO2->AddLayer(AddOXI(new gLineOverlayBar(OXI_SPO2Drop,QColor("light blue"),"O2",FT_Span)));
|
||||
|
||||
PULSE->AddLayer(AddOXI(new gLineChart(OXI_Pulse,Qt::red,square)));
|
||||
SPO2->AddLayer(AddOXI(new gLineChart(OXI_SPO2,Qt::blue,square)));
|
||||
SPO2->AddLayer(AddOXI(new gLineChart(OXI_SPO2,Qt::blue,true)));
|
||||
PLETHY->AddLayer(AddOXI(new gLineChart(OXI_Plethy,Qt::darkBlue,false)));
|
||||
|
||||
PTB->setForceMaxY(100);
|
||||
|
@ -253,7 +253,7 @@ void MainWindow::on_action_Import_Data_triggered()
|
||||
if (asknew) {
|
||||
QFileDialog w;
|
||||
w.setFileMode(QFileDialog::DirectoryOnly);
|
||||
w.setOption(QFileDialog::DontUseNativeDialog,false);
|
||||
w.setOption(QFileDialog::DontUseNativeDialog,true);
|
||||
|
||||
QListView *l = w.findChild<QListView*>("listView");
|
||||
if (l) {
|
||||
|
@ -960,6 +960,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
@ -983,6 +986,9 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="decimals">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
|
Loading…
Reference in New Issue
Block a user