diff options
Diffstat (limited to 'src/bookmarks/bookmarkstoolbar.h')
-rw-r--r-- | src/bookmarks/bookmarkstoolbar.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h index 92a56749..54a430e3 100644 --- a/src/bookmarks/bookmarkstoolbar.h +++ b/src/bookmarks/bookmarkstoolbar.h @@ -31,7 +31,6 @@ // KDE Includes #include <KBookmarkMenu> - /** * This class represent the rekonq bookmarks menu. * It's just a simple class inherited from KBookmarkMenu @@ -73,28 +72,23 @@ private: #include <KToolBar> -class BookmarkToolBar : public KToolBar +/** + * This class manage the bookmark toolbar. + * Some events from the toolbar are handled to allow the drag and drop + */ + +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(); @@ -106,11 +100,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 |