]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.h
Restore the "Edit->Selection" menu from Konqueror 3 for file
[dolphin.git] / src / dolphinmainwindow.h
index 8fe9e350a2c55cf7b060e78e58e4b1fa0932a12e..e9332194f544cc1e1b039036f9eec1e13c5b3e1a 100644 (file)
@@ -41,12 +41,13 @@ class KAction;
 class DolphinViewActionHandler;
 class DolphinApplication;
 class DolphinSearchBox;
+class DolphinSearchOptionsConfigurator;
 class DolphinSettingsDialog;
 class DolphinViewContainer;
+class DolphinRemoteEncoding;
 class KNewMenu;
 class KTabBar;
 class KUrl;
-class QDropEvent;
 class QSplitter;
 
 /**
@@ -63,14 +64,6 @@ class DolphinMainWindow: public KXmlGuiWindow
 
 public:
     virtual ~DolphinMainWindow();
-    //TODO: This struct should be private, but I couldn't figure out how to make it that way
-    //when using Q_DECLARE_METATYPE(), which is a needed macro.
-    struct ClosedTab
-    {
-        KUrl primaryUrl;
-        KUrl secondaryUrl;
-        bool isSplit;
-    };
 
     /**
      * Returns the currently active view.
@@ -179,6 +172,8 @@ private slots:
     /** Updates the 'Create New...' sub menu. */
     void updateNewMenu();
 
+    void createDirectory();
+
     /** Shows the error message in the status bar of the active view. */
     void showErrorMessage(const QString& message);
 
@@ -199,7 +194,7 @@ private slots:
 
     /**
      * Copies all selected items to the clipboard and marks
-     * the items as cutted.
+     * the items as cut.
      */
     void cut();
 
@@ -264,24 +259,39 @@ private slots:
     /** Goes up one hierarchy of the current URL. */
     void goUp();
 
+    /**
+     * Open the previous URL in the URL history in a new tab
+     * if the middle mouse button is clicked.
+     */
+    void goBack(Qt::MouseButtons buttons);
+
+    /**
+     * Open the next URL in the URL history in a new tab
+     * if the middle mouse button is clicked.
+     */
+    void goForward(Qt::MouseButtons buttons);
+
+    /**
+     * Open the URL one hierarchy above the current URL in a new tab
+     * if the middle mouse button is clicked.
+     */
+    void goUp(Qt::MouseButtons buttons);
+
     /** Goes to the home URL. */
     void goHome();
 
     /** 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();
 
@@ -378,10 +388,23 @@ 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.
+     * Is connected with the Dolphin search box and the search configurator
+     * and triggers a Nepomuk search.
+     */
+    void searchItems();
+
+    /**
+     * Is connected to the QTabBar signal tabMoved(int from, int to).
+     * Reorders the list of tabs after a tab was moved in the tab bar
+     * and sets m_tabIndex to the new index of the current tab.
      */
-    void searchItems(const KUrl& url);
+    void slotTabMoved(int from, int to);
+
+    /**
+     * Is connected to the searchbox signal 'requestSearchOptions' and
+     * takes care to show the search options.
+     */
+    void showSearchOptions();
 
 private:
     DolphinMainWindow(int id);
@@ -429,6 +452,21 @@ private:
 
     void createSecondaryView(int tabIndex);
 
+    /**
+     * Helper method for saveProperties() and readProperties(): Returns
+     * the property string for a tab with the index \a tabIndex and
+     * the property \a property.
+     */
+    QString tabProperty(const QString& property, int tabIndex) const;
+
+    /**
+     * Sets the window caption to url.fileName() if this is non-empty, 
+     * "/" if the URL is "file:///", and url.protocol() otherwise.
+     */
+    void setUrlAsCaption(const KUrl& url);
+
+    QString squeezedText(const QString& text) const;
+
 private:
     /**
      * Implements a custom error handling for the undo manager. This
@@ -450,6 +488,7 @@ private:
     DolphinViewContainer* m_activeViewContainer;
     QVBoxLayout* m_centralWidgetLayout;
     DolphinSearchBox* m_searchBox;
+    DolphinSearchOptionsConfigurator* m_searchOptionsConfigurator;
     int m_id;
 
     struct ViewTab
@@ -465,11 +504,10 @@ private:
     QList<ViewTab> m_viewTab;
 
     DolphinViewActionHandler* m_actionHandler;
+    DolphinRemoteEncoding* m_remoteEncoding;
     QPointer<DolphinSettingsDialog> m_settingsDialog;
 };
 
-Q_DECLARE_METATYPE(DolphinMainWindow::ClosedTab)
-
 inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const
 {
     return m_activeViewContainer;