Files
Upsilon/apps/calculation/app.cpp
Émilie Feral 4348bd7bae [apps] Implement a reset in apps (clear memory)
Change-Id: I158d5db92196ccfd5400a95de16ee4804e426e65
2017-04-07 15:36:03 +02:00

28 lines
810 B
C++

#include "app.h"
#include "calculation_icon.h"
#include "../i18n.h"
using namespace Poincare;
using namespace Shared;
namespace Calculation {
App::App(Container * container, Context * context) :
TextFieldDelegateApp(container, &m_editExpressionController, I18n::Message::CalculApp, I18n::Message::CalculAppCapital, ImageStore::CalculationIcon),
m_localContext(LocalContext((GlobalContext *)context, &m_calculationStore)),
m_calculationStore(CalculationStore()),
m_historyController(HistoryController(&m_editExpressionController, &m_calculationStore)),
m_editExpressionController(EditExpressionController(&m_modalViewController, &m_historyController, &m_calculationStore))
{
}
Context * App::localContext() {
return &m_localContext;
}
void App::reset() {
m_calculationStore.deleteAll();
}
}