From 24823bbfd1616b77727ef06c437e3ec61c89b750 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Thu, 19 Jun 2014 22:04:36 +0200 Subject: 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 --- src/dolphinrecenttabsmenu.h | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/dolphinrecenttabsmenu.h (limited to 'src/dolphinrecenttabsmenu.h') diff --git a/src/dolphinrecenttabsmenu.h b/src/dolphinrecenttabsmenu.h new file mode 100644 index 000000000..34d41530b --- /dev/null +++ b/src/dolphinrecenttabsmenu.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2014 by Emmanuel Pescosta * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef DOLPHIN_RECENT_TABS_MENU_H +#define DOLPHIN_RECENT_TABS_MENU_H + +#include +#include + +class DolphinTabPage; +class QAction; + +class DolphinRecentTabsMenu : public KActionMenu +{ + Q_OBJECT + +public: + explicit DolphinRecentTabsMenu(QObject* parent); + +public slots: + void rememberClosedTab(const KUrl& primaryUrl, const KUrl& secondaryUrl); + +signals: + void restoreClosedTab(const KUrl& primaryUrl, const KUrl& secondaryUrl); + +private slots: + void handleAction(QAction* action); + +private: + QAction* m_clearListAction; +}; + +#endif \ No newline at end of file -- cgit v1.3