Numworks Epsilon  1.4.1
Graphing Calculator Operating System
app.cpp
Go to the documentation of this file.
1 #include "app.h"
2 #include "stat_icon.h"
3 #include "../i18n.h"
4 
5 using namespace Shared;
6 
7 namespace Statistics {
8 
9 I18n::Message App::Descriptor::name() {
10  return I18n::Message::StatsApp;
11 }
12 
13 I18n::Message App::Descriptor::upperName() {
14  return I18n::Message::StatsAppCapital;
15 }
16 
18  return ImageStore::StatIcon;
19 }
20 
21 App::Snapshot::Snapshot() :
22  m_store(),
23  m_storeVersion(0),
24  m_barVersion(0),
25  m_rangeVersion(0),
26  m_selectedHistogramBarIndex(0),
27  m_selectedBoxQuantile(BoxView::Quantile::Min)
28 {
29 }
30 
32  return new App(container, this);
33 }
34 
36  m_store.deleteAllPairs();
37  m_storeVersion = 0;
38  m_barVersion = 0;
39  m_rangeVersion = 0;
40  m_selectedHistogramBarIndex = 0;
41  m_selectedBoxQuantile = BoxView::Quantile::Min;
42  setActiveTab(0);
43 }
44 
46  static Descriptor descriptor;
47  return &descriptor;
48 }
49 
51  return &m_store;
52 }
53 
55  return &m_storeVersion;
56 }
57 
59  return &m_barVersion;
60 }
61 
63  return &m_rangeVersion;
64 }
65 
67  return &m_selectedHistogramBarIndex;
68 }
69 
71  return &m_selectedBoxQuantile;
72 }
73 
75  TextFieldDelegateApp(container, snapshot, &m_tabViewController),
76  m_calculationController(&m_calculationAlternateEmptyViewController, &m_calculationHeader, snapshot->store()),
77  m_calculationAlternateEmptyViewController(&m_calculationHeader, &m_calculationController, &m_calculationController),
78  m_calculationHeader(&m_tabViewController, &m_calculationAlternateEmptyViewController, &m_calculationController),
79  m_boxController(&m_boxAlternateEmptyViewController, &m_boxHeader, snapshot->store(), snapshot->selectedBoxQuantile()),
80  m_boxAlternateEmptyViewController(&m_boxHeader, &m_boxController, &m_boxController),
81  m_boxHeader(&m_tabViewController, &m_boxAlternateEmptyViewController, &m_boxController),
82  m_histogramController(&m_histogramAlternateEmptyViewController, &m_histogramHeader, snapshot->store(), snapshot->storeVersion(), snapshot->barVersion(), snapshot->rangeVersion(), snapshot->selectedHistogramBarIndex()),
83  m_histogramAlternateEmptyViewController(&m_histogramHeader, &m_histogramController, &m_histogramController),
84  m_histogramHeader(&m_histogramStackViewController, &m_histogramAlternateEmptyViewController, &m_histogramController),
85  m_histogramStackViewController(&m_tabViewController, &m_histogramHeader),
86  m_storeController(&m_storeHeader, snapshot->store(), &m_storeHeader),
87  m_storeHeader(&m_storeStackViewController, &m_storeController, &m_storeController),
88  m_storeStackViewController(&m_tabViewController, &m_storeHeader),
89  m_tabViewController(&m_modalViewController, snapshot, &m_storeStackViewController, &m_histogramStackViewController, &m_boxHeader, &m_calculationHeader)
90 {
91 }
92 
93 }
int * selectedHistogramBarIndex()
Definition: app.cpp:66
Descriptor * descriptor() override
Definition: app.cpp:45
Snapshot * snapshot()
Definition: app.cpp:41
Definition: image.h:6
uint32_t * storeVersion()
Definition: app.cpp:54
App(Container *container, Snapshot *snapshot, ViewController *rootViewController, I18n::Message warningMessage=(I18n::Message) 0)
Definition: app.cpp:30
BoxView::Quantile * selectedBoxQuantile()
Definition: app.cpp:70
ModalViewController m_modalViewController
Definition: app.h:65
unsigned int uint32_t
Definition: stdint.h:6
uint32_t * barVersion()
Definition: app.cpp:58
App * unpack(Container *container) override
Definition: app.cpp:31
virtual const Image * icon()
Definition: app.cpp:15
virtual I18n::Message upperName()
Definition: app.cpp:11
uint32_t * rangeVersion()
Definition: app.cpp:62
virtual I18n::Message name()
Definition: app.cpp:7
void reset() override
Definition: app.cpp:35