2014-01-14 18:43:58 +00:00
|
|
|
#ifndef DIVEPLOTDATAMODEL_H
|
|
|
|
#define DIVEPLOTDATAMODEL_H
|
|
|
|
|
|
|
|
#include <QAbstractTableModel>
|
|
|
|
|
|
|
|
struct dive;
|
|
|
|
struct plot_data;
|
|
|
|
struct plot_info;
|
|
|
|
|
|
|
|
class DivePlotDataModel : public QAbstractTableModel{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-01-21 16:59:19 +00:00
|
|
|
enum {DEPTH, TIME, PRESSURE, TEMPERATURE, USERENTERED, COLOR, CYLINDERINDEX, SENSOR_PRESSURE, INTERPOLATED_PRESSURE,
|
2014-01-21 17:31:56 +00:00
|
|
|
SAC, CEILING, TISSUE_1,TISSUE_2,TISSUE_3,TISSUE_4,TISSUE_5,TISSUE_6,TISSUE_7,TISSUE_8,TISSUE_9,TISSUE_10,
|
|
|
|
TISSUE_11,TISSUE_12,TISSUE_13,TISSUE_14,TISSUE_15,TISSUE_16,COLUMNS};
|
2014-01-14 18:43:58 +00:00
|
|
|
explicit DivePlotDataModel(QObject* parent = 0);
|
|
|
|
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
|
|
|
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
|
|
|
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
|
|
|
void clear();
|
|
|
|
void setDive(struct dive *d, const plot_info& pInfo);
|
2014-01-21 15:27:08 +00:00
|
|
|
plot_data* data();
|
2014-01-21 16:05:29 +00:00
|
|
|
int id() const;
|
2014-01-14 18:43:58 +00:00
|
|
|
private:
|
|
|
|
int sampleCount;
|
|
|
|
plot_data *plotData;
|
2014-01-21 16:05:29 +00:00
|
|
|
int diveId;
|
2014-01-14 18:43:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|