mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 16:50:50 +01:00
[apps/shared] Divide tab table controller in 2 classes
Change-Id: I7bd9f7395c000ad69198ab123ffcfe1b661350aa
This commit is contained in:
22
apps/shared/regular_table_view_data_source.cpp
Normal file
22
apps/shared/regular_table_view_data_source.cpp
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user