mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
cleanup: make a few DivePlannerModel functions private
It simplifies reasoning about control flow a lot if it is known that functions can't be invoked from a different part of the code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
98594c18d1
commit
e79ac9c7ed
2 changed files with 5 additions and 5 deletions
|
@ -732,7 +732,7 @@ void DivePlannerPointsModel::setStartDate(const QDate &date)
|
||||||
void DivePlannerPointsModel::setStartTime(const QTime &t)
|
void DivePlannerPointsModel::setStartTime(const QTime &t)
|
||||||
{
|
{
|
||||||
startTime.setTime(t);
|
startTime.setTime(t);
|
||||||
diveplan.when = dateTimeToTimestamp(startTime);
|
diveplan.when = dateTimeToTimestamp(startTime);
|
||||||
displayed_dive.when = diveplan.when;
|
displayed_dive.when = diveplan.when;
|
||||||
emitDataChanged();
|
emitDataChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,14 +40,11 @@ public:
|
||||||
void setPlanMode(Mode mode);
|
void setPlanMode(Mode mode);
|
||||||
bool isPlanner();
|
bool isPlanner();
|
||||||
void createSimpleDive();
|
void createSimpleDive();
|
||||||
void setupStartTime();
|
|
||||||
void clear();
|
void clear();
|
||||||
Mode currentMode() const;
|
Mode currentMode() const;
|
||||||
bool setRecalc(bool recalc);
|
bool setRecalc(bool recalc);
|
||||||
bool recalcQ();
|
bool recalcQ();
|
||||||
bool tankInUse(int cylinderid);
|
bool tankInUse(int cylinderid);
|
||||||
void setupCylinders();
|
|
||||||
bool updateMaxDepth();
|
|
||||||
CylindersModel *cylindersModel();
|
CylindersModel *cylindersModel();
|
||||||
|
|
||||||
int ascrate75Display();
|
int ascrate75Display();
|
||||||
|
@ -63,7 +60,6 @@ public:
|
||||||
divedatapoint at(int row);
|
divedatapoint at(int row);
|
||||||
int size();
|
int size();
|
||||||
struct diveplan &getDiveplan();
|
struct diveplan &getDiveplan();
|
||||||
int lastEnteredPoint();
|
|
||||||
void removeDeco();
|
void removeDeco();
|
||||||
static bool addingDeco;
|
static bool addingDeco;
|
||||||
struct deco_state final_deco_state;
|
struct deco_state final_deco_state;
|
||||||
|
@ -122,6 +118,10 @@ signals:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DivePlannerPointsModel(QObject *parent = 0);
|
explicit DivePlannerPointsModel(QObject *parent = 0);
|
||||||
|
void setupStartTime();
|
||||||
|
void setupCylinders();
|
||||||
|
int lastEnteredPoint();
|
||||||
|
bool updateMaxDepth();
|
||||||
void createPlan(bool replanCopy);
|
void createPlan(bool replanCopy);
|
||||||
struct diveplan diveplan;
|
struct diveplan diveplan;
|
||||||
struct divedatapoint *cloneDiveplan(struct diveplan *plan_src, struct diveplan *plan_copy);
|
struct divedatapoint *cloneDiveplan(struct diveplan *plan_src, struct diveplan *plan_copy);
|
||||||
|
|
Loading…
Reference in a new issue