From da9bc5fde5d9994edbd5e1b1179bcbe39a5b2c0d Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 8 Mar 2016 11:42:16 +1000 Subject: [PATCH] Use pressure channel colors, and line thickness settings in TAP chart --- sleepyhead/Graphs/MinutesAtPressure.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sleepyhead/Graphs/MinutesAtPressure.cpp b/sleepyhead/Graphs/MinutesAtPressure.cpp index 1aea9128..a6fc7d74 100644 --- a/sleepyhead/Graphs/MinutesAtPressure.cpp +++ b/sleepyhead/Graphs/MinutesAtPressure.cpp @@ -238,9 +238,11 @@ void MinutesAtPressure::paint(QPainter &painter, gGraph &graph, const QRegion &r graph.renderText(label, left, top+5 ); xstep /= 5.0; - painter.setPen(Qt::red); + schema::Channel & ichan = schema::channel[ipap.code]; + painter.setPen(QPen(ichan.defaultColor(), p_profile->appearance->lineThickness())); xp=left; + float lastyp = bottom - (float(ipap.times[min-1]) * ystep); for (int i=min; iappearance->lineThickness())); + xp = left; lastyp = bottom - (float(ipap.events[ch][min-1]) * estep); @@ -336,6 +340,9 @@ void MinutesAtPressure::paint(QPainter &painter, gGraph &graph, const QRegion &r if (epap.min_pressure) { + schema::Channel & echan = schema::channel[epap.code]; + painter.setPen(QPen(echan.defaultColor(), p_profile->appearance->lineThickness())); + xp=left, lastyp = bottom - (float(epap.times[min]) * ystep); painter.setPen(Qt::blue);