Tinker in overview charts, darken Flow Limitation chart so maximum is visible on white

This commit is contained in:
Mark Watkins 2018-04-25 23:00:25 +10:00
parent b3c92aa9fe
commit 90d5cadc0c
4 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* gSessionTimesChart Implementation
/* gSessionTimesChart Implementation
*
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
*
@ -164,7 +164,7 @@ void gSummaryChart::preCalc()
for (int i=0; i<calcitems.size(); ++i) {
SummaryCalcItem & calc = calcitems[i];
calc.reset(idx_end - idx_start);
calc.reset(idx_end - idx_start, midcalc);
}
}
@ -403,7 +403,6 @@ void gSummaryChart::paint(QPainter &painter, gGraph &graph, const QRegion &regio
m_minx = graph.min_x;
m_maxx = graph.max_x;
QDateTime date2 = QDateTime::fromMSecsSinceEpoch(m_minx, Qt::UTC);
QDateTime enddate2 = QDateTime::fromMSecsSinceEpoch(m_maxx, Qt::UTC);
@ -604,7 +603,7 @@ void gSummaryChart::paint(QPainter &painter, gGraph &graph, const QRegion &regio
// painter.fillRect(rec, slice.brush);
outlines.append(rec);
} else {
painter.fillRect(rec, QBrush(brighten(color,1.25)));
painter.fillRect(rec, brighten(color, 1.25));
outlines.append(rec);
}
@ -683,7 +682,7 @@ void gUsageChart::preCalc()
incompdays = 0;
SummaryCalcItem & calc = calcitems[0];
calc.reset(idx_end - idx_start);
calc.reset(idx_end - idx_start, midcalc);
}
void gUsageChart::customCalc(Day *, QVector<SummaryChartSlice> &list)
@ -739,14 +738,14 @@ void gSessionTimesChart::preCalc() {
total_length = 0;
SummaryCalcItem & calc = calcitems[0];
calc.reset((idx_end - idx_start) * 6);
calc.reset((idx_end - idx_start) * 6, midcalc);
SummaryCalcItem & calc1 = calcitems[1];
calc1.reset(idx_end - idx_start);
calc1.reset(idx_end - idx_start, midcalc);
SummaryCalcItem & calc2 = calcitems[2];
calc2.reset(idx_end - idx_start);
calc2.reset(idx_end - idx_start, midcalc);
}
void gSessionTimesChart::customCalc(Day *, QVector<SummaryChartSlice> & slices) {

View File

@ -1,4 +1,4 @@
/* gSessionTimesChart Header
/* gSessionTimesChart Header
*
* Copyright (C) 2011-2018 Mark Watkins <mark@jedimark.net>
*
@ -91,8 +91,8 @@ struct SummaryCalcItem {
max = qMax(max, value);
}
void reset(int reserve) {
midcalc = p_profile->general->prefCalcMiddle();
void reset(int reserve, short mc) {
midcalc = mc;
wavg_sum = 0;
avg_sum = 0;

View File

@ -1,4 +1,4 @@
/* gSummaryChart Implementation
/* gSummaryChart Implementation
*
* Copyright (c) 2011-2018 Mark Watkins <mark@jedimark.net>
*
@ -571,6 +571,7 @@ void SummaryChart::paint(QPainter &painter, gGraph &w, const QRegion &region)
float lineThickness = AppSetting->lineThickness();
for (qint64 Q = minx; Q <= maxx + ms_per_day; Q += ms_per_day) {
zd = Q / ms_per_day;
d = m_values.find(zd);

View File

@ -403,7 +403,7 @@ void init()
schema::channel.add(GRP_CPAP, new Channel(CPAP_FLG = 0x1113, WAVEFORM, MT_CPAP, SESSION, "FLG",
QObject::tr("Flow Limitation"),
QObject::tr("Graph showing severity of flow limitations"), QObject::tr("Flow Limit."),
STR_UNIT_Severity, DEFAULT, QColor("dark gray")));
STR_UNIT_Severity, DEFAULT, QColor("#585858")));
schema::channel.add(GRP_CPAP, new Channel(CPAP_TgMV = 0x1114, WAVEFORM, MT_CPAP, SESSION,
"TgMV", QObject::tr("Target Minute Ventilation"),