Changeset 2007 in ntrip for trunk/BNC/bncfigurelate.cpp
- Timestamp:
- Nov 22, 2009, 8:36:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncfigurelate.cpp
r2006 r2007 127 127 } 128 128 129 double maxLateRounded; 129 130 QString maxLateStr; 130 131 if(maxLate < 1e3) { 131 maxLateStr = QString("%1 ms ").arg(int(maxLate/200)*200); 132 maxLateRounded = int(maxLate/200)*200 + 300; 133 maxLateStr = QString("%1 ms ").arg(int(maxLateRounded/200)*200); 132 134 painter.drawText(0, int((yMax-yMin)*xLine)-5, xMin+60,15,Qt::AlignRight,tr("0 ms ")); 133 135 } 134 136 else if (maxLate < 6e4) { 135 maxLateStr = QString("%1 sec ").arg(int(maxLate / 1.e3)); 137 maxLateRounded = int(maxLate/1.e3)*1.e3 + 1500; 138 maxLateStr = QString("%1 sec ").arg(int(maxLateRounded/1.e3)); 136 139 painter.drawText(0, int((yMax-yMin)*xLine)-5, xMin+60,15,Qt::AlignRight,tr("0 sec ")); 137 140 } 138 141 else { 139 maxLateStr = QString("%1 min ").arg(int(maxLate / 6.e4)); 142 maxLateRounded = int(maxLate / 6.e4)*6.e4 + 90000; 143 maxLateStr = QString("%1 min ").arg(int(maxLateRounded/6.e4)); 140 144 painter.drawText(0, int((yMax-yMin)*xLine)-5, xMin+60,15,Qt::AlignRight,tr("0 min ")); 141 145 } 142 146 143 147 if(maxLate > 0.0) { 144 painter.drawText(0, yMin+2 5-5, xMin+60,15,Qt::AlignRight,maxLateStr);148 painter.drawText(0, yMin+20-5, xMin+60,15,Qt::AlignRight,maxLateStr); 145 149 } 146 150 … … 158 162 159 163 if(maxLate > 0.0) { 160 int yy = int(yLength * (it.value() / maxLate ));164 int yy = int(yLength * (it.value() / maxLateRounded)); 161 165 QColor color = QColor::fromHsv(180,200,120+_ran[2][anchor]); 162 166 painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy,
Note:
See TracChangeset
for help on using the changeset viewer.