mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Created a method to check if calculations should take place.
Created a method to check if calculations should take place taking into consideration what changed on the model. if the model changes *everything*, them, all calculations should be done, but if just some of the columns of the model are changed, only those columns should trigger an visual update on the items. In theory this patch looks right, but something is wrong ( calculations are not being made. ), so I'll commit this any how, and fix on the next commit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0ae7c820f2
commit
25b0a846af
6 changed files with 96 additions and 49 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
#include "display.h"
|
||||
|
||||
struct dive;
|
||||
struct plot_data;
|
||||
struct plot_info;
|
||||
|
@ -19,16 +21,16 @@ public:
|
|||
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);
|
||||
plot_data* data();
|
||||
void setDive(struct dive *d, const plot_info& pInfo);
|
||||
const plot_info& data() const;
|
||||
int id() const;
|
||||
double pheMax();
|
||||
double pn2Max();
|
||||
double po2Max();
|
||||
void emitDataChanged();
|
||||
void calculateDecompression();
|
||||
private:
|
||||
int sampleCount;
|
||||
plot_data *plotData;
|
||||
plot_info pInfo;
|
||||
int diveId;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue