Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / keditbookmarks / favicons.h
blob8a5ac0a159d65417cb24a0ba69adc3df8d83769c
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) 2002-2003 Alexander Kellett <lypanov@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of
9 the License, or (at your option) version 3.
11 This program 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
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>
20 #ifndef __favicons_h
21 #define __favicons_h
23 #include <kbookmark.h>
25 #include "bookmarkiterator.h"
27 class FavIconsItrHolder : public BookmarkIteratorHolder {
28 public:
29 static FavIconsItrHolder* self() {
30 if (!s_self) { s_self = new FavIconsItrHolder(); }; return s_self;
32 void addAffectedBookmark( const QString & address );
33 protected:
34 virtual void doItrListChanged();
35 private:
36 FavIconsItrHolder();
37 static FavIconsItrHolder *s_self;
38 QString m_affectedBookmark;
41 class FavIconUpdater;
43 class FavIconsItr : public BookmarkIterator
45 Q_OBJECT
47 public:
48 FavIconsItr(QList<KBookmark> bks);
49 ~FavIconsItr();
50 virtual FavIconsItrHolder* holder() const { return FavIconsItrHolder::self(); }
52 public Q_SLOTS:
53 void slotDone(bool succeeded);
55 protected:
56 virtual void doAction();
57 virtual bool isApplicable(const KBookmark &bk) const;
59 private:
60 void setStatus(const QString & status);
61 FavIconUpdater *m_updater;
62 QString m_oldStatus;
65 #endif