From b5ea2f02cc5831020f728d117e42790d85012973 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Thu, 3 Jul 2014 00:32:01 +1000 Subject: [PATCH] Display a warning when machine settings data is missing --- sleepyhead/daily.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sleepyhead/daily.cpp b/sleepyhead/daily.cpp index 22c1054a..87643dd6 100644 --- a/sleepyhead/daily.cpp +++ b/sleepyhead/daily.cpp @@ -952,6 +952,12 @@ QString Daily::getMachineSettings(Day * cpap) { html=""; html+=QString("").arg(tr("Machine Settings")); html+=""; + + if ((cpap && cpap->settingExists(CPAP_BrokenSummary))) { + html+="
%1
 
"+tr("Machine Settings Unavailable")+"

\n"; + return html; + } + if (cpap->settingExists(CPAP_PresReliefType)) { int i=cpap->settings_max(CPAP_PresReliefType); int j=cpap->settings_max(CPAP_PresReliefMode); @@ -1081,6 +1087,11 @@ QString Daily::getCPAPInformation(Day * cpap) } } html+="\n"; + if ((cpap && cpap->settingExists(CPAP_BrokenSummary))) { + html+=" \n"; + html+=QString("%1").arg(""+STR_MessageBox_PleaseNote+": "+ tr("This day has missing pressure, mode and settings data.")); + } + html+="\n"; html+="
\n"; return html; @@ -1192,6 +1203,7 @@ QString Daily::getStatisticsInfo(Day * cpap,Day * oxi,Day *pos) ccnt++; } } + if (GraphView->isEmpty() && ((ccnt>0) || (cpap && cpap->summaryOnly()))) { html+=" \n"; html+=QString("%1").arg(""+STR_MessageBox_PleaseNote+" "+ tr("This day just contains summary data, only limited information is available ."));