Files
Upsilon/apps/graph/graph_app.cpp
Romain Goyet 748fac0de8 [apps/home] Display app name and icon
Change-Id: Ia09827dd1fa027cee80145c0d2dab5a29cd51d11
2016-10-03 14:15:16 +02:00

25 lines
884 B
C++

#include "graph_app.h"
#include "graph_icon.h"
GraphApp::GraphApp() :
App("Graph", ImageStore::GraphIcon),
m_functionStore(Graph::FunctionStore()),
m_listController(ListController(nullptr, &m_functionStore)),
m_listStackViewController(StackViewController(&m_tabViewController, &m_listController)),
m_graphController(GraphController(nullptr, &m_functionStore)),
m_tabViewController(this, &m_listStackViewController, &m_graphController)
{
Graph::Function * function = m_functionStore.addEmptyFunction();
function->setContent("(x-1)*(x+1)*x");
function = m_functionStore.addEmptyFunction();
function->setContent("x*x");
function = m_functionStore.addEmptyFunction();
function->setContent("3");
function = m_functionStore.addEmptyFunction();
function->setContent("x*x*x");
}
ViewController * GraphApp::rootViewController() {
return &m_tabViewController;
}