From 1ce2fb199db7bdf5baf05b61e4e58c549404b4df Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 18 Nov 2007 14:37:57 +0000 Subject: allow to show/hide the menubar BUG: 152463 svn path=/trunk/KDE/kdebase/apps/; revision=738282 --- src/dolphinmainwindow.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/dolphinmainwindow.h') diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 2f91f9553..ef694513c 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -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 @@ -362,6 +368,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(); @@ -487,6 +499,7 @@ private: }; KNewMenu* m_newMenu; + KAction* m_showMenuBar; QSplitter* m_splitter; DolphinViewContainer* m_activeViewContainer; int m_id; @@ -512,6 +525,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; -- cgit v1.3