delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / konqueror / src / konqbookmarkbar.h
blob7ab8aeddc11c7719c4359970f884a04ecb1a3089
1 // -*- c-basic-offset:4; indent-tabs-mode:nil -*-
2 // vim: set ts=4 sts=4 sw=4 et:
3 /* This file is part of the KDE project
4 Copyright (C) 1999 Kurt Granroth <granroth@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
21 #ifndef KONQBOOKMARKBAR_H
22 #define KONQBOOKMARKBAR_H
24 #include <QtCore/QObject>
25 #include <QtCore/QPointer>
26 #include <QtCore/QList>
27 #include <kbookmark.h>
28 #include <kaction.h>
30 class KToolBar;
31 class KBookmarkMenu;
32 class KonqBookmarkOwner;
33 class KActionCollection;
34 class KAction;
35 class KBookmarkBarPrivate;
37 /**
38 * This class provides a bookmark toolbar. Using this class is nearly
39 * identical to using KBookmarkMenu so follow the directions
40 * there.
42 //FIXME rename KonqBookmarkBar
43 class KBookmarkBar : public QObject
45 Q_OBJECT
46 public:
47 /**
48 * Fills a bookmark toolbar
50 * @param manager the bookmark manager
51 * @param owner implementation of the KonqBookmarkOwner interface (callbacks)
52 * @param toolBar toolbar to fill
54 * The KActionCollection pointer argument is now obsolete.
56 * @param parent the parent widget for the bookmark toolbar
58 KBookmarkBar( KBookmarkManager* manager,
59 KonqBookmarkOwner *owner, KToolBar *toolBar,
60 QObject *parent = 0);
62 virtual ~KBookmarkBar();
64 QString parentAddress();
66 public Q_SLOTS:
67 void clear();
68 void contextMenu( const QPoint & );
70 void slotBookmarksChanged( const QString & );
71 void slotConfigChanged();
73 protected:
74 void fillBookmarkBar( const KBookmarkGroup & parent );
75 virtual bool eventFilter( QObject *o, QEvent *e );
77 private:
78 KBookmarkGroup getToolbar();
79 void removeTempSep();
80 bool handleToolbarDragMoveEvent(const QPoint& pos, const QList<KAction *>& actions, const QString &text);
82 KonqBookmarkOwner *m_pOwner;
83 QPointer<KToolBar> m_toolBar;
84 KActionCollection *m_actionCollection;
85 KBookmarkManager *m_pManager;
86 QList<KBookmarkMenu *> m_lstSubMenus;
87 QAction* m_toolBarSeparator;
89 KBookmarkBarPrivate * const d;
92 #endif // KONQBOOKMARKBAR_H