mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 18:20:14 +01:00
[apps/shared] Divide tab table controller in 2 classes
Change-Id: I7bd9f7395c000ad69198ab123ffcfe1b661350aa
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace Shared {
|
||||
|
||||
TabTableController::TabTableController(Responder * parentResponder, KDCoordinate topMargin,
|
||||
TabTableController::TabTableController(Responder * parentResponder, TableViewDataSource * dataSource, KDCoordinate topMargin,
|
||||
KDCoordinate rightMargin, KDCoordinate bottomMargin, KDCoordinate leftMargin, SelectableTableViewDelegate * delegate, bool showIndicators) :
|
||||
ViewController(parentResponder),
|
||||
m_selectableTableView(SelectableTableView(this, this, 0, topMargin, rightMargin, bottomMargin, leftMargin,
|
||||
m_selectableTableView(SelectableTableView(this, dataSource, 0, topMargin, rightMargin, bottomMargin, leftMargin,
|
||||
delegate, showIndicators, true, Palette::WallScreenDark))
|
||||
{
|
||||
}
|
||||
@@ -18,22 +18,6 @@ void TabTableController::didBecomeFirstResponder() {
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
KDCoordinate TabTableController::cumulatedWidthFromIndex(int i) {
|
||||
return i*columnWidth(0);
|
||||
}
|
||||
|
||||
KDCoordinate TabTableController::cumulatedHeightFromIndex(int j) {
|
||||
return j*rowHeight(0);
|
||||
}
|
||||
|
||||
int TabTableController::indexFromCumulatedWidth(KDCoordinate offsetX) {
|
||||
return (offsetX-1) / columnWidth(0);
|
||||
}
|
||||
|
||||
int TabTableController::indexFromCumulatedHeight(KDCoordinate offsetY) {
|
||||
return (offsetY-1) / rowHeight(0);
|
||||
}
|
||||
|
||||
void TabTableController::viewWillAppear() {
|
||||
m_selectableTableView.reloadData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user