#include <spectrummodel.h>
Public Slots | |
void | data (double) |
Adds data to the model. | |
void | saveToFile (QString) |
Save the data of the model into the named file. | |
void | clearSpectrum () |
Clear the whole spectrum. | |
Public Member Functions | |
SpectrumModel (QObject *) | |
virtual | ~SpectrumModel () |
int | rowCount (const QModelIndex &=QModelIndex()) const |
QVariant | data (const QModelIndex &, int=Qt::DisplayRole) const |
QModelIndex | index (int, int, const QModelIndex &) const |
QVariant | rowHeader (int) const |
bool | removeRows (int, int, const QModelIndex &=QModelIndex()) |
QString | supportedFilters () const |
return the supported filters | |
Private Slots | |
void | accuracyChanged () |
Private Attributes | |
QList< _Pair > | _data |
double | _accuracy |
SpectrumModel::SpectrumModel | ( | QObject * | ) |
virtual SpectrumModel::~SpectrumModel | ( | ) | [virtual] |
int SpectrumModel::rowCount | ( | const QModelIndex & | = QModelIndex() |
) | const |
Referenced by clearSpectrum().
QVariant SpectrumModel::data | ( | const QModelIndex & | , | |
int | = Qt::DisplayRole | |||
) | const |
QModelIndex SpectrumModel::index | ( | int | , | |
int | , | |||
const QModelIndex & | ||||
) | const |
QVariant SpectrumModel::rowHeader | ( | int | ) | const [virtual] |
Implements Abstract1DSpectrumModel.
bool SpectrumModel::removeRows | ( | int | , | |
int | , | |||
const QModelIndex & | = QModelIndex() | |||
) |
Referenced by clearSpectrum().
QString SpectrumModel::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.
void SpectrumModel::data | ( | double | ) | [virtual, slot] |
void SpectrumModel::saveToFile | ( | QString | ) | [virtual, slot] |
void SpectrumModel::clearSpectrum | ( | ) | [inline, virtual, slot] |
Clear the whole spectrum.
Implements AbstractSpectrumModel.
References removeRows(), and rowCount().
void SpectrumModel::accuracyChanged | ( | ) | [private, slot] |
QList<_Pair> SpectrumModel::_data [private] |
double SpectrumModel::_accuracy [private] |