From 3b7c05b385dc56fbc0b9ffdd332f8d30e7624d0c Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Sun, 12 Sep 2021 15:33:39 +0200 Subject: Add Selection Mode The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202 --- src/dolphinmainwindow.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index b86b6b4f3..0c9c762d6 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -10,6 +10,7 @@ #define DOLPHIN_MAINWINDOW_H #include "dolphintabwidget.h" +#include "selectionmode/selectionmodebottombar.h" #include "config-dolphin.h" #include #include @@ -313,6 +314,9 @@ private Q_SLOTS: */ void updatePasteAction(); + /** Calls DolphinViewContainer::setSelectionMode() for m_activeViewContainer. */ + void slotSetSelectionMode(bool enabled, SelectionModeBottomBar::Contents bottomBarContents); + /** Selects all items from the active view. */ void selectAll(); @@ -333,6 +337,12 @@ private Q_SLOTS: /** Dedicated action to open the stash:/ ioslave in split view. */ void toggleSplitStash(); + /** Copies all selected items to the inactive view. */ + void copyToInactiveSplitView(); + + /** Moves all selected items to the inactive view. */ + void moveToInactiveSplitView(); + /** Reloads the currently active view. */ void reloadView(); @@ -342,6 +352,8 @@ private Q_SLOTS: void enableStopAction(); void disableStopAction(); + void toggleSelectionMode(); + void showFilterBar(); void toggleFilterBar(); -- cgit v1.3