diff options
| author | George Florea Bănuș <[email protected]> | 2024-05-08 08:11:56 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2024-05-08 08:11:56 +0000 |
| commit | 65d7ef184acf97e7881050df88ddace97bde4b93 (patch) | |
| tree | 867a15204eca1e88420e7e707389936ac0bed3c7 /src/views | |
| parent | d42fec2315f4b32f7dbc74a00155f7e6abff7738 (diff) | |
view: Add setting to trigger user set action with double click
Default action is select-all.
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 1 | ||||
| -rw-r--r-- | src/views/dolphinview.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 1bbcd5998..d42d9cfcd 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -119,6 +119,7 @@ DolphinView::DolphinView(const QUrl &url, QWidget *parent) KItemListController *controller = new KItemListController(m_model, m_view, this); const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1; controller->setAutoActivationDelay(delay); + connect(controller, &KItemListController::doubleClickViewBackground, this, &DolphinView::doubleClickViewBackground); // The EnlargeSmallPreviews setting can only be changed after the model // has been set in the view by KItemListController. diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index d4f82ae2f..b55e2ee9b 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -665,6 +665,12 @@ Q_SIGNALS: */ void currentDirectoryRemoved(); + /** + * Emitted when the view's background is double-clicked. + * Used to trigger an user configured action. + */ + void doubleClickViewBackground(Qt::MouseButton button); + protected: /** Changes the zoom level if Control is pressed during a wheel event. */ void wheelEvent(QWheelEvent *event) override; |
