Blame view

build3/apps/shared/regular_table_view_data_source.cpp 518 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  #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);
  }
  
  }