[poincare][apps] Make preferences a const object accessible from

anywhere (poincare and apps)

Change-Id: I49cc6bf940d1efeb6b153daac949ffcb23999a8d
This commit is contained in:
Émilie Feral
2017-02-14 15:34:41 +01:00
parent 7382a09b86
commit e5e9f7cc41
115 changed files with 691 additions and 565 deletions

View File

@@ -72,8 +72,7 @@ void BoxController::reloadBannerView() {
CalculPointer calculationMethods[5] = {&Store::minValue, &Store::firstQuartile, &Store::median, &Store::thirdQuartile,
&Store::maxValue};
float calculation = (m_store->*calculationMethods[(int)m_view.selectedQuantile()])();
AppsContainer * container = ((App *)app())->container();
Complex::convertFloatToText(calculation, buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, container->preferences()->displayMode());
Complex::convertFloatToText(calculation, buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
m_boxBannerView.setLegendAtIndex(buffer, 1);
}