X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/65d7ef184acf97e7881050df88ddace97bde4b93..594e0a394341e92069dc16aa0aca5f42ac362274:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 5f96ca3b6..ecc84b971 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -42,6 +42,7 @@ class KFileItem; class KFileItemList; class KJob; class KNewFileMenu; +class KRecentFilesAction; class KToolBarPopupAction; class QToolButton; class PlacesPanel; @@ -208,8 +209,9 @@ public Q_SLOTS: /** * Opens a new tab in the background showing the URL \a url. + * @return A pointer to the opened DolphinTabPage. */ - void openNewTab(const QUrl &url); + DolphinTabPage *openNewTab(const QUrl &url); /** * Opens a new tab showing the URL \a url and activate it. @@ -294,6 +296,7 @@ private Q_SLOTS: void updateNewMenu(); void createDirectory(); + void createFile(); /** Shows the error message in the status bar of the active view. */ void showErrorMessage(const QString &message); @@ -402,10 +405,21 @@ private Q_SLOTS: void togglePanelLockState(); /** - * Is invoked if the Terminal panel got visible/invisible and takes care - * that the active view has the focus if the Terminal panel is invisible. + * Is invoked whenever the Terminal panel visibility is changed by the user and then moves the focus + * to the active view if the panel was hidden. + * @note The opposite action (putting focus to the Terminal) is not handled + * here but in TerminalPanel::showEvent(). + * @param visible the new visibility state of the terminal panel */ - void slotTerminalPanelVisibilityChanged(); + void slotTerminalPanelVisibilityChanged(bool visible); + + /** + * Is invoked whenever the Places panel visibility is changed by the user and then either moves the focus + * - to the Places panel if it was made visible, or + * - to the active view if the panel was hidden. + * @param visible the new visibility state of the Places panel + */ + void slotPlacesPanelVisibilityChanged(bool visible); /** Goes back one step of the URL history. */ void goBack(); @@ -455,8 +469,11 @@ private Q_SLOTS: /** Opens a terminal window for the URL. */ void openTerminalJob(const QUrl &url); - /** Focus a Terminal Panel. */ - void focusTerminalPanel(); + /** Toggles focus to/from a Terminal Panel. */ + void toggleTerminalPanelFocus(); + + /** Toggles focus to/from the Places Panel. */ + void togglePlacesPanelFocus(); /** Opens the settings dialog for Dolphin. */ void editSettings(); @@ -759,6 +776,8 @@ private: KIO::CommandLauncherJob *m_job; + KRecentFilesAction *m_recentFiles = nullptr; + friend class DolphinMainWindowTest; };