]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
view: Add setting to trigger user set action with double click
[dolphin.git] / src / dolphinmainwindow.h
index 9a1582c1fef903b949f9a84ec614e016db4c22e2..5f96ca3b621fbb04ea7cabbd870513c6f39df468 100644 (file)
@@ -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<void> *m_sessionSaveWatcher;
     bool m_sessionSaveScheduled;
 
+    KIO::CommandLauncherJob *m_job;
+
     friend class DolphinMainWindowTest;
 };