Files
Upsilon/apps/calculation/expression_field.cpp
Léa Saviot ad65ce2617 [apps/calculation] Removed overrided ExpressionField constructor.
Change-Id: Id893bb89c9f1282b7fc9e94acc0324a66c749a0c
2018-04-23 11:34:01 +02:00

26 lines
609 B
C++

#include "expression_field.h"
namespace Calculation {
bool ExpressionField::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::Back) {
return false;
}
if (event == Ion::Events::Ans) {
insertText("ans");
return true;
}
if (isEditing() && isEmpty() &&
(event == Ion::Events::Multiplication ||
event == Ion::Events::Plus ||
event == Ion::Events::Power ||
event == Ion::Events::Square ||
event == Ion::Events::Division ||
event == Ion::Events::Sto)) {
insertText("ans");
}
return(::ExpressionField::handleEvent(event));
}
}