mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared/values_controller] Move evaluationOfAbscissaAtColumn impl to Sequence
And remove TODO
This commit is contained in:
@@ -63,6 +63,12 @@ bool ValuesController::setDataAtLocation(double floatBody, int columnIndex, int
|
||||
return Shared::ValuesController::setDataAtLocation(std::round(floatBody), columnIndex, rowIndex);
|
||||
}
|
||||
|
||||
double ValuesController::evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) {
|
||||
ExpiringPointer<Function> function = functionStore()->modelForRecord(recordAtColumn(columnIndex));
|
||||
Poincare::Coordinate2D<double> xy = function->evaluateXYAtParameter(abscissa, textFieldDelegateApp()->localContext());
|
||||
return xy.x2();
|
||||
}
|
||||
|
||||
Shared::Interval * ValuesController::intervalAtColumn(int columnIndex) {
|
||||
return App::app()->interval();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
private:
|
||||
void setStartEndMessages(Shared::IntervalParameterController * controller, int column) override;
|
||||
bool setDataAtLocation(double floatBody, int columnIndex, int rowIndex) override;
|
||||
double evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) override;
|
||||
Shared::Interval * intervalAtColumn(int columnIndex) override;
|
||||
I18n::Message valuesParameterMessageAtColumn(int columnIndex) const override;
|
||||
int maxNumberOfCells() override { return k_maxNumberOfCells; }
|
||||
|
||||
@@ -250,14 +250,6 @@ int ValuesController::numberOfElementsInColumn(int columnIndex) {
|
||||
return intervalAtColumn(columnIndex)->numberOfElements();
|
||||
}
|
||||
|
||||
double ValuesController::evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) {
|
||||
ExpiringPointer<Function> function = functionStore()->modelForRecord(recordAtColumn(columnIndex));
|
||||
//TODO LEA RUBEN Careful with merge
|
||||
//TODO LEA RUBEN change with evaluationOfParameterAtColumn? evaluate2DAtParameter ?
|
||||
Poincare::Coordinate2D<double> xy = function->evaluateXYAtParameter(abscissa, textFieldDelegateApp()->localContext());
|
||||
return xy.x2();
|
||||
}
|
||||
|
||||
void ValuesController::updateNumberOfColumns() {
|
||||
m_numberOfColumns = 1+functionStore()->numberOfActiveFunctions();
|
||||
}
|
||||
|
||||
@@ -61,12 +61,12 @@ private:
|
||||
Responder * tabController() const override;
|
||||
bool cellAtLocationIsEditable(int columnIndex, int rowIndex) override;
|
||||
double dataAtLocation(int columnIndex, int rowIndex) override;
|
||||
virtual double evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) = 0;
|
||||
virtual Interval * intervalAtColumn(int columnIndex) = 0;
|
||||
virtual I18n::Message valuesParameterMessageAtColumn(int columnIndex) const = 0;
|
||||
int maxNumberOfElements() const override {
|
||||
return Interval::k_maxNumberOfElements;
|
||||
};
|
||||
virtual double evaluationOfAbscissaAtColumn(double abscissa, int columnIndex);
|
||||
virtual int maxNumberOfCells() = 0;
|
||||
virtual int maxNumberOfFunctions() = 0;
|
||||
virtual FunctionTitleCell * functionTitleCells(int j) = 0;
|
||||
|
||||
Reference in New Issue
Block a user