[apps] Graph: redesign TangentGraphController implementation: use

different controller with common parent class
This commit is contained in:
Émilie Feral
2018-01-09 15:50:39 +01:00
committed by EmilieNumworks
parent 7ce68d0a11
commit 5c64f76735
11 changed files with 126 additions and 90 deletions

View File

@@ -7,13 +7,13 @@ using namespace Shared;
namespace Graph {
CurveParameterController::CurveParameterController(InteractiveCurveViewRange * graphRange, BannerView * bannerView, CurveViewCursor * cursor, GraphController * graphController) :
CurveParameterController::CurveParameterController(InteractiveCurveViewRange * graphRange, BannerView * bannerView, CurveViewCursor * cursor, GraphView * graphView, GraphController * graphController) :
FunctionCurveParameterController(graphRange, cursor),
m_goToParameterController(this, graphRange, cursor, I18n::Message::X),
m_graphController(graphController),
m_calculationCell(I18n::Message::Compute),
m_derivativeCell(I18n::Message::DerivateNumber),
m_calculationParameterController(this, graphController)
m_calculationParameterController(this, graphView, bannerView, graphRange, cursor)
{
}
@@ -37,7 +37,7 @@ bool CurveParameterController::handleEvent(Ion::Events::Event event) {
switch (selectedRow()) {
case 0:
{
m_calculationParameterController.setFunction(m_function);
m_calculationParameterController.setFunction(static_cast<CartesianFunction *>(m_function));
StackViewController * stack = (StackViewController *)parentResponder();
stack->push(&m_calculationParameterController);
return true;