Files
Upsilon/escher/src/float_table_view_cell.cpp
Émilie Feral b8b52e2d73 [escher] create a class float table view cell
Change-Id: Ie0d0e701d60ccdd492760bcdc5857470fcd1a255
2016-10-14 12:06:09 +02:00

26 lines
663 B
C++

#include <escher/float_table_view_cell.h>
FloatTableViewCell::FloatTableViewCell(char * label) :
TableViewCell(label),
m_contentView(FloatView())
{
}
void FloatTableViewCell::setFloat(float f) {
m_contentView.setFloat(f);
}
char * FloatTableViewCell::stringFromFloat() {
return m_contentView.buffer();
}
View * FloatTableViewCell::contentView() const {
return (View *)&m_contentView;
}
void FloatTableViewCell::setHighlighted(bool highlight) {
TableViewCell::setHighlighted(highlight);
KDColor backgroundColor = highlight? Palette::FocusCellBackgroundColor : Palette::CellBackgroundColor;
m_contentView.setBackgroundColor(backgroundColor);
}