-void DolphinView::setContentsPosition(int x, int y)
-{
- QAbstractItemView* view = m_viewAccessor.itemView();
- Q_ASSERT(view != 0);
- view->horizontalScrollBar()->setValue(x);
- view->verticalScrollBar()->setValue(y);
-
- m_loadingDirectory = false;
-}
-
-void DolphinView::setRestoredContentsPosition(const QPoint& pos)
-{
- // TODO: This function is called by DolphinViewContainer.
- // If it makes use of DolphinView::restoreState(...) to restore the
- // view state in KDE 4.5, this function can be removed.
- m_restoredContentsPosition = pos;
-}
-
-QPoint DolphinView::contentsPosition() const
-{
- // TODO: If DolphinViewContainer uses DolphinView::saveState(...) to save the
- // view state in KDE 4.5, this code can be moved to DolphinView::saveState.
- QAbstractItemView* view = m_viewAccessor.itemView();
- Q_ASSERT(view != 0);
- const int x = view->horizontalScrollBar()->value();
- const int y = view->verticalScrollBar()->value();
- return QPoint(x, y);
-}
-