Commit Graph

69 Commits

Author SHA1 Message Date
Ruben Dashyan
246a9aa7a4 [apps/shared/function_graph_controller] Clarify function selection in initCursorParameters 2020-02-12 15:13:24 +01:00
Ruben Dashyan
1cdd61ea47 [apps/shared/function_graph_controller] Do not compute the numberOfActiveFunctions repeatedly 2020-02-12 15:13:24 +01:00
Léa Saviot
79a70f5b6e [apps/graph] Clip t when navigating curves vertically 2019-09-23 17:31:35 +02:00
Léa Saviot
e9974a216d [apps/graph] If only cartesians, jump to next curve when out of range
Scenario:

-----------•   ->press "right": the cursor goes on the lower curve

           -*-*-*-*-*-
2019-09-23 17:31:35 +02:00
Léa Saviot
ebfa251db8 [apps/grah} closestCurveIndexVertically renamed as next... 2019-09-23 17:31:35 +02:00
Émilie Feral
b4f9cbf4b3 [apps/shared] FunctionGraphController: fix confusion (int/float) 2019-09-09 12:12:18 +02:00
Émilie Feral
71e66ad513 [apps/shared] FunctionGraphController: fix moveCursorVertically, t does
not change when the cursor moves VERTICALLY
2019-09-05 14:20:58 +02:00
Léa Saviot
c3ee6a71e7 [apps/graph] Fix computeYRange for polar/cartesian functions
Was very slow, compute only 1000 values to evaluate the yRange
2019-09-03 14:21:14 +02:00
Émilie Feral
a7285ba1ca [apps/graph] Implement defaultCursorT for FunctionGraphController 2019-09-02 16:55:39 +02:00
Émilie Feral
0f43a04225 [apps/graph] Implement move cursor vertically on graph with
parametric/polar curves
2019-08-30 17:15:12 +02:00
Émilie Feral
2d5b60640d [apps/shared] Fix InteractiveCurveViewController::moveCursorVertically
for Sequence and Regression (add a TODO for Graph)
2019-08-30 17:14:26 +02:00
Léa Saviot
fa413edc61 [apps/graph] fix banner view for polar and parametric 2019-08-30 15:04:27 +02:00
Léa Saviot
850170e33b [apps/shared] computeYRange clips tMin..tMax to xMin..xMax if possible 2019-08-30 10:18:39 +02:00
Ruben Dashyan
8957cb9fea [apps/shared/curve_view_range] Define and use x|yCenter accessors 2019-08-29 15:13:41 +02:00
Ruben Dashyan
366daa9c88 [apps] Remove dummy checks in graph/graph_controller and shared/function_graph_controller 2019-08-29 15:13:40 +02:00
Léa Saviot
a945c02edf [poincare/Coordinate2D] Rename members x1 and x2 2019-08-29 11:07:22 +02:00
Léa Saviot
c71ef7ff79 [apps/graph] Evaluation methods renaming 2019-08-29 11:07:22 +02:00
Léa Saviot
28a721e96e [apps] Start fixing apps as cursor has new member variable 2019-08-29 11:07:22 +02:00
Ruben Dashyan
6d7e833a46 [apps/shared/function_banner_delegate] Factor reloadBannerViewForCursorOnFunction 2019-08-29 11:07:21 +02:00
Ruben Dashyan
d171c2a2be [apps/shared/function_graph_controller] Comment about the sampling step in computeYRange 2019-07-30 14:15:08 +02:00
Ruben Dashyan
292493ba36 [apps/*curve_view] Substitute resolution by pixelWidth 2019-07-30 14:15:08 +02:00
Ruben Dashyan
c80baae1e9 [apps/*/curve_view] Remove samplingRatio()
The resolution() method is useful to get a horizontal step equivalent to
the width of a pixel. A higher sampling ratio (or resolution) had been
introduced in the following commit.
[apps] In curve view, avoid white vertical lines in integral curves due to pixel rounding
2019-07-30 14:15:08 +02:00
Ruben Dashyan
503995746a [apps/shared/function_graph_controller] Clean resolution usage in computeYRange 2019-07-30 14:15:08 +02:00
Ruben Dashyan
44809f4b3f Substitute Escher app() by Container::activeApp() 2019-07-19 15:06:25 +02:00
Ruben Dashyan
3e992a3560 [apps] Replace app() by textFieldDelegateApp() in TextFieldDelegates 2019-07-19 15:06:25 +02:00
Ruben Dashyan
ff887ec4a0 [apps/shared] Define static app() accessor in FunctionApp class 2019-07-19 15:06:25 +02:00
Ruben Dashyan
0e1c1a017d [apps] Implement TextFieldDelegate methods in GraphControllers 2019-05-03 15:54:22 +02:00
Ruben Dashyan
94cf542ba3 [apps] Factorize InteractiveCurveViewController::moveCursorVertically 2019-05-03 15:54:21 +02:00
Ruben Dashyan
67f9f79322 [apps] Implement InteractiveCurveViewController::isCursorVisible
It was a pure virtual method implemented in derived classes
  Shared::FunctionGraphController,
  Regression::GraphController.
