kalzium
SpectrumWidget Class Reference
#include <spectrumwidget.h>

Detailed Description
Definition at line 31 of file spectrumwidget.h.
Public Types | |
| enum | SpectrumType { EmissionSpectrum = 0, AbsorptionSpectrum } |
Public Slots | |
| void | setLeftBorder (int value) |
| void | setRightBorder (int value) |
| void | slotActivateSpectrum (int spectrumtype) |
Signals | |
| void | bordersChanged (int, int) |
| void | peakSelected (Spectrum::peak *peak) |
Public Member Functions | |
| int | Adjust (double color, double factor) |
| void | findPeakFromMouseposition (double wavelength) |
| QColor | linecolor (double spectrum) |
| void | setBorders (double left, double right) |
| void | setSpectrum (Spectrum *spec) |
| void | setType (SpectrumType t) |
| Spectrum * | spectrum () const |
| SpectrumType | spectrumType () const |
| SpectrumWidget (QWidget *parent) | |
| double | Wavelength (double xpos) |
| void | wavelengthToRGB (double wavelength, int &r, int &g, int &b) |
| int | xPos (double wavelength) |
| ~SpectrumWidget () | |
Public Attributes | |
| double | Gamma |
| int | IntensityMax |
Protected Member Functions | |
| virtual void | keyPressEvent (QKeyEvent *e) |
| virtual void | mouseMoveEvent (QMouseEvent *e) |
| virtual void | mousePressEvent (QMouseEvent *e) |
| virtual void | mouseReleaseEvent (QMouseEvent *e) |
| virtual void | paintEvent (QPaintEvent *e) |
Member Enumeration Documentation
Constructor & Destructor Documentation
| SpectrumWidget::SpectrumWidget | ( | QWidget * | parent | ) |
Definition at line 42 of file spectrumwidget.cpp.
| SpectrumWidget::~SpectrumWidget | ( | ) | [inline] |
Definition at line 38 of file spectrumwidget.h.
Member Function Documentation
| int SpectrumWidget::Adjust | ( | double | color, | |
| double | factor | |||
| ) |
- Returns:
- the adjusted value of the
color.
The correction depends on factor which has been figured out emperically
Definition at line 215 of file spectrumwidget.cpp.
| void SpectrumWidget::bordersChanged | ( | int | , | |
| int | ||||
| ) | [signal] |
the minimum and maximum displayed wavelength have changed so emit the new minimum and maximum
| void SpectrumWidget::findPeakFromMouseposition | ( | double | wavelength | ) |
based on the current position of the mouse-cursor the nearest peak is searched.
If found, it will be emitted.
- See also:
- peakSelected
Definition at line 333 of file spectrumwidget.cpp.
| void SpectrumWidget::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
| QColor SpectrumWidget::linecolor | ( | double | spectrum | ) |
- Returns:
- the color of a line
- Parameters:
-
spectrum the value of the spectrum
Definition at line 143 of file spectrumwidget.cpp.
| void SpectrumWidget::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
| void SpectrumWidget::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
| void SpectrumWidget::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
| void SpectrumWidget::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
| void SpectrumWidget::peakSelected | ( | Spectrum::peak * | peak | ) | [signal] |
the user selected a peak
| void SpectrumWidget::setBorders | ( | double | left, | |
| double | right | |||
| ) |
This limits the width of the spectrum in terms of wavelength.
For example you can set it to only show the area between 500 and 550 nm
- Parameters:
-
left the left border right the right border
Definition at line 290 of file spectrumwidget.cpp.
| void SpectrumWidget::setLeftBorder | ( | int | value | ) | [inline, slot] |
| void SpectrumWidget::setRightBorder | ( | int | value | ) | [inline, slot] |
| void SpectrumWidget::setSpectrum | ( | Spectrum * | spec | ) | [inline] |
Definition at line 40 of file spectrumwidget.h.
| void SpectrumWidget::setType | ( | SpectrumType | t | ) | [inline] |
sets the type of the spectrum to t
- Parameters:
-
t the type of the spectrum
Definition at line 72 of file spectrumwidget.h.
| void SpectrumWidget::slotActivateSpectrum | ( | int | spectrumtype | ) | [inline, slot] |
| Spectrum* SpectrumWidget::spectrum | ( | ) | const [inline] |
Definition at line 45 of file spectrumwidget.h.
| SpectrumType SpectrumWidget::spectrumType | ( | ) | const [inline] |
| double SpectrumWidget::Wavelength | ( | double | xpos | ) | [inline] |
- Parameters:
-
xpos The ratio of the position relative to the width of the widget.
- Returns:
- the wavelength on position
xpos
Definition at line 123 of file spectrumwidget.h.
| void SpectrumWidget::wavelengthToRGB | ( | double | wavelength, | |
| int & | r, | |||
| int & | g, | |||
| int & | b | |||
| ) |
This method changes the three values r, g and b to the correct values.
- Parameters:
-
wavelength the wavelength for which the color is searched r red g green b blue
Definition at line 153 of file spectrumwidget.cpp.
| int SpectrumWidget::xPos | ( | double | wavelength | ) | [inline] |
- Returns:
- the postion in the widget of a band with the wavelength
wavelength
- Parameters:
-
wavelength the wavelength for which the position is needed
Definition at line 106 of file spectrumwidget.h.
Member Data Documentation
| double SpectrumWidget::Gamma |
Definition at line 90 of file spectrumwidget.h.
Definition at line 91 of file spectrumwidget.h.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference