File indexing completed on 2024-12-01 08:24:14
0001 // -*- c-basic-offset: 4; indent-tabs-mode:nil -*- 0002 // vim: set ts=4 sts=4 sw=4 et: 0003 /* This file is part of the KDE project 0004 Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org> 0005 0006 This program is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU General Public License as 0008 published by the Free Software Foundation; either version 2 of 0009 the License, or (at your option) version 3. 0010 0011 This program is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 GNU General Public License for more details. 0015 0016 You should have received a copy of the GNU General Public License 0017 along with this program. If not, see <http://www.gnu.org/licenses/> 0018 */ 0019 0020 #ifndef __favicons_h 0021 #define __favicons_h 0022 0023 #include <KBookmark> 0024 0025 #include "bookmarkiterator.h" 0026 0027 class FavIconsItrHolder : public BookmarkIteratorHolder 0028 { 0029 public: 0030 FavIconsItrHolder(QObject *parent, KBookmarkModel *model); 0031 }; 0032 0033 class KBookmarkModel; 0034 class FavIconUpdater; 0035 0036 class FavIconsItr : public BookmarkIterator 0037 { 0038 Q_OBJECT 0039 0040 public: 0041 FavIconsItr(BookmarkIteratorHolder *holder, const QList<KBookmark> &bks); 0042 ~FavIconsItr() override; 0043 0044 void cancel() override; 0045 0046 public Q_SLOTS: 0047 void slotDone(bool succeeded, const QString &errorString); 0048 0049 protected: 0050 void doAction() override; 0051 bool isApplicable(const KBookmark &bk) const override; 0052 0053 private: 0054 void setStatus(const QString &status); 0055 FavIconUpdater *m_updater; 0056 QString m_oldStatus; 0057 }; 0058 0059 #endif