mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Change grap top row and tooltip label equals to colons
This commit is contained in:
parent
6ae848436f
commit
5dd44a4f32
@ -287,9 +287,8 @@ void gLineOverlaySummary::paint(QPainter &painter, gGraph &w, const QRegion ®
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
QString a = QObject::tr("Events") + "=" + QString::number(cnt) + " " + QObject::tr("Duration") +
|
QString a = QObject::tr("Events") + ": " + QString::number(cnt) + ", " +
|
||||||
" " + QString().sprintf("%02i:%02i:%02i", h, m, s) + ", " + m_text + "=" + QString::number(val,
|
QObject::tr("Duration") + " " + QString().sprintf("%02i:%02i:%02i", h, m, s) + ", " + m_text + ": " + QString::number(val, 'f', 2);
|
||||||
'f', 2);
|
|
||||||
|
|
||||||
if (isSpan) {
|
if (isSpan) {
|
||||||
float sph;
|
float sph;
|
||||||
@ -301,8 +300,8 @@ void gLineOverlaySummary::paint(QPainter &painter, gGraph &w, const QRegion ®
|
|||||||
if (sph > 100) { sph = 100; }
|
if (sph > 100) { sph = 100; }
|
||||||
}
|
}
|
||||||
|
|
||||||
a += " " + QObject::tr("(% %1 in events)").arg(sph, 0, 'f',
|
// eg: %num of time in a span, like Periodic Breathing
|
||||||
2); // eg: %num of time in a span, like Periodic Breathing
|
a += " " + QObject::tr("(% %1 in events)").arg(sph, 0, 'f', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
w.renderText(a, left + m_x, top + m_y);
|
w.renderText(a, left + m_x, top + m_y);
|
||||||
|
@ -720,15 +720,15 @@ void SummaryChart::paint(QPainter &painter, gGraph &w, const QRegion ®ion)
|
|||||||
|
|
||||||
if (lastdaygood) {
|
if (lastdaygood) {
|
||||||
if (lastY[j] != py2) { // vertical line
|
if (lastY[j] != py2) { // vertical line
|
||||||
painter.setPen(col2);
|
painter.setPen(QPen(col2,p_profile->appearance->lineThickness()));
|
||||||
painter.drawLine(lastX[j], lastY[j], px, py2);
|
painter.drawLine(lastX[j], lastY[j], px, py2);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.setPen(col1);
|
painter.setPen(QPen(col1,p_profile->appearance->lineThickness()));
|
||||||
painter.drawLine(px - 1, py2, px2 + 1, py2);
|
painter.drawLine(px, py2, px2, py2);
|
||||||
} else {
|
} else {
|
||||||
painter.setPen(col1);
|
painter.setPen(QPen(col1,p_profile->appearance->lineThickness()));
|
||||||
painter.drawLine(x1 - 1, py2, x2 + 1, py2);
|
painter.drawLine(x1, py2, x2, py2);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastX[j] = px2;
|
lastX[j] = px2;
|
||||||
@ -900,7 +900,7 @@ jumpnext:
|
|||||||
val = QString::number(f, 'f', 2);
|
val = QString::number(f, 'f', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
a += "=" + val;
|
a += ": " + val;
|
||||||
//GetTextExtent(a,x,y);
|
//GetTextExtent(a,x,y);
|
||||||
//float wt=20*w.printScaleX();
|
//float wt=20*w.printScaleX();
|
||||||
//px-=wt+x;
|
//px-=wt+x;
|
||||||
@ -928,7 +928,7 @@ jumpnext:
|
|||||||
|
|
||||||
if (m_type.size() > 1) {
|
if (m_type.size() > 1) {
|
||||||
float val = total_val / float(total_hours);
|
float val = total_val / float(total_hours);
|
||||||
a = m_label + "=" + QString::number(val, 'f', 2) + " ";
|
a = m_label + ": " + QString::number(val, 'f', 2) + " ";
|
||||||
GetTextExtent(a, x, y);
|
GetTextExtent(a, x, y);
|
||||||
legendx -= x;
|
legendx -= x;
|
||||||
w.renderText(a, legendx, py + 1);
|
w.renderText(a, legendx, py + 1);
|
||||||
@ -939,16 +939,16 @@ jumpnext:
|
|||||||
/*if (m_graphtype==GT_BAR) {
|
/*if (m_graphtype==GT_BAR) {
|
||||||
if (m_type.size()>1) {
|
if (m_type.size()>1) {
|
||||||
float val=total_val/float(total_days);
|
float val=total_val/float(total_days);
|
||||||
a+=m_label+"="+QString::number(val,'f',2)+" ";
|
a+=m_label+": "+QString::number(val,'f',2)+" ";
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
a += QString(QObject::tr("Days=%1")).arg(total_days, 0);
|
a += QString(QObject::tr("Days: %1")).arg(total_days, 0);
|
||||||
|
|
||||||
if (PROFILE.cpap->showComplianceInfo()) {
|
if (PROFILE.cpap->showComplianceInfo()) {
|
||||||
if (ishours && incompliant > 0) {
|
if (ishours && incompliant > 0) {
|
||||||
a += " "+QString(QObject::tr("Low Usage Days=%1")).arg(incompliant, 0)+
|
a += " "+QString(QObject::tr("Low Usage Days: %1")).arg(incompliant, 0)+
|
||||||
" "+QString(QObject::tr("(%%1 compliant, defined as > %2 hours)")).
|
" "+QString(QObject::tr("(%1% compliant, defined as > %2 hours)")).
|
||||||
arg((1.0 / daynum) * (total_days - incompliant) * 100.0, 0, 'f', 2).arg(compliance_hours, 0, 'f', 1);
|
arg((1.0 / daynum) * (total_days - incompliant) * 100.0, 0, 'f', 2).arg(compliance_hours, 0, 'f', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1058,10 +1058,10 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event, gGraph *graph)
|
|||||||
val = QString::number(d.value()[0], 'f', 2);
|
val = QString::number(d.value()[0], 'f', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
z += "\r\n" + m_label + "=" + val;
|
z += "\r\n" + m_label + ": " + val;
|
||||||
|
|
||||||
if (m_type[1] == ST_SESSIONS) {
|
if (m_type[1] == ST_SESSIONS) {
|
||||||
z += " "+QString(QObject::tr("(Sess=%1)")).arg(day->size(), 0);
|
z += " "+QString(QObject::tr("(Sess: %1)")).arg(day->size(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EventDataType v = m_times[zd][0];
|
EventDataType v = m_times[zd][0];
|
||||||
@ -1069,9 +1069,9 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event, gGraph *graph)
|
|||||||
|
|
||||||
if (lastt < 0) { lastt = 0; }
|
if (lastt < 0) { lastt = 0; }
|
||||||
|
|
||||||
z += "\r\n"+QString(QObject::tr("Bedtime=%1")).arg(formatTime(v, false, false, true));
|
z += "\r\n"+QString(QObject::tr("Bedtime: %1")).arg(formatTime(v, false, false, true));
|
||||||
v = m_times[zd][lastt] + m_values[zd][lastt];
|
v = m_times[zd][lastt] + m_values[zd][lastt];
|
||||||
z += "\r\n"+QString(QObject::tr("Waketime=%1")).arg(formatTime(v, false, false, true));
|
z += "\r\n"+QString(QObject::tr("Waketime: %1")).arg(formatTime(v, false, false, true));
|
||||||
|
|
||||||
} else if (m_graphtype == GT_BAR) {
|
} else if (m_graphtype == GT_BAR) {
|
||||||
if (m_type[0] == ST_HOURS) {
|
if (m_type[0] == ST_HOURS) {
|
||||||
@ -1084,7 +1084,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event, gGraph *graph)
|
|||||||
val = QString::number(d.value()[0], 'f', 2);
|
val = QString::number(d.value()[0], 'f', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
z += "\r\n" + m_label + "=" + val;
|
z += "\r\n" + m_label + ": " + val;
|
||||||
//z+="\r\nMode="+QString::number(day->settings_min("FlexSet"),'f',0);
|
//z+="\r\nMode="+QString::number(day->settings_min("FlexSet"),'f',0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1160,7 +1160,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event, gGraph *graph)
|
|||||||
|
|
||||||
if (m_type[i] == ST_SESSIONS) {
|
if (m_type[i] == ST_SESSIONS) {
|
||||||
val = QString::number(d.value()[i + 1], 'f', 0);
|
val = QString::number(d.value()[i + 1], 'f', 0);
|
||||||
z += "\r\n" + a + "=" + val;
|
z += "\r\n" + a + ": " + val;
|
||||||
} else {
|
} else {
|
||||||
//if (day && (day->channelExists(m_codes[i]) || day->settingExists(m_codes[i]))) {
|
//if (day && (day->channelExists(m_codes[i]) || day->settingExists(m_codes[i]))) {
|
||||||
schema::Channel &chan = schema::channel[m_codes[i]];
|
schema::Channel &chan = schema::channel[m_codes[i]];
|
||||||
@ -1176,7 +1176,7 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event, gGraph *graph)
|
|||||||
val = QString::number(v, 'f', 2);
|
val = QString::number(v, 'f', 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
z += "\r\n" + chan.label() + " " + a + "=" + val;
|
z += "\r\n" + chan.label() + " " + a + ": " + val;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user