┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinview.cpp9
-rw-r--r--src/dolphinview.h6
2 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index abb0e9f86..58c33b250 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -909,6 +909,11 @@ void DolphinView::updateSortOrder(Qt::SortOrder order)
emit sortOrderChanged(order);
}
+void DolphinView::emitContentsMoved()
+{
+ emit contentsMoved(contentsX(), contentsY());
+}
+
void DolphinView::createView()
{
// delete current view
@@ -949,6 +954,10 @@ void DolphinView::createView()
connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
m_controller, SLOT(indicateSelectionChange()));
+ connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)),
+ this, SLOT(emitContentsMoved()));
+ connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)),
+ this, SLOT(emitContentsMoved()));
}
void DolphinView::selectAll(QItemSelectionModel::SelectionFlags flags)
diff --git a/src/dolphinview.h b/src/dolphinview.h
index 7d6e1288f..4bb254f42 100644
--- a/src/dolphinview.h
+++ b/src/dolphinview.h
@@ -457,6 +457,12 @@ private slots:
*/
void updateSortOrder(Qt::SortOrder order);
+ /**
+ * Emits the signal contentsMoved with the current coordinates
+ * of the viewport as parameters.
+ */
+ void emitContentsMoved();
+
private:
void startDirLister(const KUrl& url, bool reload = false);