]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
Add Selection Mode
[dolphin.git] / src / dolphinmainwindow.h
index 6e775c5cc3e71d38f4ac3c058b5f569fa9959c30..0c9c762d63593271d16288e26013ea5933647736 100644 (file)
 #define DOLPHIN_MAINWINDOW_H
 
 #include "dolphintabwidget.h"
-#include <config-baloo.h>
+#include "selectionmode/selectionmodebottombar.h"
+#include "config-dolphin.h"
 #include <KFileItemActions>
 #include <kio/fileundomanager.h>
 #include <kxmlguiwindow.h>
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     #include "panels/information/informationpanel.h"
 #endif
 
@@ -138,6 +139,8 @@ public Q_SLOTS:
      */
     void activateWindow();
 
+    bool isActiveWindow();
+
     /**
      * Determines if a URL is open in any tab.
      * @note Use of QString instead of QUrl is required to be callable via DBus.
@@ -147,6 +150,15 @@ public Q_SLOTS:
      */
     bool isUrlOpen(const QString &url);
 
+    /**
+     * Determines if a URL or it's parent is open in any tab.
+     * @note Use of QString instead of QUrl is required to be callable via DBus.
+     *
+     * @param url URL to look for
+     * @returns true if url or it's parent is currently open in a tab, false otherwise.
+     */
+    bool isUrlOrParentOpen(const QString &url);
+
 
     /**
      * Pastes the clipboard data into the currently selected folder
@@ -302,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();
 
@@ -322,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();
 
@@ -331,6 +352,8 @@ private Q_SLOTS:
     void enableStopAction();
     void disableStopAction();
 
+    void toggleSelectionMode();
+
     void showFilterBar();
     void toggleFilterBar();
 
@@ -699,6 +722,7 @@ private:
     QMenu m_searchTools;
     KFileItemActions m_fileItemActions;
 
+    friend class DolphinMainWindowTest;
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const