[WIP] Fix settings

This commit is contained in:
Quentin Guidée
2020-02-16 12:15:31 +01:00
parent 3e2585a211
commit be3829610a
2 changed files with 5 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ namespace Settings {
ExamModeController::ExamModeController(Responder * parentResponder) :
GenericSubController(parentResponder),
m_contentView(&m_selectableTableView),
m_ledColorCell(KDFont::LargeFont, KDFont::SmallFont),
m_cell{}
{
for (int i = 0; i < k_maxNumberOfCells; i++) {
@@ -57,6 +58,9 @@ int ExamModeController::numberOfRows() const {
HighlightCell * ExamModeController::reusableCell(int index, int type) {
assert(type == 0);
assert(index >= 0 && index < 3);
if (m_messageTreeModel->children(index)->label() == I18n::Message::LEDColor) {
return &m_ledColorCell;
}
return &m_cell[index];
}

View File

@@ -26,6 +26,7 @@ private:
static constexpr int k_maxNumberOfCells = 4;
SelectableViewWithMessages m_contentView;
MessageTableCell m_cell[k_maxNumberOfCells];
MessageTableCellWithChevronAndMessage m_ledColorCell;
};
}