ClassicSpectrumModel Class Reference

A model for classic Spectra. More...

#include <spectrummodel.h>

Inheritance diagram for ClassicSpectrumModel:

Abstract1DSpectrumModel AbstractSpectrumModel QAbstractItemModel
Collaboration diagram for ClassicSpectrumModel:

Collaboration graph

List of all members.

Public Slots

void data (double)
 Adds data to the model.
void saveToFile (QString)
 Save the spectrum to a file.
void clearSpectrum ()
 Clear the whole spectrum.

Public Member Functions

 ClassicSpectrumModel (QObject *)
 ~ClassicSpectrumModel ()
QModelIndex index (int, int, const QModelIndex &) const
int rowCount (const QModelIndex &=QModelIndex()) const
QVariant data (const QModelIndex &, int=Qt::DisplayRole) const
QString supportedFilters () const
 return the supported filters
QVariant rowHeader (int) const

Private Slots

void redoChannels ()

Private Attributes

QReadWriteLock * _data_lock
QList< _Pair > _data

Detailed Description

A model for classic Spectra.

This class provides a model for classic spectra which have a min and max and a number of channels.

more docs

Constructor & Destructor Documentation

ClassicSpectrumModel::ClassicSpectrumModel ( QObject  ) 

ClassicSpectrumModel::~ClassicSpectrumModel (  ) 

Member Function Documentation

QModelIndex ClassicSpectrumModel::index ( int  ,
int  ,
const QModelIndex &   
) const

int ClassicSpectrumModel::rowCount ( const QModelIndex &  = QModelIndex()  )  const

QVariant ClassicSpectrumModel::data ( const QModelIndex &  ,
int  = Qt::DisplayRole 
) const

QString ClassicSpectrumModel::supportedFilters (  )  const [inline, virtual]

return the supported filters

Implement this to return the valid file-endings your model can save. Is used in the file selection dialog.

Implements AbstractSpectrumModel.

QVariant ClassicSpectrumModel::rowHeader ( int   )  const [virtual]

void ClassicSpectrumModel::data ( double   )  [virtual, slot]

Adds data to the model.

Implements Abstract1DSpectrumModel.

void ClassicSpectrumModel::saveToFile ( QString   )  [virtual, slot]

Save the spectrum to a file.

Implements AbstractSpectrumModel.

void ClassicSpectrumModel::clearSpectrum (  )  [inline, virtual, slot]

void ClassicSpectrumModel::redoChannels (  )  [private, slot]

Referenced by clearSpectrum().

Member Data Documentation

QReadWriteLock* ClassicSpectrumModel::_data_lock [private]

QList<_Pair> ClassicSpectrumModel::_data [private]

The documentation for this class was generated from the following file:

Generated on Tue Apr 12 02:10:11 2011 for epos by  doxygen 1.5.5