]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinviewactionhandler.h
GIT_SILENT Update Appstream for new release
[dolphin.git] / src / views / dolphinviewactionhandler.h
index 23b4e5f1ada5114b69e2d11f6e8ee82c524a5148..8631936d9c9ddda11364c51ccc7f4aa64ce3953b 100644 (file)
@@ -10,6 +10,7 @@
 #define DOLPHINVIEWACTIONHANDLER_H
 
 #include "dolphin_export.h"
+#include "selectionmode/bottombar.h"
 #include "views/dolphinview.h"
 
 #include <QObject>
@@ -19,6 +20,10 @@ class QAction;
 class QActionGroup;
 class DolphinView;
 class KActionCollection;
+class KFileItemList;
+namespace SelectionMode {
+    class ActionTextHelper;
+}
 
 /**
  * @short Handles all actions for DolphinView
@@ -39,7 +44,7 @@ class DOLPHIN_EXPORT DolphinViewActionHandler : public QObject
     Q_OBJECT
 
 public:
-    explicit DolphinViewActionHandler(KActionCollection* collection, QObject* parent);
+    explicit DolphinViewActionHandler(KActionCollection* collection, SelectionMode::ActionTextHelper* actionTextHelper, QObject* parent);
 
     /**
      * Sets the view that this action handler should work on.
@@ -82,6 +87,9 @@ Q_SIGNALS:
      */
     void createDirectoryTriggered();
 
+    /** Used to request either entering or leaving of selection mode */
+    void selectionModeChangeTriggered(bool enabled, SelectionMode::BottomBar::Contents bottomBarContents = SelectionMode::BottomBar::Contents::GeneralContents);
+
 private Q_SLOTS:
     /**
      * Emitted when the user requested a change of view mode
@@ -135,6 +143,16 @@ private Q_SLOTS:
      */
     void slotSortFoldersFirstChanged(bool foldersFirst);
 
+    /**
+     * Switches between showing hidden files last or not.
+     */
+    void toggleSortHiddenLast();
+
+    /**
+     * Updates the state of the 'Sort Hidden Last' action.
+     */
+    void slotSortHiddenLastChanged(bool hiddenLast);
+
     /**
      * Updates the state of the 'Sort by' actions.
      */
@@ -211,12 +229,19 @@ private Q_SLOTS:
      */
     void slotCopyPath();
 
+    /**
+     * Changes the name of the menu that contains basic actions like "Copy", "Rename", ...
+     * The name is changed to something like "Actions for 3 Selected Items" to be extra
+     * explicit of how these basic actions are used.
+     */
+    void slotSelectionChanged(const KFileItemList& selection);
+
 private:
     /**
      * Create all the actions.
      * This is called only once (by the constructor)
      */
-    void createActions();
+    void createActions(SelectionMode::ActionTextHelper *actionTextHelper);
 
     /**
      * Creates an action-group out of all roles from KFileItemModel.