X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8a0003bfbcc87068737ab1e2b94ae7b2ba73eca1..40cc5f665d:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 269072022..e7355e3ed 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -10,12 +10,13 @@ #define DOLPHIN_MAINWINDOW_H #include "dolphintabwidget.h" -#include +#include "selectionmode/bottombar.h" +#include "config-dolphin.h" #include #include #include -#ifdef HAVE_BALOO +#if HAVE_BALOO #include "panels/information/informationpanel.h" #endif @@ -38,7 +39,6 @@ class KFileItem; class KFileItemList; class KJob; class KNewFileMenu; -class KHelpMenu; class KToolBarPopupAction; class QToolButton; class PlacesPanel; @@ -47,6 +47,9 @@ class TerminalPanel; namespace KIO { class OpenUrlJob; } +namespace SelectionMode { + class ActionTextHelper; +} /** * @short Main window for Dolphin. @@ -138,6 +141,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 +152,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 @@ -233,11 +247,6 @@ protected: /** @see KMainWindow::readProperties() */ void readProperties(const KConfigGroup& group) override; - /** Handles QWhatsThisClickedEvent and passes all others on. */ - bool event(QEvent* event) override; - /** Handles QWhatsThisClickedEvent and passes all others on. */ - bool eventFilter(QObject*, QEvent*) override; - /** Sets a sane initial window size **/ QSize sizeHint() const override; @@ -302,6 +311,9 @@ private Q_SLOTS: */ void updatePasteAction(); + /** Calls DolphinViewContainer::setSelectionMode() for m_activeViewContainer. */ + void slotSetSelectionMode(bool enabled, SelectionMode::BottomBar::Contents bottomBarContents); + /** Selects all items from the active view. */ void selectAll(); @@ -322,6 +334,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 +349,8 @@ private Q_SLOTS: void enableStopAction(); void disableStopAction(); + void toggleSelectionMode(); + void showFilterBar(); void toggleFilterBar(); @@ -674,7 +694,6 @@ private: }; KNewFileMenu* m_newFileMenu; - KHelpMenu* m_helpMenu; DolphinTabWidget* m_tabWidget; DolphinViewContainer* m_activeViewContainer; @@ -682,10 +701,7 @@ private: DolphinRemoteEncoding* m_remoteEncoding; QPointer m_settingsDialog; DolphinBookmarkHandler* m_bookmarkHandler; - - // Members for the toolbar menu that is shown when the menubar is hidden: - QToolButton* m_controlButton; - QTimer* m_updateToolBarTimer; + SelectionMode::ActionTextHelper* m_actionTextHelper; KIO::OpenUrlJob *m_lastHandleUrlOpenJob; @@ -699,6 +715,7 @@ private: QMenu m_searchTools; KFileItemActions m_fileItemActions; + friend class DolphinMainWindowTest; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const