diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /konqueror/keditbookmarks/bookmarkiterator.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konqueror/keditbookmarks/bookmarkiterator.h')
-rw-r--r-- | konqueror/keditbookmarks/bookmarkiterator.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/konqueror/keditbookmarks/bookmarkiterator.h b/konqueror/keditbookmarks/bookmarkiterator.h new file mode 100644 index 000000000..baafb3486 --- /dev/null +++ b/konqueror/keditbookmarks/bookmarkiterator.h @@ -0,0 +1,74 @@ +// -*- mode:cperl; cperl-indent-level:4; cperl-continued-statement-offset:4; indent-tabs-mode:nil -*- +// vim: set ts=4 sts=4 sw=4 et: +/* This file is part of the KDE project + Copyright (C) 2002-2003 Alexander Kellett <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License version 2 as published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __bookmarkiterator_h +#define __bookmarkiterator_h + +#include <qobject.h> +#include <qptrlist.h> +#include <kbookmark.h> + +class KEBListViewItem; +class BookmarkIteratorHolder; + +class BookmarkIterator : public QObject +{ + Q_OBJECT + +public: + BookmarkIterator(QValueList<KBookmark> bks); + virtual ~BookmarkIterator(); + virtual BookmarkIteratorHolder* holder() const = 0; + +public slots: + void nextOne(); + void delayedEmitNextOne(); + void slotCancelTest(BookmarkIterator *t); + +signals: + void deleteSelf(BookmarkIterator *); + +protected: + virtual void doAction() = 0; + virtual bool isApplicable(const KBookmark &bk) const = 0; + KEBListViewItem* curItem() const; + const KBookmark curBk() const; + +private: + KBookmark m_bk; + QValueList<KBookmark> m_bklist; +}; + +class BookmarkIteratorHolder +{ +public: + void cancelAllItrs(); + void removeItr(BookmarkIterator*); + void insertItr(BookmarkIterator*); +protected: + BookmarkIteratorHolder(); + virtual ~BookmarkIteratorHolder() {}; + virtual void doItrListChanged() = 0; + int count() const { return m_itrs.count(); } +private: + QPtrList<BookmarkIterator> m_itrs; +}; + +#endif |