Numworks Epsilon  1.4.1
Graphing Calculator Operating System
box_view.h
Go to the documentation of this file.
1 #ifndef STATISTICS_BOX_VIEW_H
2 #define STATISTICS_BOX_VIEW_H
3 
4 #include <escher.h>
5 #include "store.h"
6 #include "box_range.h"
7 #include "../constant.h"
8 #include "../shared/curve_view.h"
9 
10 namespace Statistics {
11 
12 class BoxView : public Shared::CurveView {
13 public:
14  enum class Quantile : int {
15  None = -1,
16  Min = 0,
17  FirstQuartile = 1,
18  Median = 2,
19  ThirdQuartile = 3,
20  Max = 4
21  };
22  BoxView(Store * store, Shared::BannerView * bannerView, Quantile * selectedQuantile);
23  void reload() override;
26  void drawRect(KDContext * ctx, KDRect rect) const override;
27 private:
28  char * label(Axis axis, int index) const override;
29  Store * m_store;
30  BoxRange m_boxRange;
31  char m_labels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
32  Quantile * m_selectedQuantile;
33 };
34 
35 }
36 
37 
38 #endif
void reload() override
Definition: box_view.cpp:18
static constexpr int ShortNumberOfSignificantDigits
Definition: constant.h:8
BoxView(Store *store, Shared::BannerView *bannerView, Quantile *selectedQuantile)
Definition: box_view.cpp:9
static constexpr int k_maxNumberOfXLabels
Definition: curve_view.h:37
Definition: rect.h:26
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: box_view.cpp:46
Quantile selectedQuantile()
Definition: box_view.cpp:30
bool selectQuantile(int selectedQuantile)
Definition: box_view.cpp:34