]> Git trees. - libqmvoc.git/commitdiff
element name in png
authorMartin Pfeiffer <hubipete@gmx.net>
Thu, 21 Jul 2005 15:34:32 +0000 (15:34 +0000)
committerMartin Pfeiffer <hubipete@gmx.net>
Thu, 21 Jul 2005 15:34:32 +0000 (15:34 +0000)
svn path=/trunk/KDE/kdeedu/kalzium/src/spectrum.h; revision=437347

kalzium/src/spectrum.cpp
kalzium/src/spectrum.h

index 5f5c3a38a2f9845326618221b8d34abbea38e048..cbc97822469dcad40452eefe26d7ba76848aa3c1 100644 (file)
@@ -63,7 +63,7 @@ double Spectrum::maxBand()
 
 Spectrum* Spectrum::adjustToWavelength( double min, double max )
 {
-       Spectrum *spec = new Spectrum();
+       Spectrum *spec = new Spectrum( m_parentElement );
 
        QValueList<band>::const_iterator it = m_bandlist.begin();
        const QValueList<band>::const_iterator itEnd = m_bandlist.end();
index 5902bb8cd176486e2960029e4ac5bea4f21f949c..123bfcac76cfaf122d49a657b3c98df88997c039 100644 (file)
@@ -48,7 +48,8 @@ class Spectrum
                /**
                 * public ctor
                 */
-               Spectrum(){
+               Spectrum( Element* parent ){
+                       m_parentElement = parent;
                };
                
                /**
@@ -150,6 +151,12 @@ class Spectrum
                 */
                QString BandsAsHtml();
 
+               /**
+                * @return the parent element of this spectrum
+                */
+               Element* parentElement()
+               { return m_parentElement; }
+
        private:
                /**
                 * @return the smallest wavelength
@@ -170,6 +177,8 @@ class Spectrum
                 * the cached values of the highest and lowest wavelength
                 */
                double m_max, m_min;
+
+               Element* m_parentElement;
 };
 
 /**