1 /***************************************************************************
2 * Copyright (C) 2004 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10 #ifndef FAVORITETHREADS_H
11 #define FAVORITETHREADS_H
13 #include <QtCore/QList>
14 #include <QtCore/QString>
16 #include <kdemacros.h>
21 *@author Hideki Ikemoto
23 class FavoriteThreadItem
28 FavoriteThreadItem(const QString& datUrl) { m_datUrl = datUrl; }
29 ~FavoriteThreadItem();
31 bool operator==(const FavoriteThreadItem& item) const;
34 class KDE_EXPORT FavoriteThreads
36 static FavoriteThreads* instance;
37 QList<FavoriteThreadItem> m_threadList;
42 const QList<FavoriteThreadItem> threadList() const;
43 static void processThreadNode(QDomNode& node);
46 static FavoriteThreads* getInstance();
48 void insert(const QString& datUrl);
49 void remove(const QString& datUrl);
50 bool contains(const QString& datUrl);
51 const QString toXML() const;
52 static bool readFromXML(const QString& xml);
53 static void replace(const QString& fromUrl, const QString& toUrl);
54 static QString getDatUrl(int i);
55 static int count() { return getInstance() ->m_threadList.count(); }