More edge fixes in overview range selection

This commit is contained in:
Mark Watkins 2011-12-25 23:58:07 +10:00
parent f3421d875d
commit 49ad41866a
2 changed files with 7 additions and 7 deletions

View File

@ -220,7 +220,7 @@ void SummaryChart::SetDay(Day * nullday)
m_miny=0;
}
// m_minx=qint64(QDateTime(PROFILE.FirstDay(),QTime(0,0,0),Qt::UTC).toTime_t())*1000L;
m_maxx=qint64(QDateTime(PROFILE.LastDay().addDays(1),QTime(0,0,0),Qt::UTC).toTime_t())*1000L;
m_maxx=qint64(QDateTime(PROFILE.LastDay(),QTime(23,59,0),Qt::UTC).toTime_t())*1000L;
}
@ -477,7 +477,7 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
lastdaygood=true;
if (Q>maxx+extra) break;
} else {
if (Q<maxx+extra)
if (Q<maxx)
incompliant++;
lastdaygood=false;
}

View File

@ -356,16 +356,16 @@ void Overview::dateEnd_currentPageChanged(int year, int month)
void Overview::on_dateEnd_dateChanged(const QDate &date)
{
qint64 d1=qint64(QDateTime(ui->dateStart->date(),QTime(0,0,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(date,QTime(23,59,59),Qt::UTC).toTime_t())*1000L;
qint64 d1=qint64(QDateTime(ui->dateStart->date(),QTime(0,10,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(date,QTime(23,0,0),Qt::UTC).toTime_t())*1000L;
GraphView->SetXBounds(d1,d2);
}
void Overview::on_dateStart_dateChanged(const QDate &date)
{
qint64 d1=qint64(QDateTime(date,QTime(0,0,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,59,59),Qt::UTC).toTime_t())*1000L;
qint64 d1=qint64(QDateTime(date,QTime(0,10,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,0,0),Qt::UTC).toTime_t())*1000L;
GraphView->SetXBounds(d1,d2);
}
@ -373,7 +373,7 @@ void Overview::on_dateStart_dateChanged(const QDate &date)
void Overview::on_toolButton_clicked()
{
qint64 d1=qint64(QDateTime(ui->dateStart->date(),QTime(0,10,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,0,0),Qt::UTC).toTime_t())*1000L;
qint64 d2=qint64(QDateTime(ui->dateEnd->date(),QTime(23,00,0),Qt::UTC).toTime_t())*1000L;
GraphView->SetXBounds(d1,d2);
}