TwoDimSpectrumModel Class Reference

#include <spectrummodel.h>

Inheritance diagram for TwoDimSpectrumModel:

AbstractSpectrumModel QAbstractItemModel
Collaboration diagram for TwoDimSpectrumModel:

Collaboration graph

List of all members.

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 > > 

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

Detailed Description


Member Typedef Documentation

typedef std::map< int, std::map<int, int> > TwoDimSpectrumModel::data_t [private]

Constructor & Destructor Documentation

TwoDimSpectrumModel::TwoDimSpectrumModel ( QObject  ) 

Member Function Documentation

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  ,
) [slot]

Adds data to the model.

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

Save the spectrum to a file.

Implements AbstractSpectrumModel.

void TwoDimSpectrumModel::clearSpectrum (  )  [virtual, slot]

Clear the whole spectrum.

Implements AbstractSpectrumModel.

void TwoDimSpectrumModel::updateCache (  )  [private, slot]

Member Data Documentation

struct { ... } TwoDimSpectrumModel::_cache [private]

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

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