mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
diveplanner: add surface_segment to plannershared
Add surface_segment to plannerShared and then update desktop-widgets. Signed-off-by: jan Iversen <jan@casacondor.com> desktop-widgets: use plannerShared for surface_segment Change getter/setter for surface_segment to plannerShared, in order to share the conversion with mobile diveplanner Signed-off-by: jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
995340b68a
commit
ff360d28f5
4 changed files with 21 additions and 2 deletions
|
@ -61,6 +61,17 @@ void plannerShared::set_min_switch_duration(int value)
|
|||
DivePlannerPointsModel::instance()->setMinSwitchDuration(value);
|
||||
}
|
||||
|
||||
int plannerShared::surface_segment()
|
||||
{
|
||||
return qPrefDivePlanner::surface_segment() / 60;
|
||||
}
|
||||
void plannerShared::set_surface_segment(int value)
|
||||
{
|
||||
// NO conversion, this is done in the planner model.
|
||||
DivePlannerPointsModel::instance()->setSurfaceSegment(value);
|
||||
emit instance()->surface_segmentChanged(surface_segment());
|
||||
}
|
||||
|
||||
double plannerShared::bottomsac()
|
||||
{
|
||||
return (qPrefUnits::volume() == units::LITER) ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue