mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile: move dive planner notes access to pure interface
Make notes rates available to QML through the Backend interface. Remove the corresponding variables from plannerShared. Getters are from prefs. while setters are linked to diveplan model. Remark: signals from qPrefDivePlanner is used, because the diveplanner model sets qPrefDivePlanner but do not issue special signals. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e22943fa21
commit
b0e46c208d
6 changed files with 49 additions and 88 deletions
|
@ -214,51 +214,6 @@ void plannerShared::set_bestmixend(int value)
|
|||
CylindersModel::instance()->updateBestMixes();
|
||||
}
|
||||
|
||||
bool plannerShared::display_runtime()
|
||||
{
|
||||
return qPrefDivePlanner::display_runtime();
|
||||
}
|
||||
void plannerShared::set_display_runtime(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setDisplayRuntime(value);
|
||||
}
|
||||
|
||||
bool plannerShared::display_duration()
|
||||
{
|
||||
return qPrefDivePlanner::display_duration();
|
||||
}
|
||||
void plannerShared::set_display_duration(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setDisplayDuration(value);
|
||||
}
|
||||
|
||||
bool plannerShared::display_transitions()
|
||||
{
|
||||
return qPrefDivePlanner::display_transitions();
|
||||
}
|
||||
void plannerShared::set_display_transitions(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setDisplayTransitions(value);
|
||||
}
|
||||
|
||||
bool plannerShared::verbatim_plan()
|
||||
{
|
||||
return qPrefDivePlanner::verbatim_plan();
|
||||
}
|
||||
void plannerShared::set_verbatim_plan(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setVerbatim(value);
|
||||
}
|
||||
|
||||
bool plannerShared::display_variations()
|
||||
{
|
||||
return qPrefDivePlanner::display_variations();
|
||||
}
|
||||
void plannerShared::set_display_variations(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setDisplayVariations(value);
|
||||
}
|
||||
|
||||
// Handle when user changes length measurement type
|
||||
void plannerShared::unit_lengthChangedSlot(int value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue