[apps/graph/list] Simplify funciton expression cell to be used by

sequence

Change-Id: I12f5e15c10544294292866b395066bc675b26067
This commit is contained in:
Émilie Feral
2017-02-16 10:49:50 +01:00
parent f2512b2968
commit f605963588
4 changed files with 24 additions and 26 deletions

View File

@@ -1,20 +1,21 @@
#include "function_expression_cell.h"
#include <assert.h>
using namespace Poincare;
namespace Graph {
FunctionExpressionCell::FunctionExpressionCell() :
EvenOddCell(),
m_function(nullptr),
m_expressionView(ExpressionView())
{
}
void FunctionExpressionCell::setFunction(CartesianFunction * f) {
m_function = f;
m_expressionView.setExpression(m_function->layout());
bool active = m_function->isActive();
KDColor textColor = active ? KDColorBlack : Palette::GreyDark;
void FunctionExpressionCell::setExpression(ExpressionLayout * expressionLayout) {
m_expressionView.setExpression(expressionLayout);
}
void FunctionExpressionCell::setTextColor(KDColor textColor) {
m_expressionView.setTextColor(textColor);
}
@@ -28,10 +29,6 @@ void FunctionExpressionCell::setHighlighted(bool highlight) {
m_expressionView.setBackgroundColor(backgroundColor());
}
CartesianFunction * FunctionExpressionCell::function() {
return m_function;
}
int FunctionExpressionCell::numberOfSubviews() const {
return 1;
}