Actually compute variations in background

This reenables the computation of plan variations but now in a separate
thread. Once finieshed, a signal is sent to update the notes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-11-27 17:36:21 +01:00 committed by Dirk Hohndel
parent f159792b80
commit a9703628c4
6 changed files with 73 additions and 44 deletions

View file

@ -110,13 +110,14 @@ signals:
void startTimeChanged(QDateTime);
void recreationChanged(bool);
void calculatedPlanNotes();
void variationsComputed(QString);
private:
explicit DivePlannerPointsModel(QObject *parent = 0);
void createPlan(bool replanCopy);
struct diveplan diveplan;
struct divedatapoint *cloneDiveplan(struct diveplan *plan_copy);
void computeVariations(struct deco_state *ds);
struct divedatapoint *cloneDiveplan(struct diveplan *plan_src, struct diveplan *plan_copy);
void computeVariations(struct diveplan *diveplan, struct deco_state *ds);
int analyzeVariations(struct decostop *min, struct decostop *mid, struct decostop *max, const char *unit);
Mode mode;
bool recalc;