From eb369ef8b0d8376b1b9e28c1ef9bb28c984f9a4b Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 8 Mar 2016 11:30:47 +1000 Subject: [PATCH] Try showing some events counts in TAP chart --- sleepyhead/Graphs/MinutesAtPressure.cpp | 60 ++++++++++++++++++++++++- sleepyhead/mainwindow.cpp | 1 + sleepyhead/preferencesdialog.ui | 8 ++-- 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/sleepyhead/Graphs/MinutesAtPressure.cpp b/sleepyhead/Graphs/MinutesAtPressure.cpp index 18cd1f5f..1aea9128 100644 --- a/sleepyhead/Graphs/MinutesAtPressure.cpp +++ b/sleepyhead/Graphs/MinutesAtPressure.cpp @@ -277,8 +277,64 @@ void MinutesAtPressure::paint(QPainter &painter, gGraph &graph, const QRegion &r xp+=xstep; lastyp = yp; + } + double estep = float(height) / ipap.peakevents; + + + if (ipap.peakevents>0) { + for (int k=0; k maxx) { break; } + } - if (lasttime < maxx) { + if ((lasttime < maxx) || (lastdata == data)) { d1 = qMax(lasttime, minx); d2 = qMin(maxx, EL->last()); diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 881d3bf4..0fe72616 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -477,6 +477,7 @@ void loadChannels() chan->setEnabled(enabled); chan->setDefaultColor(color); + // Don't import channel descriptions if event renaming is turned off. (helps pick up new translations) if (PREF[STR_PREF_AllowEventRenaming].toBool()) { chan->setFullname(fullname); chan->setLabel(label); diff --git a/sleepyhead/preferencesdialog.ui b/sleepyhead/preferencesdialog.ui index 5df0c2ed..3c4a43ef 100644 --- a/sleepyhead/preferencesdialog.ui +++ b/sleepyhead/preferencesdialog.ui @@ -9,7 +9,7 @@ 0 0 - 845 + 847 656 @@ -57,7 +57,7 @@ - 1 + 4 @@ -1736,7 +1736,7 @@ p, li { white-space: pre-wrap; } - + 0 @@ -1815,7 +1815,7 @@ p, li { white-space: pre-wrap; } - + 0