diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-02 00:50:04 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-02 00:50:04 +0200 |
commit | 9dcb1b5bfd4772726f41bf011abf6810b6ce25ad (patch) | |
tree | 86bcb1efb8c593aba6c1b56e7a388a1b258d97e8 /src/bookmarks/bookmarksmanager.h | |
parent | Don't save sessions && closed tabs if Private Browsing is enabled (diff) | |
download | rekonq-9dcb1b5bfd4772726f41bf011abf6810b6ce25ad.tar.xz |
Merging mr 154 by hand!!
WARNING: I'm NOT sure about this. Please everyone, check it twice!!
PS: Many thanks to Yoann21. He is doing a fantastic work on the bookmarks
toolbar
Diffstat (limited to 'src/bookmarks/bookmarksmanager.h')
-rw-r--r-- | src/bookmarks/bookmarksmanager.h | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/bookmarks/bookmarksmanager.h b/src/bookmarks/bookmarksmanager.h index fd2cfcdc..6bf796c0 100644 --- a/src/bookmarks/bookmarksmanager.h +++ b/src/bookmarks/bookmarksmanager.h @@ -161,6 +161,9 @@ protected: virtual void refill(); virtual QAction* actionForBookmark(const KBookmark &bookmark); +private slots: + void actionHovered(); + private: void addOpenFolderInTabs(); @@ -169,7 +172,40 @@ private: // ------------------------------------------------------------------------------ +#include <KToolBar> + +class BookmarkToolBar : public KToolBar +{ + Q_OBJECT + +public: +BookmarkToolBar(const QString &objectName, + QMainWindow *parentWindow, + Qt::ToolBarArea area, + bool newLine = false, + bool isMainToolBar = false, + bool readConfig = true); +~BookmarkToolBar(); + +virtual void setVisible(bool visible); + +protected: + bool eventFilter(QObject *watched, QEvent *event); +private slots: + void actionHovered(); + void menuDisplayed(); + void menuHidden(); + +private: + bool m_filled; + KMenu *m_currentMenu; +}; + + +// ------------------------------------------------------------------------------ + + /** * This class represent the interface to rekonq bookmarks system. * All rekonq needs (Bookmarks Menu, Bookmarks Toolbar) is provided @@ -205,9 +241,9 @@ public: /** * @short set the Bookmarks Toolbar Action */ - void setupBookmarkBar(KToolBar *); + void setupBookmarkBar(BookmarkToolBar *); - void removeToolBar(KToolBar*); + void removeToolBar(BookmarkToolBar *); /** * @short Get action by name @@ -259,20 +295,19 @@ public slots: * @see KBookmarkManager::changed */ void slotBookmarksChanged(const QString &group, const QString &caller); - + void fillBookmarkBar(BookmarkToolBar *toolBar); + private slots: - void triggerBookmarkMenu(); void slotAddBookmark(); void slotPanelChanged(); private: - void fillBookmarkBar(KToolBar *toolBar); QList<KBookmark> find(QList<KBookmark> list, const KBookmark &bookmark, QString text); KBookmarkManager *m_manager; BookmarkOwner *m_owner; KActionCollection *m_actionCollection; - QList<KToolBar*> m_bookmarkToolBars; + QList<BookmarkToolBar *> m_bookmarkToolBars; QList<BookmarksPanel*> m_bookmarkPanels; KActionMenu *_bookmarkActionMenu; |