Files
Upsilon/apps/statistics/box_view.h
Émilie Feral 23026b6718 [apps/shared] Namespace shared
Change-Id: I6dec7ce900bb4e801a25c567fe5e242cb744cf29
2017-02-13 17:15:06 +01:00

39 lines
902 B
C++

#ifndef STATISTICS_BOX_VIEW_H
#define STATISTICS_BOX_VIEW_H
#include <escher.h>
#include "store.h"
#include "box_range.h"
#include "../constant.h"
#include "../shared/curve_view.h"
namespace Statistics {
class BoxView : public Shared::CurveView {
public:
enum class Quantile : int {
None = -1,
Min = 0,
FirstQuartile = 1,
Median = 2,
ThirdQuartile = 3,
Max = 4
};
BoxView(Store * store, Shared::BannerView * bannerView);
void reload() override;
Quantile selectedQuantile();
bool selectQuantile(int selectedQuantile);
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
char * label(Axis axis, int index) const override;
Store * m_store;
BoxRange m_boxRange;
char m_labels[k_maxNumberOfXLabels][Poincare::Complex::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
Quantile m_selectedQuantile;
};
}
#endif