mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
small fixes in number display
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8c1bf3cf8d
commit
01fdb95c30
@ -80,7 +80,7 @@ QString RSGraphSource::displayName(int i) const
|
|||||||
|
|
||||||
QString RSGraphSource::displayValue(float v) const
|
QString RSGraphSource::displayValue(float v) const
|
||||||
{
|
{
|
||||||
return QString::number(v,'g',2) + " " + unitName() ;
|
return QString::number(v,'f',2) + " " + unitName() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSGraphSource::getCurrentValues(std::vector<float>& vals) const
|
void RSGraphSource::getCurrentValues(std::vector<float>& vals) const
|
||||||
|
@ -21,11 +21,11 @@ class TurtleGraphSource: public RSGraphSource
|
|||||||
virtual QString displayValue(float v) const
|
virtual QString displayValue(float v) const
|
||||||
{
|
{
|
||||||
if(v < 1000)
|
if(v < 1000)
|
||||||
return QString::number(v,'g',2) + " B/s" ;
|
return QString::number(v,'f',2) + " B/s" ;
|
||||||
else if(v < 1000*1024)
|
else if(v < 1000*1024)
|
||||||
return QString::number(v/1024.0,'g',2) + " KB/s" ;
|
return QString::number(v/1024.0,'f',2) + " KB/s" ;
|
||||||
else
|
else
|
||||||
return QString::number(v/(1024.0*1024),'g',2) + " MB/s" ;
|
return QString::number(v/(1024.0*1024),'f',2) + " MB/s" ;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user