diff --git a/escher/include/escher/table_view.h b/escher/include/escher/table_view.h index 23573abac..b729e48bc 100644 --- a/escher/include/escher/table_view.h +++ b/escher/include/escher/table_view.h @@ -17,6 +17,7 @@ protected: #if ESCHER_VIEW_LOGGING const char * className() const override; #endif + TableViewDataSource * dataSource(); private: class ContentView : public View { public: @@ -25,6 +26,7 @@ private: void scrollToCell(int i, int j) const; TableViewCell * cellAtLocation(int i, int j); void resizeToFitContent(); + TableViewDataSource * dataSource(); protected: #if ESCHER_VIEW_LOGGING const char * className() const override; diff --git a/escher/src/table_view.cpp b/escher/src/table_view.cpp index 204d4f65c..b11230f15 100644 --- a/escher/src/table_view.cpp +++ b/escher/src/table_view.cpp @@ -14,6 +14,10 @@ TableView::TableView(TableViewDataSource * dataSource, KDCoordinate topMargin, K { } +TableViewDataSource * TableView::dataSource() { + return m_contentView.dataSource(); +} + // This method computes the minimal scrolling needed to properly display the // requested cell. void TableView::scrollToCell(int i, int j) { @@ -52,6 +56,10 @@ TableView::ContentView::ContentView(TableView * tableView, TableViewDataSource * { } +TableViewDataSource * TableView::ContentView::dataSource() { + return m_dataSource; +} + KDCoordinate TableView::ContentView::columnWidth(int i) const { int columnWidth = m_dataSource->columnWidth(i); columnWidth = columnWidth ? columnWidth : m_tableView->maxContentWidthDisplayableWithoutScrolling();