Xticker stuff, selection area status bar fix

This commit is contained in:
Mark Watkins 2011-09-13 15:05:39 +10:00
parent 4560a32920
commit 7d6c50f6e6
2 changed files with 4 additions and 4 deletions

View File

@ -778,14 +778,14 @@ void gGraph::mouseMoveEvent(QMouseEvent * event)
xmult=(rmax_x-rmin_x)/w2; xmult=(rmax_x-rmin_x)/w2;
} else xmult=(max_x-min_x)/w2; } else xmult=(max_x-min_x)/w2;
qint64 a=double(a2-a1)*xmult; qint64 a=double(a2-a1)*xmult;
int d=a/86400000L; float d=double(a)/86400000.0;
int h=a/3600000; int h=a/3600000;
int m=(a/60000) % 60; int m=(a/60000) % 60;
int s=(a/1000) % 60; int s=(a/1000) % 60;
int ms(a % 1000); int ms(a % 1000);
QString str; QString str;
if (d>1) { if (d>1) {
str.sprintf("%i days",d); str.sprintf("%1.0f days",d);
} else { } else {
str.sprintf("%02i:%02i:%02i:%03i",h,m,s,ms); str.sprintf("%02i:%02i:%02i:%03i",h,m,s,ms);
@ -1452,7 +1452,7 @@ void gGraphView::ResetBounds(bool refresh) //short group)
QString str; QString str;
if (d>1) { if (d>1) {
str.sprintf("%1.0f days",ceil(xx/86400000.0)); str.sprintf("%1.0f days",ceil(double(xx)/86400000.0));
} else { } else {
str.sprintf("%02i:%02i:%02i:%03i",h,m,s,ms); str.sprintf("%02i:%02i:%02i:%03i",h,m,s,ms);
} }

View File

@ -67,7 +67,7 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height)
int divmax,dividx; int divmax,dividx;
int fitmode; int fitmode;
if (xx>=86400000L) { // Day if (xx>=86400000L) { // Day
fd="MMM 00"; fd="Mjj 00";
dividx=0; dividx=0;
divmax=10; divmax=10;
fitmode=0; fitmode=0;