diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-06-19 22:04:36 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-06-19 22:04:36 +0200 |
| commit | 24823bbfd1616b77727ef06c437e3ec61c89b750 (patch) | |
| tree | 2bf465fe0d5eb3efcb2a3c84c7076d19d59c1d80 /src/dolphinmainwindow.h | |
| parent | efa19caa46f1d56afab9cc33c456bc84c47d95e1 (diff) | |
Implemented DolphinRecentTabsMenu to encapsulate the recent
tabs menu related code from DolphinMainWindow in a new class.
The DolphinRecentTabsMenu remembers the tab configuration if a
tab has been closed.
REVIEW: 118805
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index cb976129f..acf60a4f6 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -28,7 +28,6 @@ #include <kio/fileundomanager.h> #include <ksortablelist.h> #include <kxmlguiwindow.h> -#include <KActionMenu> #include <KIcon> #include <QList> @@ -156,6 +155,11 @@ signals: */ void settingsChanged(); + /** + * Is emitted when a tab has been closed. + */ + void rememberClosedTab(const KUrl& primaryUrl, const KUrl& secondaryUrl); + protected: /** @see QWidget::showEvent() */ virtual void showEvent(QShowEvent* event); @@ -192,9 +196,6 @@ private slots: */ void slotUndoAvailable(bool available); - /** Invoked when an action in the recent tabs menu is clicked. */ - void restoreClosedTab(QAction* action); - /** Sets the text of the 'Undo' menu action to \a text. */ void slotUndoTextChanged(const QString& text); @@ -473,6 +474,12 @@ private slots: */ void slotPlaceActivated(const KUrl& url); + /** + * Is called when the user wants to reopen a previously closed \a tab from + * the recent tabs menu. + */ + void restoreClosedTab(const KUrl& primaryUrl, const KUrl& secondaryUrl); + private: /** * Activates the given view, which means that @@ -504,11 +511,6 @@ private: bool addActionToMenu(QAction* action, KMenu* menu); /** - * Adds the tab[\a index] to the closed tab menu's list of actions. - */ - void rememberClosedTab(int index); - - /** * Connects the signals from the created DolphinView with * the DolphinViewContainer \a container with the corresponding slots of * the DolphinMainWindow. This method must be invoked each @@ -572,7 +574,6 @@ private: }; KNewFileMenu* m_newFileMenu; - KActionMenu* m_recentTabsMenu; KTabBar* m_tabBar; DolphinViewContainer* m_activeViewContainer; QVBoxLayout* m_centralWidgetLayout; |
