Files
Upsilon/apps/graph/list/function_cell.cpp
Émilie Feral a29be020f5 [apps/graph] add a method in function expression view to mark a cell as dirty
Change-Id: Iee820055f36f18a31af5bd69097557e9718c6425
2016-10-04 12:26:30 +02:00

39 lines
881 B
C++

#include "function_cell.h"
constexpr KDColor FunctionCell::k_evenLineBackgroundColor;
constexpr KDColor FunctionCell::k_oddLineBackgroundColor;
constexpr KDColor FunctionCell::k_selectedLineBackgroundColor;
constexpr KDColor FunctionCell::k_desactiveTextColor;
FunctionCell::FunctionCell() :
ChildlessView(),
m_highlighted(false),
m_even(false),
m_function(nullptr)
{
}
void FunctionCell::setEven(bool even) {
m_even = even;
markRectAsDirty(bounds());
}
void FunctionCell::setFunction(Graph::Function * f) {
m_function = f;
markRectAsDirty(bounds());
}
void FunctionCell::setHighlighted(bool highlight) {
m_highlighted = highlight;
markRectAsDirty(bounds());
}
Graph::Function * FunctionCell::function() {
return m_function;
}
void FunctionCell::reloadCell() {
//TODO: optimize for function_name_view (make it virtual)
markRectAsDirty(bounds());
}