From 07cd605234e515d94298a71a247bbbb1f313d5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 3 Jan 2017 14:06:37 +0100 Subject: [PATCH] [apps/regression] Display the prediction parameter page when clicking on the regression curve Change-Id: Iac2750ac855a285d607edeac0da5d82b4ad674a3 --- apps/regression/graph_controller.cpp | 7 ++++++- apps/regression/graph_controller.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/regression/graph_controller.cpp b/apps/regression/graph_controller.cpp index e721961c3..8242aa401 100644 --- a/apps/regression/graph_controller.cpp +++ b/apps/regression/graph_controller.cpp @@ -6,7 +6,8 @@ GraphController::GraphController(Responder * parentResponder, HeaderViewControll CurveViewWindowWithBannerAndCursorController(parentResponder, headerViewController, data, &m_view), m_view(GraphView(data)), m_data(data), - m_initialisationParameterController(InitialisationParameterController(this, m_data)) + m_initialisationParameterController(InitialisationParameterController(this, m_data)), + m_predictionParameterController(PredictionParameterController(this, m_data)) { } @@ -26,6 +27,10 @@ const char * GraphController::emptyMessage() { } bool GraphController::handleEnter() { + if (m_data->selectedDotIndex() == -1) { + stackController()->push(&m_predictionParameterController); + return true; + } return false; } diff --git a/apps/regression/graph_controller.h b/apps/regression/graph_controller.h index 459f01ab2..e7f6b3e94 100644 --- a/apps/regression/graph_controller.h +++ b/apps/regression/graph_controller.h @@ -5,6 +5,7 @@ #include "data.h" #include "graph_view.h" #include "initialisation_parameter_controller.h" +#include "prediction_parameter_controller.h" #include "../curve_view_with_banner_and_cursor_controller.h" namespace Regression { @@ -22,6 +23,7 @@ private: GraphView m_view; Data * m_data; InitialisationParameterController m_initialisationParameterController; + PredictionParameterController m_predictionParameterController; }; }