[apps/*/values_controller] Move m_setIntervalButton to derived classes

This commit is contained in:
Ruben Dashyan
2019-09-02 16:32:05 +02:00
parent 634e812806
commit dd0be4471c
6 changed files with 24 additions and 16 deletions

View File

@@ -17,13 +17,7 @@ ValuesController::ValuesController(Responder * parentResponder, InputEventHandle
m_selectableTableView(this),
m_abscissaTitleCell(),
m_abscissaCells{},
m_abscissaParameterController(this),
m_setIntervalButton(this, I18n::Message::IntervalSet, Invocation([](void * context, void * sender) {
ValuesController * valuesController = (ValuesController *) context;
StackViewController * stack = ((StackViewController *)valuesController->stackController());
stack->push(valuesController->intervalParameterController());
return true;
}, this), k_font)
m_abscissaParameterController(this)
{
m_selectableTableView.setVerticalCellOverlap(0);
m_selectableTableView.setTopMargin(k_topMargin);
@@ -122,10 +116,6 @@ int ValuesController::numberOfButtons(ButtonRowController::Position) const {
return 1;
}
Button * ValuesController::buttonAtIndex(int index, ButtonRowController::Position position) const {
return (Button *)&m_setIntervalButton;
}
void ValuesController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
willDisplayCellAtLocationWithDisplayMode(cell, i, j, Preferences::sharedPreferences()->displayMode());
// The cell is not a title cell and not editable