[apps] Code cleaning

This commit is contained in:
Léa Saviot
2019-08-30 13:49:49 +02:00
parent 66ef85239d
commit 2071a65d43
3 changed files with 11 additions and 39 deletions

View File

@@ -33,14 +33,6 @@ void GraphController::viewWillAppear() {
selectFunctionWithCursor(indexFunctionSelectedByCursor()); // update the color of the cursor
}
bool GraphController::displayDerivativeInBanner() const {
return m_displayDerivativeInBanner;
}
void GraphController::setDisplayDerivativeInBanner(bool displayDerivative) {
m_displayDerivativeInBanner = displayDerivative;
}
float GraphController::interestingXHalfRange() const {
float characteristicRange = 0.0f;
Poincare::Context * context = textFieldDelegateApp()->localContext();
@@ -54,20 +46,12 @@ float GraphController::interestingXHalfRange() const {
return (characteristicRange > 0.0f ? 1.6f*characteristicRange : InteractiveCurveViewRangeDelegate::interestingXHalfRange());
}
int GraphController::estimatedBannerNumberOfLines() const {
return 1 + m_displayDerivativeInBanner;
}
void GraphController::selectFunctionWithCursor(int functionIndex) {
FunctionGraphController::selectFunctionWithCursor(functionIndex);
ExpiringPointer<CartesianFunction> f = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(functionIndex));
m_cursorView.setColor(f->color());
}
BannerView * GraphController::bannerView() {
return &m_bannerView;
}
void GraphController::reloadBannerView() {
FunctionGraphController::reloadBannerView();
if (!m_displayDerivativeInBanner) {
@@ -82,16 +66,4 @@ bool GraphController::moveCursorHorizontally(int direction) {
return privateMoveCursorHorizontally(m_cursor, direction, m_graphRange, k_numberOfCursorStepsInGradUnit, record);
}
InteractiveCurveViewRange * GraphController::interactiveCurveViewRange() {
return m_graphRange;
}
GraphView * GraphController::functionGraphView() {
return &m_view;
}
CurveParameterController * GraphController::curveParameterController() {
return &m_curveParameterController;
}
}