1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 13:47:01 -04:00

Spectrum: implemented linear scale mode

This commit is contained in:
f4exb
2018-07-06 01:34:05 +02:00
parent d5f153ff75
commit f6c596d55a
7 changed files with 95 additions and 37 deletions
+6 -1
View File
@@ -31,7 +31,11 @@ QString ScaleEngine::formatTick(double value, int decimalPlaces)
{
if (m_physicalUnit != Unit::TimeHMS)
{
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'f', decimalPlaces);
if (m_physicalUnit == Unit::Scientific) {
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'e', 2);
} else {
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'f', decimalPlaces);
}
}
else
{
@@ -106,6 +110,7 @@ void ScaleEngine::calcScaleFactor()
switch(m_physicalUnit) {
case Unit::None:
case Unit::Scientific:
m_unitStr.clear();
break;