mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
plannerShared: add notes variables
Add display_runtime display_duration display_transitions verbatim_plan display_variations Get is direct from qPrefDivePlanner and set is plannerModel Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c976385aed
commit
55d856b0fd
2 changed files with 73 additions and 0 deletions
|
@ -256,3 +256,48 @@ void plannerShared::set_bestmixend(int value)
|
|||
qPrefDivePlanner::set_bestmixend(units_to_depth(value).mm);
|
||||
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()->setSacFactor(value);
|
||||
}
|
||||
|
||||
bool plannerShared::display_variations()
|
||||
{
|
||||
return qPrefDivePlanner::display_variations();
|
||||
}
|
||||
void plannerShared::set_display_variations(bool value)
|
||||
{
|
||||
DivePlannerPointsModel::instance()->setDisplayVariations(value);
|
||||
}
|
||||
|
|
|
@ -48,6 +48,13 @@ class plannerShared: public QObject {
|
|||
Q_PROPERTY(double decopo2 READ decopo2 WRITE set_decopo2 NOTIFY decopo2Changed);
|
||||
Q_PROPERTY(int bestmixend READ bestmixend WRITE set_bestmixend NOTIFY bestmixendChanged);
|
||||
|
||||
// Notes data
|
||||
Q_PROPERTY(bool display_runtime READ display_runtime WRITE set_display_runtime NOTIFY display_runtimeChanged);
|
||||
Q_PROPERTY(bool display_duration READ display_duration WRITE set_display_duration NOTIFY display_durationChanged);
|
||||
Q_PROPERTY(bool display_transitions READ display_transitions WRITE set_display_transitions NOTIFY display_transitionsChanged);
|
||||
Q_PROPERTY(bool verbatim_plan READ verbatim_plan WRITE set_verbatim_plan NOTIFY verbatim_planChanged);
|
||||
Q_PROPERTY(bool display_variations READ display_variations WRITE set_display_variations NOTIFY display_variationsChanged);
|
||||
|
||||
public:
|
||||
static plannerShared *instance();
|
||||
|
||||
|
@ -82,6 +89,13 @@ public:
|
|||
static double decopo2();
|
||||
static int bestmixend();
|
||||
|
||||
// Notes data
|
||||
static bool display_runtime();
|
||||
static bool display_duration();
|
||||
static bool display_transitions();
|
||||
static bool verbatim_plan();
|
||||
static bool display_variations();
|
||||
|
||||
public slots:
|
||||
// Ascend/Descend data, converted to meter/feet depending on user selection
|
||||
static void set_ascratelast6m(int value);
|
||||
|
@ -114,6 +128,13 @@ public slots:
|
|||
static void set_decopo2(double value);
|
||||
static void set_bestmixend(int value);
|
||||
|
||||
// Notes data
|
||||
static void set_display_runtime(bool value);
|
||||
static void set_display_duration(bool value);
|
||||
static void set_display_transitions(bool value);
|
||||
static void set_verbatim_plan(bool value);
|
||||
static void set_display_variations(bool value);
|
||||
|
||||
signals:
|
||||
// Ascend/Descend data, converted to meter/feet depending on user selection
|
||||
void ascratelast6mChanged(int value);
|
||||
|
@ -146,6 +167,13 @@ signals:
|
|||
void decopo2Changed(double value);
|
||||
void bestmixendChanged(int value);
|
||||
|
||||
// Notes data
|
||||
void display_runtimeChanged(bool value);
|
||||
void display_durationChanged(bool value);
|
||||
void display_transitionsChanged(bool value);
|
||||
void verbatim_planChanged(bool value);
|
||||
void display_variationsChanged(bool value);
|
||||
|
||||
private:
|
||||
plannerShared() {}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue