X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/652d08c9242ed51d86dba3b2afda9d3b2e9a9cd7..fd74aa8e2057158d2eadb835eb61564854c81020:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 4d993865f..f4ccfdce4 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by Peter Penz * + * Copyright (C) 2006 by Peter Penz * * Copyright (C) 2006 by Stefan Monov * * Copyright (C) 2006 by Cvetoslav Ludmiloff * * * @@ -26,11 +26,11 @@ #include -#include +#include #include #include #include -#include +#include #include "views/dolphinview.h" @@ -74,7 +74,7 @@ public: DolphinViewContainer* activeViewContainer() const; /** - * Opens each directory \p in a separate tab. If the "split view" + * Opens each directory in \p dirs in a separate tab. If the "split view" * option is enabled, 2 directories are collected within one tab. */ void openDirectories(const QList& dirs); @@ -93,19 +93,11 @@ public: */ bool isSplit() const; - /** - * If the main window contains two instances of a view container - * (DolphinMainWindow::isSplit() returns true), then the - * two views get toggled (the right view is on the left, the left - * view on the right). - */ - void toggleViews(); - /** Renames the item represented by \a oldUrl to \a newUrl. */ void rename(const KUrl& oldUrl, const KUrl& newUrl); /** - * Refreshes the views of the main window by recreating them dependent from + * Refreshes the views of the main window by recreating them according to * the given Dolphin settings. */ void refreshViews(); @@ -114,7 +106,7 @@ public: * Returns the 'Create New...' sub menu which also can be shared * with other menus (e. g. a context menu). */ - KNewFileMenu* newMenu() const; + KNewFileMenu* newFileMenu() const; /** * Returns the 'Show Menubar' action which can be shared with @@ -190,7 +182,7 @@ private slots: /** * Updates the state of the 'Undo' menu action dependent - * from the parameter \a available. + * on the parameter \a available. */ void slotUndoAvailable(bool available); @@ -219,7 +211,7 @@ private slots: void find(); /** - * Updates the text of the paste action dependent from + * Updates the text of the paste action dependent on * the number of items which are in the clipboard. */ void updatePasteAction(); @@ -237,20 +229,20 @@ private slots: /** * Switches between one and two views: * If one view is visible, it will get split into two views. - * If already two views are visible, the nonactivated view gets closed. + * If already two views are visible, the active view gets closed. */ void toggleSplitView(); - /** Reloads the current active view. */ + /** Reloads the currently active view. */ void reloadView(); - /** Stops the loading process for the current active view. */ + /** Stops the loading process for the currently active view. */ void stopLoading(); - /** - * Toggles between showing and hiding of the filter bar - */ - void toggleFilterBarVisibility(bool show); + void enableStopAction(); + void disableStopAction(); + + void showFilterBar(); /** * Toggles between edit and browse mode of the navigation bar. @@ -264,7 +256,12 @@ private slots: */ void replaceLocation(); - /** Goes back on step of the URL history. */ + /** + * Toggles the state of the panels between a locked and unlocked layout. + */ + void togglePanelLockState(); + + /** Goes back one step of the URL history. */ void goBack(); /** Goes forward one step of the URL history. */ @@ -318,9 +315,6 @@ 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&); @@ -377,7 +371,7 @@ private slots: void closeTab(); /** - * Closes the tab with the index \index and activates the tab with index - 1. + * Closes the tab with the index \a index and activates the tab with index - 1. */ void closeTab(int index); @@ -408,7 +402,7 @@ private slots: void slotTestCanDecode(const QDragMoveEvent* event, bool& accept); /** - * If the URL can be listed open it in the current view, otherwise + * If the URL can be listed, open it in the current view, otherwise * run it through KRun. */ void handleUrl(const KUrl& url); @@ -419,12 +413,6 @@ private slots: */ void slotHandleUrlStatFinished(KJob* job); - /** - * setUrlAsCaption() will trigger a stat job which reports its result in - * this slot. - */ - void slotCaptionStatFinished(KJob* job); - /** * Is connected to the KTabBar signal receivedDropEvent. * Allows dragging and dropping files onto tabs. @@ -437,6 +425,8 @@ private slots: */ void slotWriteStateChanged(bool isFolderWritable); + void slotSearchModeChanged(bool enabled); + /** * Opens the context menu on the current mouse position. * @item File item context. If item is null, the context menu @@ -510,6 +500,15 @@ private: QString squeezedText(const QString& text) const; + /** + * Adds a clone of the action \a action to the action-collection with + * the name \a actionName, so that the action \a action also can be + * added to the toolbar by the user. This is useful if the creation of + * \a action is e.g. done in Qt and hence cannot be added directly + * to the action-collection. + */ + void addActionCloneToCollection(QAction* action, const QString& actionName); + private: /** * Implements a custom error handling for the undo manager. This @@ -524,7 +523,7 @@ private: virtual void jobError(KIO::Job* job); }; - KNewFileMenu* m_newMenu; + KNewFileMenu* m_newFileMenu; KActionMenu* m_recentTabsMenu; KAction* m_showMenuBar; KTabBar* m_tabBar; @@ -548,8 +547,13 @@ private: DolphinRemoteEncoding* m_remoteEncoding; QPointer m_settingsDialog; - KJob* m_captionStatJob; KJob* m_lastHandleUrlStatJob; + + /** + * Set to true, if the filter dock visibility is only temporary set + * to true by enabling the search mode. + */ + bool m_filterDockIsTemporaryVisible; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const @@ -562,9 +566,9 @@ inline bool DolphinMainWindow::isSplit() const return m_viewTab[m_tabIndex].secondaryView != 0; } -inline KNewFileMenu* DolphinMainWindow::newMenu() const +inline KNewFileMenu* DolphinMainWindow::newFileMenu() const { - return m_newMenu; + return m_newFileMenu; } inline KAction* DolphinMainWindow::showMenuBarAction() const