Summary Popup Time fix test #1

This commit is contained in:
Mark Watkins 2011-09-13 15:18:39 +10:00
parent 7d6c50f6e6
commit 2a9ff00e33

View File

@ -377,7 +377,13 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event)
QHash<int,QHash<short,EventDataType> >::iterator d=m_values.find(hl_day);
x+=gYAxis::Margin+gGraphView::titleWidth; //graph->m_marginleft+
int y=event->y()+rtop-15;
QDateTime dt=QDateTime::fromTime_t(hl_day*86400);
QDateTime dt1=QDateTime::fromTime_t(hl_day*86400).toLocalTime();
QDateTime dt2=QDateTime::fromTime_t(hl_day*86400).toUTC();
QTime t1=dt1.time();
QTime t2=dt2.time();
QDate dt=dt2.date();
if (d!=m_values.end()) {
day=m_days[zd];
@ -398,11 +404,11 @@ bool SummaryChart::mouseMoveEvent(QMouseEvent *event)
val=QString::number(d.value()[1],'f',2);
}
QString z=dt.date().toString(Qt::SystemLocaleShortDate)+"\n"+m_label+"="+val;//+"\nAHI="+QString::number(day->cph(CPAP_AHI));
QString z=dt.toString(Qt::SystemLocaleShortDate)+"\n"+m_label+"="+val;//+"\nAHI="+QString::number(day->cph(CPAP_AHI));
graph->ToolTip(z,x,y,2200);
return true;
} else {
QString z=dt.date().toString(Qt::SystemLocaleShortDate)+"\nNo Data";
QString z=dt.toString(Qt::SystemLocaleShortDate)+"\nNo Data";
graph->ToolTip(z,x,y,2200);
}
}