mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 22:30:30 +01:00
[apps] enable node navigation controller to use different cell types
(implemented by its subclasses) Change-Id: I44ef187c0142f049c710a4515c3dc0edf5573927
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
NodeListViewController::NodeListViewController(Responder * parentResponder) :
|
||||
ViewController(parentResponder),
|
||||
NodeListViewController::NodeListViewController(NodeNavigationController * parent) :
|
||||
ViewController(parent),
|
||||
m_nodeNavigationController(parent),
|
||||
m_selectableTableView(SelectableTableView(this, this)),
|
||||
m_nodeModel(nullptr),
|
||||
m_firstSelectedRow(0)
|
||||
@@ -63,9 +64,9 @@ TableViewCell * NodeListViewController::reusableCell(int index, int type) {
|
||||
assert(index >= 0);
|
||||
assert(index < k_maxNumberOfDisplayedRows);
|
||||
if (type == 0) {
|
||||
return &m_commandCells[index];
|
||||
return m_nodeNavigationController->leafCellAtIndex(index);
|
||||
}
|
||||
return &m_menuCells[index];
|
||||
return m_nodeNavigationController->nodeCellAtIndex(index);
|
||||
}
|
||||
|
||||
int NodeListViewController::reusableCellCount(int type) {
|
||||
@@ -74,8 +75,7 @@ int NodeListViewController::reusableCellCount(int type) {
|
||||
}
|
||||
|
||||
void NodeListViewController::willDisplayCellForIndex(TableViewCell * cell, int index) {
|
||||
MenuListCell * myCell = (MenuListCell *)cell;
|
||||
myCell->setText(m_nodeModel->children(index)->label());
|
||||
m_nodeNavigationController->willDisplayCellForIndex(cell, index);
|
||||
}
|
||||
|
||||
KDCoordinate NodeListViewController::rowHeight(int j) {
|
||||
|
||||
Reference in New Issue
Block a user