6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef STATISTICS_HISTOGRAM_CONTROLLER_H
#define STATISTICS_HISTOGRAM_CONTROLLER_H
#include <escher.h>
#include "store.h"
#include "multiple_data_view_controller.h"
#include "multiple_histograms_view.h"
namespace Statistics {
class HistogramController : public MultipleDataViewController, public ButtonRowDelegate {
public:
HistogramController(Responder * parentResponder, ButtonRowController * header, Store * store, uint32_t * m_storeVersion, uint32_t * m_barVersion, uint32_t * m_rangeVersion, int * m_selectedBarIndex, int * selectedSeriesIndex);
HistogramParameterController * histogramParameterController() { return &m_histogramParameterController; }
void setCurrentDrawnSeries(int series);
StackViewController * stackController();
// ViewController
const char * title() override;
MultipleDataView * multipleDataView() override { return &m_view; }
// Responder
bool handleEvent(Ion::Events::Event event) override;
void didBecomeFirstResponder() override;
void willExitResponderChain(Responder * nextFirstResponder) override;
private:
constexpr static int k_maxNumberOfBarsPerWindow = 100;
constexpr static int k_maxIntervalLegendLength = 33;
constexpr static int k_maxLegendLength = 13;
constexpr static int k_maxNumberOfCharacters = 30;
Responder * tabController() const override;
void reloadBannerView() override;
void initRangeParameters();
void initYRangeParameters(int series);
void initBarParameters();
void initBarSelection();
// return true if the window has scrolled
bool moveSelectionHorizontally(int deltaIndex) override;
MultipleHistogramsView m_view;
uint32_t * m_storeVersion;
uint32_t * m_barVersion;
uint32_t * m_rangeVersion;
HistogramParameterController m_histogramParameterController;
};
}
#endif
|