#include <spectrummodel.h>
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 |
This class provides a model for classic spectra which have a min and max and a number of channels.
ClassicSpectrumModel::ClassicSpectrumModel | ( | QObject * | ) |
ClassicSpectrumModel::~ClassicSpectrumModel | ( | ) |
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] |
Implements Abstract1DSpectrumModel.
void ClassicSpectrumModel::data | ( | double | ) | [virtual, slot] |
void ClassicSpectrumModel::saveToFile | ( | QString | ) | [virtual, slot] |
void ClassicSpectrumModel::clearSpectrum | ( | ) | [inline, virtual, slot] |
Clear the whole spectrum.
Implements AbstractSpectrumModel.
References AbstractSpectrumModel::_goodpulses, AbstractSpectrumModel::_mtime, and redoChannels().
void ClassicSpectrumModel::redoChannels | ( | ) | [private, slot] |
Referenced by clearSpectrum().
QReadWriteLock* ClassicSpectrumModel::_data_lock [private] |
QList<_Pair> ClassicSpectrumModel::_data [private] |