diff layer/Colour3DPlotLayer.cpp @ 536:aca01b3af29f

* Add High Gain colour map
author Chris Cannam
date Fri, 22 May 2009 15:50:10 +0000
parents 78f9436195b1
children 0cc658fe1423
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Fri May 22 13:54:45 2009 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Fri May 22 15:50:10 2009 +0000
@@ -1561,9 +1561,10 @@
         .arg(m_maxy)
         .arg(m_invertVertical ? "true" : "false")
         .arg(m_opaque ? "true" : "false")
-        .arg(QString("binScale=\"%1\" smooth=\"%2\" ")
+        .arg(QString("binScale=\"%1\" smooth=\"%2\" gain=\"%3\" ")
              .arg((int)m_binScale)
-             .arg(m_smooth ? "true" : "false"));
+             .arg(m_smooth ? "true" : "false")
+             .arg(m_gain));
     
     Layer::toXml(stream, indent, extraAttributes + " " + s);
 }
@@ -1602,6 +1603,9 @@
         (attributes.value("smooth").trimmed() == "true");
     setSmooth(smooth);
 
+    float gain = attributes.value("gain").toFloat(&ok);
+    if (ok) setGain(gain);
+
     float min = attributes.value("minY").toFloat(&ok);
     float max = attributes.value("maxY").toFloat(&alsoOk);
     if (ok && alsoOk) setDisplayExtents(min, max);