1 // vim: set ts=4 sts=4 sw=4 et:
2 /* This file is part of the KDE project
3 Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License version 2 or at your option version 3 as published by
8 the Free Software Foundation.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __bookmarkiterator_h
20 #define __bookmarkiterator_h
22 #include <QtCore/QObject>
23 #include <QtCore/QList>
24 #include <kbookmark.h>
26 class BookmarkIteratorHolder
;
28 class BookmarkIterator
: public QObject
33 BookmarkIterator(QList
<KBookmark
> bks
);
34 virtual ~BookmarkIterator();
35 virtual BookmarkIteratorHolder
* holder() const = 0;
39 void delayedEmitNextOne();
40 void slotCancelTest(BookmarkIterator
*t
);
43 void deleteSelf(BookmarkIterator
*);
46 virtual void doAction() = 0;
47 virtual bool isApplicable(const KBookmark
&bk
) const = 0;
48 const KBookmark
curBk() const;
52 QList
<KBookmark
> m_bklist
;
55 class BookmarkIteratorHolder
59 void removeItr(BookmarkIterator
*);
60 void insertItr(BookmarkIterator
*);
62 BookmarkIteratorHolder();
63 virtual ~BookmarkIteratorHolder() {}
64 virtual void doItrListChanged() = 0;
65 int count() const { return m_itrs
.count(); }
67 QList
<BookmarkIterator
*> m_itrs
;