Add (and install) svg for the new krunner interface.
[kdebase/uwolfer.git] / apps / keditbookmarks / bookmarkiterator.h
blob4c7c2c9c5d55f3b1680a0576df64cfc3061ebd19
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
30 Q_OBJECT
32 public:
33 BookmarkIterator(QList<KBookmark> bks);
34 virtual ~BookmarkIterator();
35 virtual BookmarkIteratorHolder* holder() const = 0;
37 public Q_SLOTS:
38 void nextOne();
39 void delayedEmitNextOne();
40 void slotCancelTest(BookmarkIterator *t);
42 Q_SIGNALS:
43 void deleteSelf(BookmarkIterator *);
45 protected:
46 virtual void doAction() = 0;
47 virtual bool isApplicable(const KBookmark &bk) const = 0;
48 const KBookmark curBk() const;
50 private:
51 KBookmark m_bk;
52 QList<KBookmark> m_bklist;
55 class BookmarkIteratorHolder
57 public:
58 void cancelAllItrs();
59 void removeItr(BookmarkIterator*);
60 void insertItr(BookmarkIterator*);
61 protected:
62 BookmarkIteratorHolder();
63 virtual ~BookmarkIteratorHolder() {}
64 virtual void doItrListChanged() = 0;
65 int count() const { return m_itrs.count(); }
66 private:
67 QList<BookmarkIterator *> m_itrs;
70 #endif