From 65d7ef184acf97e7881050df88ddace97bde4b93 Mon Sep 17 00:00:00 2001 From: George Florea Bănuș Date: Wed, 8 May 2024 08:11:56 +0000 Subject: view: Add setting to trigger user set action with double click Default action is select-all. --- src/dolphinmainwindow.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 9a1582c1f..5f96ca3b6 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -47,9 +47,13 @@ class QToolButton; class PlacesPanel; class TerminalPanel; +/** Used to identify that a custom command should be triggered on a view background double-click.*/ +constexpr QLatin1String customCommand{"CUSTOM_COMMAND"}; + namespace KIO { class OpenUrlJob; +class CommandLauncherJob; } namespace SelectionMode { @@ -131,6 +135,11 @@ public: bool isInformationPanelEnabled() const; bool isSplitViewEnabledInCurrentTab() const; + /** + * Activates a user set action when double clicking the view's background. + */ + void slotDoubleClickViewBackground(Qt::MouseButton button); + public Q_SLOTS: /** * Opens each directory in \p dirs in a separate tab. If \a splitView is set, @@ -748,6 +757,8 @@ private: QFutureWatcher *m_sessionSaveWatcher; bool m_sessionSaveScheduled; + KIO::CommandLauncherJob *m_job; + friend class DolphinMainWindowTest; }; -- cgit v1.3