[apps/shared] Divide tab table controller in 2 classes

Change-Id: I7bd9f7395c000ad69198ab123ffcfe1b661350aa
This commit is contained in:
Émilie Feral
2017-03-16 14:00:03 +01:00
parent 8daab4c57b
commit 7a54fa0ea0
11 changed files with 61 additions and 31 deletions

View File

@@ -0,0 +1,22 @@
#include "regular_table_view_data_source.h"
namespace Shared {
KDCoordinate RegularTableViewDataSource::cumulatedWidthFromIndex(int i) {
return i*columnWidth(0);
}
KDCoordinate RegularTableViewDataSource::cumulatedHeightFromIndex(int j) {
return j*rowHeight(0);
}
int RegularTableViewDataSource::indexFromCumulatedWidth(KDCoordinate offsetX) {
return (offsetX-1) / columnWidth(0);
}
int RegularTableViewDataSource::indexFromCumulatedHeight(KDCoordinate offsetY) {
return (offsetY-1) / rowHeight(0);
}
}