[escher] delete list view

Change-Id: Ia3e2aa2613479e2fcc7f12e7de3b7e8b8f2cff68
This commit is contained in:
Émilie Feral
2016-10-25 11:59:56 +02:00
parent e7b3cb8df6
commit a29c46f662
18 changed files with 49 additions and 95 deletions

View File

@@ -8,7 +8,7 @@ DerivativeParameterController::DerivativeParameterController(Responder * parentR
m_pageTitle("Colonne f'(x)"),
m_hideColumn(ListViewCell((char*)"Masquer la colonne de la derivee")),
m_copyColumn(ListViewCell((char*)"Copier la colonne dans une liste")),
m_listView(ListView(this,Metric::TopMargin, Metric::RightMargin,
m_tableView(TableView(this,Metric::TopMargin, Metric::RightMargin,
Metric::BottomMargin, Metric::LeftMargin)),
m_activeCell(0),
m_function(nullptr)
@@ -20,7 +20,7 @@ const char * DerivativeParameterController::title() const {
}
View * DerivativeParameterController::view() {
return &m_listView;
return &m_tableView;
}
void DerivativeParameterController::setFunction(Function * function) {
@@ -34,7 +34,7 @@ void DerivativeParameterController::setFunction(Function * function) {
}
void DerivativeParameterController::didBecomeFirstResponder() {
m_listView.reloadData();
m_tableView.reloadData();
setActiveCell(m_activeCell);
}
@@ -42,12 +42,12 @@ void DerivativeParameterController::setActiveCell(int index) {
if (index < 0 || index >= k_totalNumberOfCell) {
return;
}
ListViewCell * previousCell = (ListViewCell *)(m_listView.cellAtIndex(m_activeCell));
ListViewCell * previousCell = (ListViewCell *)(m_tableView.cellAtLocation(0, m_activeCell));
previousCell->setHighlighted(false);
m_activeCell = index;
m_listView.scrollToRow(index);
ListViewCell * cell = (ListViewCell *)(m_listView.cellAtIndex(index));
m_tableView.scrollToCell(0, index);
ListViewCell * cell = (ListViewCell *)(m_tableView.cellAtLocation(0, index));
cell->setHighlighted(true);
}