┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp18
-rw-r--r--src/views/dolphinview.h5
2 files changed, 23 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index f102e9acb..2b4970eeb 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -134,6 +134,9 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
connect(controller, &KItemListController::escapePressed, this, &DolphinView::stopLoading);
connect(controller, &KItemListController::modelChanged, this, &DolphinView::slotModelChanged);
connect(controller, &KItemListController::selectedItemTextPressed, this, &DolphinView::slotSelectedItemTextPressed);
+ connect(controller, &KItemListController::increaseZoom, this, &DolphinView::slotIncreaseZoom);
+ connect(controller, &KItemListController::decreaseZoom, this, &DolphinView::slotDecreaseZoom);
+ connect(controller, &KItemListController::swipeUp, this, &DolphinView::slotSwipeUp);
connect(m_model, &KFileItemModel::directoryLoadingStarted, this, &DolphinView::slotDirectoryLoadingStarted);
connect(m_model, &KFileItemModel::directoryLoadingCompleted, this, &DolphinView::slotDirectoryLoadingCompleted);
@@ -1954,3 +1957,18 @@ void DolphinView::copyPathToClipboard()
}
clipboard->setText(path);
}
+
+void DolphinView::slotIncreaseZoom()
+{
+ setZoomLevel(zoomLevel() + 1);
+}
+
+void DolphinView::slotDecreaseZoom()
+{
+ setZoomLevel(zoomLevel() - 1);
+}
+
+void DolphinView::slotSwipeUp()
+{
+ emit goUpRequested();
+}
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index 50a88e936..1d0ebe0fe 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -582,6 +582,8 @@ signals:
*/
void urlActivated(const QUrl& url);
+ void goUpRequested();
+
protected:
/** Changes the zoom level if Control is pressed during a wheel event. */
void wheelEvent(QWheelEvent* event) override;
@@ -611,6 +613,9 @@ private slots:
void slotRenameDialogRenamingFinished(const QList<QUrl>& urls);
void slotSelectedItemTextPressed(int index);
void slotCopyingDone(KIO::Job *, const QUrl &, const QUrl &to);
+ void slotIncreaseZoom();
+ void slotDecreaseZoom();
+ void slotSwipeUp();
/*
* Is called when new items get pasted or dropped.