From 79ad6230fd3a99e13ed5ee18cba10c90cff3ee5c Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Fri, 20 Aug 2010 15:30:03 +0200 Subject: - 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) --- src/bookmarks/bookmarkstoolbar.h | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'src/bookmarks/bookmarkstoolbar.h') 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 #include - /** * This class represent the rekonq bookmarks menu. * It's just a simple class inherited from KBookmarkMenu @@ -75,30 +69,23 @@ private: // ------------------------------------------------------------------------------ -#include +/** + * 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 -- cgit v1.2.1