InteractiveCurveViewRange does not need anymore to hold CurveViewCursor
* m_cursor.
2019-05-03 15:54:21 +02:00
Ruben Dashyan
d8f97d62a4 [apps] Factorize Shared::InteractiveCurveViewController methods
cursorBottomMarginRatio(), displayBottomMarginRatio(),
estimatedBannerHeight() and k_viewHeight moved to
Shared::InteractiveCurveViewController from derived classes.

estimatedBannerNumberOfLines() moved from
Shared::FunctionGraphController to
Shared::InteractiveCurveViewController and implemented in
Regresssion::GraphController.
2019-05-03 15:54:21 +02:00
Ruben Dashyan
0b2ab14ced [apps/shared] Fix a typo in FunctionGraphController
Introduced in commit
[shared] Factorize GraphController::initCursorParameters of Graph and Sequence
2019-05-03 15:54:21 +02:00
Ruben Dashyan
e13651f6fb [apps] Remove Shared::InteractiveCurveViewController::initRangeParameters virtual method 2019-05-03 15:54:21 +02:00
Ruben Dashyan
51bd3312f5 [apps/shared] Clean FunctionGraphController::initRangeParameters()
The method is exactly called once, by
InteractiveCurveViewController::viewWillAppear, which also calls
initCursorParameters afterwards, which in turn calls
selectFunctionWithCursor. Hence the removed lines were redundant.
2019-05-03 15:54:21 +02:00
Ruben Dashyan
e7add02912 [apps] Remove FunctionGraphController::cursorView() virtual method
It was implemented by the Graph and Sequence GraphController derived
classes and was used
  1) in FunctionGraphController::viewWillAppear to set the cursorView
specific to each derived class,
  2) in FunctionGraphController::cursor/displayBottomMarginRatio()
methods.

Instead
  1) the viewWillAppear method of each derived classes sets its
cursorView itself
  2) one may already get the cursorView through curveView().
2019-05-03 15:54:21 +02:00
Émilie Feral
578c65d5dd [shared] Clean class names containing storage 2019-05-03 15:53:20 +02:00
Émilie Feral
ad8fea46c3 [shared] Clean unused classes 2019-05-03 15:53:20 +02:00
Léa Saviot
058b49a063 [apps/Seq/Reg] Do not pan to cursor if no yAuto 2019-01-10 11:42:02 +01:00
Émilie Feral
698332c355 [escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Émilie Feral
48f890ef93 [poincare] AngleUnit, FormatComplex and PrintFloatMode are now
enumeration of Preferences class
2018-07-30 13:48:04 +02:00
Léa Saviot
68d915fb3e [apps/reg] Fix window sizing: cursor appears even with big bannerview 2018-07-18 10:32:46 +02:00
Émilie Feral
66d920a280 [shared] Factorize GraphController::initCursorParameters of Graph and
Sequence
2018-07-06 14:00:32 +02:00
Émilie Feral
a1d6b90705 [shared] FunctionGraphController: fix computeYRange for 1/x 2018-07-04 11:34:08 +02:00
Émilie Feral
e4fbfe3a77 [apps] Shared: when adjusting yAuto and scanning y values, avoid
rounding errors (avoid weird range for y = 1/x)
2018-03-21 15:58:19 +01:00
Émilie Feral
9cd50d8d9a [apps] Graph/Sequence: set different cursors for Sequence and Graph 2018-01-30 18:53:28 +01:00
Émilie Feral
95f0efaf9f [apps] Graph/Sequence: the function selected by the cursor has to be
save in the Snapshot to avoid weird selection when rebulding the app
2018-01-30 18:53:28 +01:00
Émilie Feral
c9b86d0c86 [apps] Shared: the cursor view own its size instead of the curve view 2018-01-30 18:53:28 +01:00
Émilie Feral
7ea0dbeb56 [apps] Shared: Move part of the implementation of TermSumController to
shared (Integral Graph Controller) and improve bound edition in
TermSumController.
2018-01-30 18:19:27 +01:00
Émilie Feral
85abdbcafb [apps] Shared: Break function_graph_controller into 2 classes: function_banner_delegate and function_graph_controller 2018-01-30 18:19:27 +01:00
Émilie Feral
d1808ae26f [apps] Graph: change banner view when displaying Tangent in graph view 2018-01-30 18:19:27 +01:00
Jacob Young
17ac54cad5 Use cmath in c++ files. 2017-10-13 18:08:15 +02:00