#include <spectrummodel.h>
Public Slots | |
void | data (double, double) |
Adds data to the model. | |
void | saveToFile (QString) |
Save the spectrum to a file. | |
void | clearSpectrum () |
Clear the whole spectrum. | |
Public Member Functions | |
TwoDimSpectrumModel (QObject *) | |
QModelIndex | index (int, int, const QModelIndex &) const |
int | columnCount (const QModelIndex &=QModelIndex()) const |
int | rowCount (const QModelIndex &=QModelIndex()) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QVariant | data (const QModelIndex &, int=Qt::DisplayRole) const |
QString | supportedFilters () const |
return the supported filters | |
int | dimensions () const |
Private Types | |
typedef std::map< int, std::map< int, int > > | data_t |
Private Slots | |
void | updateCache () |
Private Attributes | |
data_t | _data |
struct { | |
int rows | |
int cols | |
double xmin | |
double xmax | |
double xstep | |
double ymin | |
double ymax | |
double ystep | |
} | _cache |
typedef std::map< int, std::map<int, int> > TwoDimSpectrumModel::data_t [private] |
TwoDimSpectrumModel::TwoDimSpectrumModel | ( | QObject * | ) |
QModelIndex TwoDimSpectrumModel::index | ( | int | , | |
int | , | |||
const QModelIndex & | ||||
) | const |
int TwoDimSpectrumModel::columnCount | ( | const QModelIndex & | = QModelIndex() |
) | const |
int TwoDimSpectrumModel::rowCount | ( | const QModelIndex & | = QModelIndex() |
) | const |
QVariant TwoDimSpectrumModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const |
QVariant TwoDimSpectrumModel::data | ( | const QModelIndex & | , | |
int | = Qt::DisplayRole | |||
) | const |
QString TwoDimSpectrumModel::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.
int TwoDimSpectrumModel::dimensions | ( | ) | const [inline, virtual] |
Reimplemented from AbstractSpectrumModel.
void TwoDimSpectrumModel::data | ( | double | , | |
double | ||||
) | [slot] |
Adds data to the model.
void TwoDimSpectrumModel::saveToFile | ( | QString | ) | [virtual, slot] |
void TwoDimSpectrumModel::clearSpectrum | ( | ) | [virtual, slot] |
void TwoDimSpectrumModel::updateCache | ( | ) | [private, slot] |
data_t TwoDimSpectrumModel::_data [private] |
double TwoDimSpectrumModel::xmin |
double TwoDimSpectrumModel::xmax |
double TwoDimSpectrumModel::xstep |
double TwoDimSpectrumModel::ymin |
double TwoDimSpectrumModel::ymax |
double TwoDimSpectrumModel::ystep |
struct { ... } TwoDimSpectrumModel::_cache [private] |