mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[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.
This commit is contained in:
committed by
Émilie Feral
parent
e32419ce63
commit
d8f97d62a4
@@ -55,10 +55,6 @@ void FunctionGraphController::selectFunctionWithCursor(int functionIndex) {
|
||||
*m_indexFunctionSelectedByCursor = functionIndex;
|
||||
}
|
||||
|
||||
float FunctionGraphController::cursorBottomMarginRatio() {
|
||||
return (curveView()->cursorView()->minimalSizeForOptimalDisplay().height()/2+estimatedBannerHeight())/k_viewHeight;
|
||||
}
|
||||
|
||||
void FunctionGraphController::reloadBannerView() {
|
||||
if (functionStore()->numberOfActiveFunctions() == 0) {
|
||||
return;
|
||||
@@ -67,14 +63,6 @@ void FunctionGraphController::reloadBannerView() {
|
||||
reloadBannerViewForCursorOnFunction(m_cursor, record, functionStore(), functionStore()->symbol());
|
||||
}
|
||||
|
||||
float FunctionGraphController::displayBottomMarginRatio() {
|
||||
return (curveView()->cursorView()->minimalSizeForOptimalDisplay().height() + 2 + estimatedBannerHeight()) / k_viewHeight;
|
||||
}
|
||||
|
||||
float FunctionGraphController::estimatedBannerHeight() const {
|
||||
return BannerView::HeightGivenNumberOfLines(estimatedBannerNumberOfLines());
|
||||
}
|
||||
|
||||
InteractiveCurveViewRangeDelegate::Range FunctionGraphController::computeYRange(InteractiveCurveViewRange * interactiveCurveViewRange) {
|
||||
FunctionApp * myApp = static_cast<FunctionApp *>(app());
|
||||
float min = FLT_MAX;
|
||||
|
||||
Reference in New Issue
Block a user