[apps] Graph: add the maximum graph controller

This commit is contained in:
Émilie Feral
2018-01-17 10:34:21 +01:00
committed by EmilieNumworks
parent 6703fedf54
commit 6fecd091f4
6 changed files with 61 additions and 18 deletions

View File

@@ -14,7 +14,8 @@ CalculationParameterController::CalculationParameterController(Responder * paren
m_function(nullptr),
m_tangentGraphController(nullptr, graphView, bannerView, range, cursor),
m_integralGraphController(nullptr, graphView, range, cursor),
m_minimumGraphController(nullptr, graphView, bannerView, range, cursor)
m_minimumGraphController(nullptr, graphView, bannerView, range, cursor),
m_maximumGraphController(nullptr, graphView, bannerView, range, cursor)
{
}
@@ -35,6 +36,10 @@ bool CalculationParameterController::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
ViewController * controller = nullptr;
switch(selectedRow()) {
case 1:
m_maximumGraphController.setFunction(m_function);
controller = &m_maximumGraphController;
break;
case 2:
m_minimumGraphController.setFunction(m_function);
controller = &m_minimumGraphController;