summaryrefslogtreecommitdiffstats
path: root/backend-shared
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-03 19:08:35 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-04 02:17:52 +0100
commitd27b6805f3ff4787acc24f8b652e3b13f8860d78 (patch)
treeaac76a869fb8b94fa7d49718f50aaa45506e8b27 /backend-shared
parent317ee2f1049b7d4e859162c4c60bd1ebd3eaf8cb (diff)
downloadsubsurface-d27b6805f3ff4787acc24f8b652e3b13f8860d78.tar.gz
Cleanup: rename plannerShared to PlannerShared
Usually, we use PascalCase (i.e. camelCase with a capital letter at the start) for class names. For consistency, let's do it here as well. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'backend-shared')
-rw-r--r--backend-shared/plannershared.cpp52
-rw-r--r--backend-shared/plannershared.h2
2 files changed, 27 insertions, 27 deletions
diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp
index a83a3bd56..51f7a3a74 100644
--- a/backend-shared/plannershared.cpp
+++ b/backend-shared/plannershared.cpp
@@ -7,65 +7,65 @@
#include "qt-models/cylindermodel.h"
// Planning values
-deco_mode plannerShared::planner_deco_mode()
+deco_mode PlannerShared::planner_deco_mode()
{
return qPrefDivePlanner::planner_deco_mode();
}
-void plannerShared::set_planner_deco_mode(deco_mode value)
+void PlannerShared::set_planner_deco_mode(deco_mode value)
{
DivePlannerPointsModel::instance()->setDecoMode(value);
}
-int plannerShared::reserve_gas()
+int PlannerShared::reserve_gas()
{
return qPrefDivePlanner::reserve_gas();
}
-void plannerShared::set_reserve_gas(int value)
+void PlannerShared::set_reserve_gas(int value)
{
DivePlannerPointsModel::instance()->setReserveGas(value);
}
-bool plannerShared::dobailout()
+bool PlannerShared::dobailout()
{
return qPrefDivePlanner::dobailout();
}
-void plannerShared::set_dobailout(bool value)
+void PlannerShared::set_dobailout(bool value)
{
qPrefDivePlanner::set_dobailout(value);
DivePlannerPointsModel::instance()->emitDataChanged();
}
-bool plannerShared::doo2breaks()
+bool PlannerShared::doo2breaks()
{
return qPrefDivePlanner::doo2breaks();
}
-void plannerShared::set_doo2breaks(bool value)
+void PlannerShared::set_doo2breaks(bool value)
{
qPrefDivePlanner::set_doo2breaks(value);
DivePlannerPointsModel::instance()->emitDataChanged();
}
-int plannerShared::min_switch_duration()
+int PlannerShared::min_switch_duration()
{
return qPrefDivePlanner::min_switch_duration() / 60;
}
-void plannerShared::set_min_switch_duration(int value)
+void PlannerShared::set_min_switch_duration(int value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setMinSwitchDuration(value);
}
-int plannerShared::surface_segment()
+int PlannerShared::surface_segment()
{
return qPrefDivePlanner::surface_segment() / 60;
}
-void plannerShared::set_surface_segment(int value)
+void PlannerShared::set_surface_segment(int value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setSurfaceSegment(value);
}
-double plannerShared::bottomsac()
+double PlannerShared::bottomsac()
{
return (qPrefUnits::volume() == units::LITER) ?
qPrefDivePlanner::bottomsac() / 1000.0 :
@@ -75,13 +75,13 @@ double plannerShared::bottomsac()
#endif
);
}
-void plannerShared::set_bottomsac(double value)
+void PlannerShared::set_bottomsac(double value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setBottomSac(value);
}
-double plannerShared::decosac()
+double PlannerShared::decosac()
{
// Mobile and desktop use the same values when using units::LITER,
// however when using units::CUFT desktop want 0.00 - 3.00 while
@@ -94,13 +94,13 @@ double plannerShared::decosac()
#endif
);
}
-void plannerShared::set_decosac(double value)
+void PlannerShared::set_decosac(double value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setDecoSac(value);
}
-double plannerShared::sacfactor()
+double PlannerShared::sacfactor()
{
// mobile want 0 - 100 which are shown with 1 decimal as 0.0 - 10.0
// whereas desktop wants 0.0 - 10.0
@@ -112,38 +112,38 @@ double plannerShared::sacfactor()
100.0;
#endif
}
-void plannerShared::set_sacfactor(double value)
+void PlannerShared::set_sacfactor(double value)
{
// NO conversion, this is done in the planner model.
DivePlannerPointsModel::instance()->setSacFactor(value);
}
-bool plannerShared::o2narcotic()
+bool PlannerShared::o2narcotic()
{
return qPrefDivePlanner::o2narcotic();
}
-void plannerShared::set_o2narcotic(bool value)
+void PlannerShared::set_o2narcotic(bool value)
{
qPrefDivePlanner::set_o2narcotic(value);
DivePlannerPointsModel::instance()->emitDataChanged();
CylindersModel::instance()->updateBestMixes();
}
-double plannerShared::bottompo2()
+double PlannerShared::bottompo2()
{
return (qPrefDivePlanner::bottompo2() / 1000.0);
}
-void plannerShared::set_bottompo2(double value)
+void PlannerShared::set_bottompo2(double value)
{
qPrefDivePlanner::set_bottompo2((int) (value * 1000.0));
CylindersModel::instance()->updateBestMixes();
}
-double plannerShared::decopo2()
+double PlannerShared::decopo2()
{
return qPrefDivePlanner::decopo2() / 1000.0;
}
-void plannerShared::set_decopo2(double value)
+void PlannerShared::set_decopo2(double value)
{
pressure_t olddecopo2;
olddecopo2.mbar = prefs.decopo2;
@@ -152,11 +152,11 @@ void plannerShared::set_decopo2(double value)
CylindersModel::instance()->updateBestMixes();
}
-int plannerShared::bestmixend()
+int PlannerShared::bestmixend()
{
return lrint(get_depth_units(prefs.bestmixend.mm, NULL, NULL));
}
-void plannerShared::set_bestmixend(int value)
+void PlannerShared::set_bestmixend(int value)
{
qPrefDivePlanner::set_bestmixend(units_to_depth(value).mm);
CylindersModel::instance()->updateBestMixes();
diff --git a/backend-shared/plannershared.h b/backend-shared/plannershared.h
index d3e9f9fe4..1368a6782 100644
--- a/backend-shared/plannershared.h
+++ b/backend-shared/plannershared.h
@@ -12,7 +12,7 @@
// The mobile diveplanner shows all diveplans, but the editing functionality is
// limited to keep the UI simpler.
-class plannerShared: public QObject {
+class PlannerShared: public QObject {
Q_OBJECT
public: