Add Large Leak overlay to Daily View leak graph

This commit is contained in:
Mark Watkins 2014-07-15 17:01:47 +10:00
parent d17779b68b
commit 462bd70b5e
5 changed files with 11 additions and 6 deletions

View File

@ -88,7 +88,7 @@ void SummaryChart::SetDay(Day * nullday)
addSlice(CPAP_EPAP, QColor("light green"), ST_PERC, perc); addSlice(CPAP_EPAP, QColor("light green"), ST_PERC, perc);
addSlice(CPAP_IPAP, QColor("light cyan"), mid, 0.5); addSlice(CPAP_IPAP, QColor("light cyan"), mid, 0.5);
addSlice(CPAP_IPAP, QColor("light blue"), ST_PERC, perc); addSlice(CPAP_IPAP, QColor("light blue"), ST_PERC, perc);
addSlice(CPAP_IPAP, QColor("blue"), ST_SETMAX); addSlice(CPAP_IPAPHi, QColor("blue"), ST_SETMAX);
} else if (cpapmode >= MODE_APAP) { } else if (cpapmode >= MODE_APAP) {
addSlice(CPAP_PressureMin, QColor("orange"), ST_SETMIN); addSlice(CPAP_PressureMin, QColor("orange"), ST_SETMIN);
addSlice(CPAP_Pressure, QColor("dark green"), mid, 0.5); addSlice(CPAP_Pressure, QColor("dark green"), mid, 0.5);

View File

@ -279,14 +279,14 @@ void ResmedLoader::ParseSTR(Machine *mach, QStringList strfiles)
int mod = EventDataType(sig->data[rec]) * sig->gain + sig->offset; int mod = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
CPAPMode mode; CPAPMode mode;
if (mod >= 7) { if (mod >= 7) { // mod 7 == vpap adapt
mode = MODE_ASV; mode = MODE_ASV; // mod 6 == vpap auto (Min EPAP, Max IPAP, PS)
} else if (mod >= 3) { } else if (mod >= 3) {// mod 3 == vpap s fixed pressure (EPAP, IPAP, No PS)
mode = MODE_BIPAP; mode = MODE_BIPAP;
} else if (mod >= 1) { } else if (mod >= 1) {
mode = MODE_APAP; mode = MODE_APAP; // mod 1 == apap
} else { } else {
mode = MODE_CPAP; mode = MODE_CPAP; // mod 0 == cpap
} }
R.mode = mode; R.mode = mode;

View File

@ -101,6 +101,8 @@ QDate Machine::pickDate(qint64 first)
bool Machine::AddSession(Session *s) bool Machine::AddSession(Session *s)
{ {
Q_ASSERT(s != nullptr); Q_ASSERT(s != nullptr);
Q_ASSERT(p_profile);
Q_ASSERT(p_profile->isOpen());
if (p_profile->session->ignoreOlderSessions()) { if (p_profile->session->ignoreOlderSessions()) {
qint64 ignorebefore = p_profile->session->ignoreOlderSessionsDate().toMSecsSinceEpoch(); qint64 ignorebefore = p_profile->session->ignoreOlderSessionsDate().toMSecsSinceEpoch();

View File

@ -306,6 +306,8 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
// this is class wide because the leak redline can be reset in preferences.. // this is class wide because the leak redline can be reset in preferences..
// Better way would be having a search for linechart layers in graphlist[...] // Better way would be having a search for linechart layers in graphlist[...]
gLineChart *leakchart=new gLineChart(CPAP_LeakTotal, COLOR_LeakTotal, square); gLineChart *leakchart=new gLineChart(CPAP_LeakTotal, COLOR_LeakTotal, square);
graphlist[schema::channel[CPAP_Leak].label()]->AddLayer(AddCPAP(new gLineOverlayBar(CPAP_LargeLeak, COLOR_LargeLeak, STR_TR_LL, FT_Span)));
leakchart->addPlot(CPAP_Leak, COLOR_Leak, square); leakchart->addPlot(CPAP_Leak, COLOR_Leak, square);
leakchart->addPlot(CPAP_MaxLeak, COLOR_MaxLeak, square); leakchart->addPlot(CPAP_MaxLeak, COLOR_MaxLeak, square);
schema::channel[CPAP_Leak].setUpperThresholdColor(Qt::red); schema::channel[CPAP_Leak].setUpperThresholdColor(Qt::red);

View File

@ -150,6 +150,7 @@ int main(int argc, char *argv[])
Q_UNUSED(intel_graphics) Q_UNUSED(intel_graphics)
QString betterbuild = "Settings/BetterBuild"; QString betterbuild = "Settings/BetterBuild";
QString fasterbuildavailable = QObject::tr("A faster build of SleepyHead may be available"); QString fasterbuildavailable = QObject::tr("A faster build of SleepyHead may be available");
QString notbotheragain = QObject::tr("You will not be bothered with this message again."); QString notbotheragain = QObject::tr("You will not be bothered with this message again.");
QString betterresults = QObject::tr("This version will run fine, but a \"<b>%1</b>\" tagged build of SleepyHead will likely run much smoother on your computer."); QString betterresults = QObject::tr("This version will run fine, but a \"<b>%1</b>\" tagged build of SleepyHead will likely run much smoother on your computer.");