Commit Graph

362 Commits

Author SHA1 Message Date
Romain Goyet
4f1d74f44b [build] Use an out-of-tree build 2019-03-06 15:00:59 +01:00
Émilie Feral
7b5f3c570d [poincare] Change the way Expression are built 2019-02-21 11:29:35 +01:00
Émilie Feral
ac6f23684d [poincare] Clean Expression and Layout builders
Before: Opposite(Opposite(Rational(1))) misleadingly created the
expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1)))
creates "--1"
2019-02-21 11:29:35 +01:00
Ruben Dashyan
faae55eb51 [escher/scroll_view] Replace setShowsIndicators by setDecoratorType 2019-02-18 16:49:58 +01:00
Léa Saviot
869e534b4b [apps] MAke some InteractiveCurveViewRangeDelegate methods const 2019-01-10 11:42:05 +01:00
Léa Saviot
5d1ef0f3f0 [apps/sequence] Use first ranks when computing graph range
Put two sequences u(n+1)=u(n) and v(n+1) = v(n), u(100) = 50, v(50) = 8.
Basic settings computed the x range as [0,10] before, now it is
[50,110].
2019-01-10 11:42:05 +01:00
Léa Saviot
6720ad7b38 [apps] Rename interestingXRange as interestingXHalfRange 2019-01-10 11:42:05 +01:00
Léa Saviot
17a9388623 [apps/sequence] Clean GraphController 2019-01-10 11:42:05 +01:00
Émilie Feral
ecf3f2ea0f [poincare] Create a a flag on Expression that is set when the
approximation encouters a complex value

