[apps/graph/list] make the class function cell inherits from even odd cell class

Change-Id: I8c786d76c7be726b2672713a5150dce5abb12061
This commit is contained in:
Émilie Feral
2016-10-07 13:57:23 +02:00
parent 72f9fa9bd5
commit c3524fa287
6 changed files with 15 additions and 51 deletions

View File

@@ -1,38 +1,18 @@
#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),
EvenOddCell(),
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());
}