Files
Upsilon/apps/shared/regular_table_view_data_source.cpp
Émilie Feral 7a54fa0ea0 [apps/shared] Divide tab table controller in 2 classes
Change-Id: I7bd9f7395c000ad69198ab123ffcfe1b661350aa
2017-03-16 15:12:13 +01:00

23 lines
518 B
C++

#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);
}
}