planner: remove dc_number access from models

Instead of accessing the global dc_number from the
DivePlannerPointsModel and the CylinderModel, pass them
in the respective initialization functions.

The dc_number global might not make sense on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-05-21 22:08:46 +02:00 committed by bstoeger
parent d057af43b4
commit 832398180c
7 changed files with 20 additions and 14 deletions

View file

@ -44,7 +44,7 @@ public:
void add();
void clear();
void updateDive(dive *d);
void updateDive(dive *d, int dcNr);
void updateDecoDepths(pressure_t olddecopo2);
void updateTrashIcon();
void moveAtFirst(int cylid);
@ -65,6 +65,7 @@ slots:
private:
dive *d;
int dcNr;
bool inPlanner;
bool hideUnused;
int numRows; // Does not include unused cylinders at the end