[apps] add the stat apps in the container

Change-Id: I89338a609a80cc376a5bdfbe47dadbd3c0ae9f59
This commit is contained in:
Émilie Feral
2016-12-19 11:36:26 +01:00
parent 14b54c1358
commit 6dff4b9a07
3 changed files with 6 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ include apps/home/Makefile
include apps/graph/Makefile
include apps/probability/Makefile
include apps/calculation/Makefile
include apps/statistics/Makefile
#include apps/picview/Makefile
app_objs += $(addprefix apps/,\

View File

@@ -9,6 +9,7 @@ AppsContainer::AppsContainer() :
m_graphApp(this, &m_globalContext),
m_probabilityApp(this, &m_globalContext),
m_calculationApp(this, &m_globalContext),
m_statisticsApp(this, &m_globalContext),
m_globalContext(GlobalContext()),
m_variableBoxController(&m_globalContext)
{
@@ -24,6 +25,7 @@ App * AppsContainer::appAtIndex(int index) {
&m_graphApp,
&m_probabilityApp,
&m_calculationApp,
&m_statisticsApp
};
assert(sizeof(apps)/sizeof(apps[0]) == k_numberOfApps);
assert(index >= 0 && index < k_numberOfApps);

View File

@@ -5,6 +5,7 @@
#include "graph/app.h"
#include "probability/app.h"
#include "calculation/app.h"
#include "statistics/app.h"
#include "toolbox_controller.h"
#include "variable_box_controller.h"
@@ -24,11 +25,12 @@ public:
VariableBoxController * variableBoxController();
bool handleEvent(Ion::Events::Event event) override;
private:
static constexpr int k_numberOfApps = 4;
static constexpr int k_numberOfApps = 5;
Home::App m_homeApp;
Graph::App m_graphApp;
Probability::App m_probabilityApp;
Calculation::App m_calculationApp;
Statistics::App m_statisticsApp;
#if USE_PIC_VIEW_APP
PicViewApp m_picViewApp;
#endif