All approximation methods take the complex format into account.
2019-01-10 11:42:04 +01:00
Léa Saviot
f2310a8814 [apps] Change CurveViewRange::computeGridUnit parameters 2019-01-10 11:42:02 +01:00
Léa Saviot
cea413e91d [apps] Fix Orthonormal setting in graphs
It was not perfectly orthormal.
2019-01-10 11:42:02 +01:00
Léa Saviot
531b555949 [apps/sequence] Fix method that should be virtual pure
The following scenaro crashed in DEBUG=1 and did not resize the window
correctly in DEBUG=0.
Got to sequence
u(n)=n
Go to sequence/graph
Remove yAuto
Go to sequence/list
v(n) = cos(n)
remove u(n)
Go to sequence/graph
2019-01-10 11:42:02 +01:00
Léa Saviot
e37a4167b9 [apps/sequence] Add margin to sequence name 2019-01-10 11:42:02 +01:00
Léa Saviot
3595a8e628 [apps/sequence] Align sequence title and expression baselines 2019-01-10 11:42:02 +01:00
Léa Saviot
d87c0669cb [apps/sequence] Fix title cell alignments
Add margin right of "un="
Align the text vertically so that the equal is vertically centered in
the cell. This makes the left and right cell baselines be approximately
at the same level for basic sequences definition (un = 1, un=1/2, ...)
2019-01-10 11:42:02 +01:00
Léa Saviot
0a9edf8a43 [apps/sequence] Add cheat margin between sequence title and equal 2019-01-10 11:42:02 +01:00
Léa Saviot
11db7d5257 [apps/sequence] Remove equal char in sequence parameters 2019-01-10 11:42:02 +01:00
Léa Saviot
d3cae9d1aa [apps/sequence] Harmonize row height in sequence list 2019-01-10 11:42:02 +01:00
Léa Saviot
17da615a54 [apps/sequence] Don't draw a separator between sequence name and value 2019-01-10 11:42:02 +01:00
Léa Saviot
3b2eaa5dea [apps/sequence] Sequence title cells are aligned to the right 2019-01-10 11:42:02 +01:00
Léa Saviot
55de9ab111 [apps/sequence] Add '=' after sequence titles 2019-01-10 11:42:02 +01:00
Léa Saviot
56504525c9 [Makfile] Remove superfluous test_objs
We now build all objects even for test, so we do not need most of the
previous test_objs
2018-12-19 09:44:58 +01:00
Émilie Feral
78e4c9066f [shared] Revert: Use Simplify instead of Reduce
To approximate an expression, it is more precise to
approximate its simplified form than its reduced form. Indeed, we want
to minimize the number of nodes in the expression before approximating.
For instance, a/b has fewer nodes than a*b^-1.
2018-12-18 09:39:43 +01:00
Émilie Feral
aa0b785f3d [shared] In models Equation, Sequence: the recorded expression does not
need to be beautified. Use Reduce instead of simplify
2018-12-17 09:41:14 +01:00
Émilie Feral
55be86ef50 [escher] TableView::cellAtLocation should return nullptr if the cell is
invisible and therefore no view displays it.

Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Léa Saviot
5deef3176e [sequence] The store checksum takes the storage into account
This fixed the following scenario:
Create f(x)=120
Create u(n) = f(1)
Go to sequence graph, then Home, then change f.
Go back to the sequence app: the cursor is not updated.
2018-11-23 12:04:10 +01:00
Léa Saviot
53e4a290f7 [poincare] Rename Expression:parse in Parse 2018-11-23 12:04:09 +01:00
Léa Saviot
94603b2b7d [poincare] Layout::serialize is serializeForParsing or ParsedExpression
serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
2018-11-23 12:04:09 +01:00
Émilie Feral
e80512f362 [poincare] Context::expressionForSymbol takes a boolean notifying that
we want a copy or not
2018-11-23 12:04:08 +01:00
Léa Saviot
b9bf5be5f6 [apps/escher] Remove wrong markRectAsDirty, use reloadCell instead 2018-11-23 12:04:04 +01:00
Émilie Feral
80c1fe627c [sequence] Fix CacheContext 2018-11-23 12:04:04 +01:00
Léa Saviot
bea78aa3b1 [apps/escher] Invocation::Action returns a bool 2018-11-23 12:04:04 +01:00
Émilie Feral
0a823da78c [escher] Variable box pop-up is handle as Toolbox pop-up by asking
InputEventHandlerDelegate
2018-11-23 12:04:03 +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
7778c694d1 [escher] Create an InputEventHandlerDelegate that gives the toolbox to
be used by an InputEventHandler
2018-11-23 12:04:02 +01:00
Léa Saviot
71d8358722 [apps/escher/poincare] Change KDText::FontSize to KDFont 2018-11-23 12:04:02 +01:00
Émilie Feral
01e433a9f2 [escher] Clean Field and Input class hierarchy:
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
2018-11-23 12:04:02 +01:00
Léa Saviot
da226f7861 [tests] Fix GlobalContext namespace and duplicate test 2018-11-23 12:04:01 +01:00
Léa Saviot
21b214e60f [apps] Build all apps 2018-11-23 12:04:01 +01:00
Léa Saviot
6197ebd4c5 [poincare] SymbolAbstract is parent of Symbol and Function 2018-11-23 12:04:00 +01:00
Léa Saviot
96b594b875 [apps/graph] Adapt function name column width to names 2018-11-23 12:04:00 +01:00
Léa Saviot
a7a719df4a [poincare] Handle functions in replaceSymbolWithExp and similar methods 2018-11-23 12:03:59 +01:00
Émilie Feral
cf68a9ed18 [shared] Change TextFieldDelegateApp::XNT() signature 2018-11-23 12:03:59 +01:00
Léa Saviot
aaca53e9b0 [poincare] Fix symbol constructor: name and its length are mandatory 2018-11-23 12:03:59 +01:00
Émilie Feral
ccbcf18811 [poincare] VariableContext holds an Expression instead of a Float<T> 2018-11-23 12:03:59 +01:00
Émilie Feral
e58395e8c8 [sequence] Get rid of Symbol::SpecialSymbols in Sequence 2018-11-23 12:03:58 +01:00
Léa Saviot
31d3a04678 [poincare] setExpressionForSymbolName takes a symbol name 2018-11-23 12:03:58 +01:00
Émilie Feral
a6663f524f [poincare] VariableContext hold a const char * instead of a char 2018-11-23 12:03:58 +01:00
Émilie Feral
1fff98f1c4 [poincare] Change Expression methods' signature to work with const char
* symbol instead of char symbol
2018-11-23 12:03:58 +01:00
Léa Saviot
37a22aa708 [apps/sequence] Margin in parameter controller between type and chevron 2018-11-16 14:13:27 +01:00