- Timestamp:
- Nov 15, 2009, 1:37:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncfigure.cpp
r1959 r1960 141 141 QPainter painter(this); 142 142 143 QFont font; 144 font.setPointSize(int(font.QFont::pointSize()*0.7)); 145 painter.setFont(font); 146 143 147 // y-axis 144 148 // ------ … … 148 152 QString maxRateStr; 149 153 if (8.0 * _maxRate < 1e3) { 150 maxRateStr = QString(" %1 bps").arg(int(8.0 * _maxRate));151 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 bps"));154 maxRateStr = QString(" %1 bps").arg(int(8.0 * _maxRate)); 155 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 bps")); 152 156 } 153 157 else if (8.0 * _maxRate < 1e6) { 154 maxRateStr = QString(" %1 kbps").arg(int(8.0 * _maxRate / 1.e3));155 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 kbps"));158 maxRateStr = QString(" %1 kbps").arg(int(8.0 * _maxRate / 1.e3)); 159 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 kbps")); 156 160 } 157 161 else { 158 maxRateStr = QString( "%1 Mbps").arg(int(8.0 * _maxRate / 1.e6));159 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 Mbps"));162 maxRateStr = QString( "%1 Mbps").arg(int(8.0 * _maxRate / 1.e6)); 163 painter.drawText(xMin+0, int((yMax-yMin)*xLine), tr(" 0 Mbps")); 160 164 } 161 165
Note:
See TracChangeset
for help on using the changeset viewer.