mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Added TTIA, fixed Alt-B bookmark bugs
This commit is contained in:
parent
86c5c3f569
commit
6b53b21730
@ -1682,7 +1682,7 @@ void gGraphView::mouseReleaseEvent(QMouseEvent *event)
|
||||
if (m_metaselect) {
|
||||
m_point_released = event->pos();
|
||||
} else {
|
||||
if (m_graphs[m_graph_index]) {
|
||||
if ((m_graph_index >= 0) && (m_graphs[m_graph_index])) {
|
||||
m_graphs[m_graph_index]->mouseReleaseEvent(event);
|
||||
}
|
||||
}
|
||||
@ -1937,8 +1937,8 @@ void gGraphView::getSelectionTimes(qint64 & start, qint64 & end)
|
||||
end = 0;
|
||||
return;
|
||||
}
|
||||
int x1 = qMin(m_point_clicked.x(), m_point_released.x());
|
||||
int x2 = qMax(m_point_clicked.x(), m_point_released.x());
|
||||
int x1 = g->m_selection.x() + titleWidth;
|
||||
int x2 = x1 + g->m_selection.width();
|
||||
start = g->screenToTime(x1);
|
||||
end = g->screenToTime(x2);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ bool SearchApnea(Session *session, qint64 time, double dur)
|
||||
if (SearchEvent(session, CPAP_ClearAirway, time, dur))
|
||||
return true;
|
||||
|
||||
if (SearchEvent(session, CPAP_Hypopnea, time, dur, false))
|
||||
if (SearchEvent(session, CPAP_Hypopnea, time, dur))
|
||||
return true;
|
||||
|
||||
if (SearchEvent(session, CPAP_UserFlag1, time, dur, false))
|
||||
|
@ -1239,15 +1239,27 @@ QString Daily::getStatisticsInfo(Day * cpap,Day * oxi,Day *pos)
|
||||
if (GraphView->isEmpty() && ((ccnt>0) || (cpap && cpap->summaryOnly()))) {
|
||||
html+="<tr><td colspan=5> </td></tr>\n";
|
||||
html+=QString("<tr><td colspan=5 align=center><i>%1</i></td></tr>").arg("<b>"+STR_MessageBox_PleaseNote+"</b> "+ tr("This day just contains summary data, only limited information is available ."));
|
||||
} else if (cpap && p_profile->cpap->showLeakRedline()) {
|
||||
} else if (cpap) {
|
||||
html+="<tr><td colspan=5> </td></tr>";
|
||||
|
||||
if ((cpap->machine->loaderName() == STR_MACH_ResMed) || ((cpap->machine->loaderName() == STR_MACH_PRS1) && (p_profile->cpap->resyncFromUserFlagging()))) {
|
||||
int ttia = cpap->sum(CPAP_Obstructive) + cpap->sum(CPAP_ClearAirway) + cpap->sum(CPAP_Apnea) + cpap->sum(CPAP_Hypopnea);
|
||||
int h = ttia / 3600;
|
||||
int m = ttia / 60 % 60;
|
||||
int s = ttia % 60;
|
||||
if (ttia > 0) {
|
||||
html+="<tr><td colspan=3 align='left' bgcolor='white'><b>"+tr("Total time in apnea")+
|
||||
QString("</b></td><td colspan=2 bgcolor='white'>%1</td></tr>").arg(QString().sprintf("%02i:%02i:%02i",h,m,s));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (p_profile->cpap->showLeakRedline()) {
|
||||
float rlt = cpap->timeAboveThreshold(CPAP_Leak, p_profile->cpap->leakRedline()) / 60.0;
|
||||
float pc = 100.0 / cpap->hours() * rlt;
|
||||
html+="<tr><td colspan=5> </td></tr>";
|
||||
html+="<tr><td colspan=3 align='left' bgcolor='white'><b>"+tr("Time over leak redline")+
|
||||
QString("</b></td><td colspan=2 bgcolor='white'>%1%</td></tr>").arg(pc, 0, 'f', 3);
|
||||
}
|
||||
|
||||
if (cpap) {
|
||||
int l = cpap->sum(CPAP_Ramp);
|
||||
|
||||
if (l > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user