projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bc10a9
)
util: Added support for more SI prefixes
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Tue, 30 Dec 2014 10:49:43 +0000
(10:49 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Tue, 30 Dec 2014 14:24:08 +0000
(14:24 +0000)
pv/util.cpp
patch
|
blob
|
history
diff --git
a/pv/util.cpp
b/pv/util.cpp
index 2a04aaec7d99e68fb7ef9295c6ec4e40f5476425..ff1b484899a19507c882079014dc917062c7ccf1 100644
(file)
--- a/
pv/util.cpp
+++ b/
pv/util.cpp
@@
-32,9
+32,10
@@
using namespace Qt;
namespace pv {
namespace util {
-static const QString SIPrefixes[9] =
- {"f", "p", "n", QChar(0x03BC), "m", "", "k", "M", "G"};
-const int FirstSIPrefixPower = -15;
+static const QString SIPrefixes[17] =
+ {"y", "z", "a", "f", "p", "n", QChar(0x03BC), "m", "", "k", "M", "G",
+ "T", "P", "E", "Z", "Y"};
+const int FirstSIPrefixPower = -24;
QString format_si_value(double v, QString unit, int prefix,
unsigned int precision, bool sign)