• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kalzium/libscience

  • sources
  • kde-4.14
  • kdeedu
  • kalzium
  • libscience
spectrum.h
Go to the documentation of this file.
1 #ifndef SPECTRUM_H
2 #define SPECTRUM_H
3 /***************************************************************************
4  * Copyright (C) 2005, 2006 by Carsten Niehaus *
5  * cniehaus@kde.org *
6  *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22  ***************************************************************************/
23 
24 #include "libkdeedu_science_export.h"
25 
26 #include <QtCore/QList>
27 
28 class Element;
29 
35 class SCIENCE_EXPORT Spectrum
36 {
37 public:
41  Spectrum();
42 
46  ~Spectrum();
47 
51  class SCIENCE_EXPORT peak
52  {
53  public:
54  peak() {
55  wavelength = -1.0;
56  intensity = -1;
57  }
58 
59  peak(double wl, int in ) {
60  wavelength = wl;
61  intensity = in;
62  }
63 
65  int intensity;
66  double wavelength;
67 
68  double wavelengthToUnit( const int unit );
69  };
70 
75  void addPeak( Spectrum::peak* b ) {
76  if ( b )
77  m_peaklist.append( b );
78  }
79 
89  Spectrum* adjustToWavelength( double min, double max );
90 
95  void adjustIntensities();
96 
103  QList<double> wavelengths( double min, double max );
104 
108  QList<Spectrum::peak*> peaklist() {
109  return m_peaklist;
110  }
111 
116  int parentElementNumber() const;
117 
121  double minPeak();
122  double minPeak( const int unit );
123 
127  double maxPeak();
128  double maxPeak( const int unit );
129 
130  void setParentElementNumber( int num )
131  {
132  m_parentElementNumber = num;
133  }
134 
135 private:
139  QList<peak*> m_peaklist;
140 
141  int m_parentElementNumber;
142 };
143 #endif // SPECTRUM_H
libkdeedu_science_export.h
Spectrum::addPeak
void addPeak(Spectrum::peak *b)
adds the peak b to the internal lists of peaks
Definition: spectrum.h:75
Spectrum::peaklist
QList< Spectrum::peak * > peaklist()
Definition: spectrum.h:108
Spectrum::peak::wavelength
double wavelength
Definition: spectrum.h:66
Spectrum::peak::peak
peak()
Definition: spectrum.h:54
Spectrum
Definition: spectrum.h:35
Spectrum::setParentElementNumber
void setParentElementNumber(int num)
Definition: spectrum.h:130
QList
Element
In this class all information about an element are stored.
Definition: element.h:41
Spectrum::peak
a peak is one line in the spectrum of an element
Definition: spectrum.h:51
Spectrum::peak::intensity
int intensity
relative. The highest is per definition 1000
Definition: spectrum.h:65
SCIENCE_EXPORT
#define SCIENCE_EXPORT
Definition: libkdeedu_science_export.h:32
Spectrum::peak::peak
peak(double wl, int in)
Definition: spectrum.h:59
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalzium/libscience

Skip menu "kalzium/libscience"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal