#define DOLPHIN_MAINWINDOW_H
#include "dolphintabwidget.h"
-#include <config-baloo.h>
+#include "selectionmode/bottombar.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
class KFileItemList;
class KJob;
class KNewFileMenu;
-class KHelpMenu;
class KToolBarPopupAction;
class QToolButton;
class PlacesPanel;
namespace KIO {
class OpenUrlJob;
}
+namespace SelectionMode {
+ class ActionTextHelper;
+}
/**
* @short Main window for Dolphin.
/**
* Tries to raise/activate the Dolphin window.
*/
- void activateWindow();
+ void activateWindow(const QString &activationToken);
+
+ bool isActiveWindow();
/**
* Determines if a URL is open in any tab.
*/
bool isUrlOpen(const QString &url);
+ /**
+ * @return Whether the item with @p url can be found in any view only by switching
+ * between already open tabs and scrolling in their primary or secondary view.
+ * @note Use of QString instead of QUrl is required to be callable via DBus.
+ */
+ bool isItemVisibleInAnyView(const QString &urlOfItem);
+
/**
* Pastes the clipboard data into the currently selected folder
/** @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;
*/
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();
/** 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();
void enableStopAction();
void disableStopAction();
+ void toggleSelectionMode();
+
void showFilterBar();
void toggleFilterBar();
/** Opens a terminal window for the current location. */
void openTerminal();
+ /** Opens terminal windows for the selected items' locations. */
+ void openTerminalHere();
+
+ /** Opens a terminal window for the URL. */
+ void openTerminalJob(const QUrl& url);
+
/** Focus a Terminal Panel. */
void focusTerminalPanel();
};
KNewFileMenu* m_newFileMenu;
- KHelpMenu* m_helpMenu;
DolphinTabWidget* m_tabWidget;
DolphinViewContainer* m_activeViewContainer;
DolphinRemoteEncoding* m_remoteEncoding;
QPointer<DolphinSettingsDialog> 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;
QMenu m_searchTools;
KFileItemActions m_fileItemActions;
+ friend class DolphinMainWindowTest;
};
inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const