]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
Add an option to use an UrlNavigator in the toolbar instead
[dolphin.git] / src / dolphinmainwindow.h
index 59e0afa3121ca31153236753d028a530eb007c18..529319e2adf1109193dcd81a171f61174b70749a 100644 (file)
@@ -1,23 +1,10 @@
-/***************************************************************************
- *   Copyright (C) 2006 by Peter Penz <peter.penz19@gmail.com>             *
- *   Copyright (C) 2006 by Stefan Monov <logixoul@gmail.com>               *
- *   Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com>       *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz19@gmail.com>
+ * SPDX-FileCopyrightText: 2006 Stefan Monov <logixoul@gmail.com>
+ * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <ludmiloff@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #ifndef DOLPHIN_MAINWINDOW_H
 #define DOLPHIN_MAINWINDOW_H
@@ -81,9 +68,14 @@ public:
     DolphinViewContainer* activeViewContainer() const;
 
     /**
-     * Returns view container for all tabs
+     * Returns view containers for all tabs
+     * @param includeInactive   When true all view containers available in
+     *                          this window are returned. When false the
+     *                          view containers of split views that are not
+     *                          currently active are ignored.
+     *                          Default is true.
      */
-    QVector<DolphinViewContainer*> viewContainers() const;
+    QVector<DolphinViewContainer*> viewContainers(bool includeInactive = true) const;
 
     /**
      * Opens each directory in \p dirs in a separate tab. If \a splitView is set,
@@ -105,7 +97,24 @@ public:
      */
     KNewFileMenu* newFileMenu() const;
 
-    void setTabsToHomeIfMountPathOpen(const QString& mountPath);
+    /**
+     * Switch the window's view containers' locations to display the home path
+     * for any which are currently displaying a location corresponding to or
+     * within mountPath.
+     *
+     * This typically done after unmounting a disk at mountPath to ensure that
+     * the window is not displaying an invalid location.
+     */
+    void setViewsToHomeIfMountPathOpen(const QString& mountPath);
+
+    /**
+     * Sets any of the window's view containers which are currently displaying
+     * invalid locations to the home path
+     */
+    void setViewsWithInvalidPathsToHome();
+
+    bool isFoldersPanelEnabled() const;
+    bool isInformationPanelEnabled() const;
 
 public slots:
     /**
@@ -301,6 +310,12 @@ private slots:
 
     void showFilterBar();
 
+    /**
+     * Toggle between either using an UrlNavigator in the toolbar or the
+     * ones in the location bar for navigating.
+     */
+    void toggleLocationInToolbar();
+
     /**
      * Toggles between edit and browse mode of the navigation bar.
      */
@@ -605,12 +620,6 @@ private:
     /** Adds "What's This?" texts to many widgets and StandardActions. */
     void setupWhatsThis();
 
-    /**
-     * Returns the KIO::StatJob::mostLocalUrl() for the active container URL
-     * if it's a local file. Otherwise returns the user's home path.
-     */
-    QString activeContainerLocalPath();
-
     /** Returns preferred search tool as configured in "More Search Tools" menu. */
     QPointer<QAction> preferredSearchTool();