diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-20 15:30:03 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-20 15:30:03 +0200 |
commit | 79ad6230fd3a99e13ed5ee18cba10c90cff3ee5c (patch) | |
tree | 9740b7d4de3c1c78e0a8cf2e31b554e954090db5 /src/bookmarks/bookmarkstoolbar.h | |
parent | Fixed tooltip in the bookmarks panel (diff) | |
download | rekonq-79ad6230fd3a99e13ed5ee18cba10c90cff3ee5c.tar.xz |
- The bookmark toolbar is now a real toolbar, not an action.
It fixes the problem of the submenu if there are too much items to fit on the bar
- Improve a bit the new redesign of BookmarkOwner
- Reenable the bookmark menu by default (because the icon in the bar is on the left)
Diffstat (limited to 'src/bookmarks/bookmarkstoolbar.h')
-rw-r--r-- | src/bookmarks/bookmarkstoolbar.h | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h index cf7b62cc..5991a032 100644 --- a/src/bookmarks/bookmarkstoolbar.h +++ b/src/bookmarks/bookmarkstoolbar.h @@ -27,18 +27,12 @@ #ifndef BOOKMARKSTOOLBAR_H #define BOOKMARKSTOOLBAR_H -// Local Includes - - -// Qt Includes - // KDE Includes #include <KBookmarkMenu> #include <KToolBar> - /** * This class represent the rekonq bookmarks menu. * It's just a simple class inherited from KBookmarkMenu @@ -75,30 +69,23 @@ private: // ------------------------------------------------------------------------------ -#include <KToolBar> +/** + * This class manage the bookmark toolbar. + * Some events from the toolbar are handled to allow the drag and drop + */ -class BookmarkToolBar : public KToolBar +class BookmarkToolBar : public QObject { Q_OBJECT public: -BookmarkToolBar(const QString &objectName, - QMainWindow *parentWindow, - Qt::ToolBarArea area, - bool newLine = false, - bool isMainToolBar = false, - bool readConfig = true); +BookmarkToolBar(KToolBar *toolBar, QObject *parent); ~BookmarkToolBar(); -virtual void setVisible(bool visible); +KToolBar* toolBar(); protected: bool eventFilter(QObject *watched, QEvent *event); - void dragEnterEvent(QDragEnterEvent *event); - void dragMoveEvent(QDragMoveEvent *event); - void dragLeaveEvent(QDragLeaveEvent *event); - void dropEvent(QDropEvent *event); - void actionEvent(QActionEvent *event); private slots: void actionHovered(); @@ -110,11 +97,12 @@ private slots: private: void startDrag(); - bool m_filled; + KToolBar *m_toolBar; KMenu *m_currentMenu; QPoint m_startDragPos; QAction *m_dragAction; QAction *m_dropAction; + bool m_filled; }; #endif // BOOKMARKSTOOLBAR_H |