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 ***************************************************************************/
11 #ifndef FAVORITETHREADS_H
12 #define FAVORITETHREADS_H
24 @author Hideki Ikemoto
26 class FavoriteThreadItem
31 FavoriteThreadItem( const QString& datURL ) { m_datURL = datURL; }
32 ~FavoriteThreadItem();
34 bool operator==( const FavoriteThreadItem& item ) const;
39 static FavoriteThreads* instance;
40 QValueList<FavoriteThreadItem> m_threadList;
43 const QValueList<FavoriteThreadItem> threadList() const;
45 static FavoriteThreads* getInstance();
46 void insert( const QString& datURL );
47 void remove( const QString& datURL );
48 static bool contains( const QString& datURL );
49 const QString toXML() const;
50 static bool readFromXML( const QString& xml );
51 static void processThreadNode( QDomNode& node );
52 static void replace( QString fromURL, QString toURL );
53 // FIXME: use Iterator
54 static QString getDatURL( int i );
55 static int count() { return getInstance()->m_threadList.count(); }