X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/3c1c185400a55103cea3ed567de167df87b59945..d6488887ecf69d7f192b94de8dce34fae0b7eb76:/src/dolphinmainwindow.h diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 991312c0c..53b209642 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -93,6 +93,12 @@ public: */ KNewMenu* newMenu() const; + /** + * Returns the 'Show Menubar' action which can be shared with + * other menus (e. g. a context menu). + */ + KAction* showMenuBarAction() const; + public slots: /** * Handles the dropping of URLs to the given @@ -154,21 +160,14 @@ signals: void requestItemInfo(const KFileItem& item); protected: - /** @see QMainWindow::closeEvent */ + /** @see QMainWindow::closeEvent() */ virtual void closeEvent(QCloseEvent* event); - /** - * This method is called when it is time for the app to save its - * properties for session management purposes. - */ - void saveProperties(KConfig*); + /** @see KMainWindow::saveProperties() */ + virtual void saveProperties(KConfigGroup& group); - /** - * This method is called when this app is restored. The KConfig - * object points to the session management config file that was saved - * with @ref saveProperties - */ - void readProperties(KConfig*); + /** @see KMainWindow::readProperties() */ + virtual void readProperties(const KConfigGroup& group); private slots: /** Updates the 'Create New...' sub menu. */ @@ -199,18 +198,6 @@ private slots: */ void slotHandlePlacesError(const QString &message); - /** - * Shows the error information of the job \a job - * in the status bar. - */ - void slotHandleJobError(KJob* job); - - /** - * Indicates in the status bar that the delete operation - * of the job \a job has been finished. - */ - void slotDeleteFileFinished(KJob* job); - /** * Updates the state of the 'Undo' menu action dependent * from the parameter \a available. @@ -251,14 +238,8 @@ private slots: */ void invertSelection(); - /** The current active view is switched to the icons mode. */ - void setIconsView(); - - /** The current active view is switched to the details mode. */ - void setDetailsView(); - - /** The current active view is switched to the column mode. */ - void setColumnView(); + /** The current active view is switched to a new view mode. */ + void setViewMode(QAction *); /** The sorting of the current view should be done by the name. */ void sortByName(); @@ -293,15 +274,24 @@ private slots: /** Switches between sorting by categories or not. */ void toggleSortCategorization(); - /** Switches between showing the MIME type as additional information for the item or not. */ - void toggleMimeInfo(); - /** Switches between showing the size as additional information for the item or not. */ void toggleSizeInfo(); /** Switchtes between showing the date as additional information for the item or not. */ void toggleDateInfo(); + /** Switchtes between showing the permissions as additional information for the item or not. */ + void togglePermissionsInfo(); + + /** Switchtes between showing the owner as additional information for the item or not. */ + void toggleOwnerInfo(); + + /** Switchtes between showing the group as additional information for the item or not. */ + void toggleGroupInfo(); + + /** Switches between showing the MIME type as additional information for the item or not. */ + void toggleMimeInfo(); + /** * Switches between one and two views: * If one view is visible, it will get split into two views. @@ -371,6 +361,12 @@ private slots: /** Opens Kompare for 2 selected files. */ void compareFiles(); + /** + * Hides the menu bar if it is visible, makes the menu bar + * visible if it is hidden. + */ + void toggleShowMenuBar(); + /** Opens the settings dialog for Dolphin. */ void editSettings(); @@ -419,6 +415,9 @@ private slots: /** 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(KonqFileUndoManager::CommandType type); + private: DolphinMainWindow(int id); void init(); @@ -437,9 +436,6 @@ private: void updateEditActions(); void updateViewActions(); void updateGoActions(); - void copyUrls(const KUrl::List& source, const KUrl& dest); - void moveUrls(const KUrl::List& source, const KUrl& dest); - void linkUrls(const KUrl::List& source, const KUrl& dest); void clearStatusBar(); /** @@ -481,7 +477,7 @@ private: * assures that all errors are shown in the status bar of Dolphin * instead as modal error dialog with an OK button. */ - class UndoUiInterface : public KonqUndoManager::UiInterface + class UndoUiInterface : public KonqFileUndoManager::UiInterface { public: UndoUiInterface(DolphinMainWindow* mainWin); @@ -493,6 +489,7 @@ private: }; KNewMenu* m_newMenu; + KAction* m_showMenuBar; QSplitter* m_splitter; DolphinViewContainer* m_activeViewContainer; int m_id; @@ -500,7 +497,7 @@ private: DolphinViewContainer* m_viewContainer[SecondaryView + 1]; /// remember pending undo operations until they are finished - QList m_undoCommandTypes; + QList m_undoCommandTypes; }; inline DolphinViewContainer* DolphinMainWindow::activeViewContainer() const @@ -518,6 +515,11 @@ inline KNewMenu* DolphinMainWindow::newMenu() const return m_newMenu; } +inline KAction* DolphinMainWindow::showMenuBarAction() const +{ + return m_showMenuBar; +} + inline int DolphinMainWindow::getId() const { return m_id;