X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0382f24544d71eae01a85b98ab24b82daf482ecc..b1c9b5126d:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 2b7b247b5..2e49cc67a 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -23,7 +23,7 @@ #define DOLPHIN_MAINWINDOW_H #include "dolphinview.h" -#include "sidebarpage.h" +#include "panels/panel.h" #include @@ -34,9 +34,13 @@ #include +typedef KIO::FileUndoManager::CommandType CommandType; + class KAction; class DolphinViewActionHandler; class DolphinApplication; +class DolphinSearchBox; +class DolphinSettingsDialog; class DolphinViewContainer; class KNewMenu; class KTabBar; @@ -104,14 +108,6 @@ public: KAction* showMenuBarAction() const; public slots: - /** - * Handles the dropping of URLs to the given - * destination. This is only called by the TreeViewSidebarPage. - */ - void dropUrls(const KFileItem& destItem, - const KUrl& destPath, - QDropEvent* event); - /** * Pastes the clipboard data into the currently selected folder * of the active view. If not exactly one folder is selected, @@ -125,7 +121,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); @@ -153,7 +149,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); @@ -174,11 +170,8 @@ private slots: /** Updates the 'Create New...' sub menu. */ void updateNewMenu(); - /** - * Shows the error information from the places model - * in the status bar. - */ - void slotHandlePlacesError(const QString &message); + /** Shows the error message in the status bar of the active view. */ + void showErrorMessage(const QString& message); /** * Updates the state of the 'Undo' menu action dependent @@ -244,10 +237,11 @@ private slots: void toggleEditLocation(); /** - * Switches to the edit mode of the navigation bar. If the edit mode is + * Switches to the edit mode of the navigation bar and selects + * the whole URL, so that it can be replaced by the user. If the edit mode is * already active, it is assured that the navigation bar get focused. */ - void editLocation(); + void replaceLocation(); /** Goes back on step of the URL history. */ void goBack(); @@ -288,6 +282,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&); @@ -311,11 +308,28 @@ private slots: */ void openNewTab(const KUrl& url); + void activateNextTab(); + + void activatePrevTab(); + + /** + * Opens the selected folder in a new tab. + */ + void openInNewTab(); + + /** + * Opens the selected folder in a new window. + */ + void openInNewWindow(); + /** Toggles the active view if two views are shown within the main window. */ void toggleActiveView(); - /** Called when the view is doing a file operation, like renaming, copying, moving etc. */ - void slotDoingOperation(KIO::FileUndoManager::CommandType type); + /** + * Indicates in the statusbar that the execution of the command \a command + * has been finished. + */ + void showCommand(CommandType command); /** * Activates the tab with the index \a index, which means that the current view @@ -331,6 +345,7 @@ private slots: */ void closeTab(int index); + /** * Opens a context menu for the tab with the index \a index * on the position \a pos. @@ -343,13 +358,19 @@ private slots: * view is replaced by \a url. */ void handlePlacesClick(const KUrl& url, Qt::MouseButtons buttons); - + /** - * Is connected to the KTabBar signal testCanDecode() and adjusts + * Is connected to the KTabBar signal testCanDecode() and adjusts * the output parameter \a accept. */ 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(); @@ -389,6 +410,8 @@ private: bool isKompareInstalled() const; + void createSecondaryView(int tabIndex); + private: /** * Implements a custom error handling for the undo manager. This @@ -408,6 +431,7 @@ private: KTabBar* m_tabBar; DolphinViewContainer* m_activeViewContainer; QVBoxLayout* m_centralWidgetLayout; + DolphinSearchBox* m_searchBox; int m_id; struct ViewTab @@ -423,9 +447,7 @@ private: QList m_viewTab; DolphinViewActionHandler* m_actionHandler; - - /// remember pending undo operations until they are finished - QList m_undoCommandTypes; + QPointer m_settingsDialog; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const