]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
Provide an "Open Terminal" entry for the Tools menu (thanks to Rahman Duran for the...
[dolphin.git] / src / dolphinmainwindow.h
index e09b005087ac2524e8b5e298bbf1798fc877653a..2b5b00515603ddec3e27ec504f2dac8d1a20bbfe 100644 (file)
@@ -23,7 +23,7 @@
 #define DOLPHIN_MAINWINDOW_H
 
 #include "dolphinview.h"
-#include "sidebarpage.h"
+#include "panels/panel.h"
 
 #include <config-nepomuk.h>
 
@@ -31,6 +31,7 @@
 #include <kio/fileundomanager.h>
 #include <ksortablelist.h>
 #include <kxmlguiwindow.h>
+#include <kactionmenu.h>
 
 #include <QtCore/QList>
 
@@ -39,6 +40,8 @@ typedef KIO::FileUndoManager::CommandType CommandType;
 class KAction;
 class DolphinViewActionHandler;
 class DolphinApplication;
+class DolphinSearchBox;
+class DolphinSettingsDialog;
 class DolphinViewContainer;
 class KNewMenu;
 class KTabBar;
@@ -119,7 +122,7 @@ public slots:
     int getId() const;
 
     /**
-     * Inform all affected dolphin components (sidebars, views) of an URL
+     * Inform all affected dolphin components (panels, views) of an URL
      * change.
      */
     void changeUrl(const KUrl& url);
@@ -147,7 +150,7 @@ signals:
     void urlChanged(const KUrl& url);
 
     /**
-     * Is emitted if information of an item is requested to be shown e. g. in the sidebar.
+     * Is emitted if information of an item is requested to be shown e. g. in the panel.
      * If item is null, no item information request is pending.
      */
     void requestItemInfo(const KFileItem& item);
@@ -177,6 +180,9 @@ private slots:
      */
     void slotUndoAvailable(bool available);
 
+    /** Invoked when an action in the recent tabs menu is clicked. */
+    void restoreClosedTab(QAction* action);
+
     /** Sets the text of the 'Undo' menu action to \a text. */
     void slotUndoTextChanged(const QString& text);
 
@@ -256,18 +262,15 @@ private slots:
     /** Opens Kompare for 2 selected files. */
     void compareFiles();
 
-    /**
-     * Initiates a preview of the selected files
-     * on the desktop by the Previewer plasmoid.
-     */
-    void quickView();
-
     /**
      * Hides the menu bar if it is visible, makes the menu bar
      * visible if it is hidden.
      */
     void toggleShowMenuBar();
 
+    /** Opens a terminal window for the current location. */
+    void openTerminal();
+
     /** Opens the settings dialog for Dolphin. */
     void editSettings();
 
@@ -280,6 +283,9 @@ private slots:
      */
     void slotSelectionChanged(const KFileItemList& selection);
 
+    /** Enables changing of tabs via mouse wheel. */
+    void slotWheelMoved(int wheelDelta);
+
     /** Emits the signal requestItemInfo(). */
     void slotRequestItemInfo(const KFileItem&);
 
@@ -340,6 +346,7 @@ private slots:
      */
     void closeTab(int index);
 
+
     /**
      * Opens a context menu for the tab with the index \a index
      * on the position \a pos.
@@ -359,6 +366,12 @@ private slots:
      */
     void slotTestCanDecode(const QDragMoveEvent* event, bool& accept);
 
+    /**
+     * Is connected with the Dolphin search box and searchs items that
+     * match to the text entered in the search bar.
+     */
+    void searchItems(const KUrl& url);
+
 private:
     DolphinMainWindow(int id);
     void init();
@@ -377,6 +390,11 @@ private:
     void updateViewActions();
     void updateGoActions();
 
+    /**
+     * Adds the tab[\a index] to the closed tab menu's list of actions.
+     */
+    void rememberClosedTab(int index);
+
     /**
      * Connects the signals from the created DolphinView with
      * the DolphinViewContainer \a container with the corresponding slots of
@@ -398,6 +416,8 @@ private:
 
     bool isKompareInstalled() const;
 
+    void createSecondaryView(int tabIndex);
+
 private:
     /**
      * Implements a custom error handling for the undo manager. This
@@ -413,10 +433,12 @@ private:
     };
 
     KNewMenu* m_newMenu;
+    KActionMenu* m_recentTabsMenu;
     KAction* m_showMenuBar;
     KTabBar* m_tabBar;
     DolphinViewContainer* m_activeViewContainer;
     QVBoxLayout* m_centralWidgetLayout;
+    DolphinSearchBox* m_searchBox;
     int m_id;
 
     struct ViewTab
@@ -432,6 +454,7 @@ private:
     QList<ViewTab> m_viewTab;
 
     DolphinViewActionHandler* m_actionHandler;
+    QPointer<DolphinSettingsDialog> m_settingsDialog;
 };
 
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const