diff layer/SpectrumLayer.cpp @ 220:8dc50f57d480

* Make the vertical scale a bit less thtoopid for many linear scale spectra * Don't forget to reload slice layer properties when loading a session, as well as spectrum layer (i.e. subclass) properties
author Chris Cannam
date Mon, 05 Mar 2007 13:04:52 +0000
parents 34bbbcb3c01f
children 28c8e8e3c537
line wrap: on
line diff
--- a/layer/SpectrumLayer.cpp	Mon Mar 05 13:01:14 2007 +0000
+++ b/layer/SpectrumLayer.cpp	Mon Mar 05 13:04:52 2007 +0000
@@ -241,31 +241,6 @@
     }
 }
 
-QString
-SpectrumLayer::toXmlString(QString indent, QString extraAttributes) const
-{
-    QString s;
-    
-    s += QString("windowSize=\"%1\" "
-		 "windowHopLevel=\"%2\"")
-        .arg(m_windowSize)
-        .arg(m_windowHopLevel);
-
-    return SliceLayer::toXmlString(indent, extraAttributes + " " + s);
-}
-
-void
-SpectrumLayer::setProperties(const QXmlAttributes &attributes)
-{
-    bool ok = false;
-
-    size_t windowSize = attributes.value("windowSize").toUInt(&ok);
-    if (ok) setWindowSize(windowSize);
-
-    size_t windowHopLevel = attributes.value("windowHopLevel").toUInt(&ok);
-    if (ok) setWindowHopLevel(windowHopLevel);
-}
-
 bool
 SpectrumLayer::getValueExtents(float &min, float &max, bool &logarithmic,
                                QString &units) const
@@ -363,4 +338,31 @@
 }
 
 
+QString
+SpectrumLayer::toXmlString(QString indent, QString extraAttributes) const
+{
+    QString s;
     
+    s += QString("windowSize=\"%1\" "
+		 "windowHopLevel=\"%2\"")
+        .arg(m_windowSize)
+        .arg(m_windowHopLevel);
+
+    return SliceLayer::toXmlString(indent, extraAttributes + " " + s);
+}
+
+void
+SpectrumLayer::setProperties(const QXmlAttributes &attributes)
+{
+    SliceLayer::setProperties(attributes);
+
+    bool ok = false;
+
+    size_t windowSize = attributes.value("windowSize").toUInt(&ok);
+    if (ok) setWindowSize(windowSize);
+
+    size_t windowHopLevel = attributes.value("windowHopLevel").toUInt(&ok);
+    if (ok) setWindowHopLevel(windowHopLevel);
+}
+
+