--- /dev/null
+/***************************************************************************
+* Copyright (C) 2004 by Kita Developers *
+* ikemo@users.sourceforge.jp *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+#ifndef KITATHREADINDEX_H
+#define KITATHREADINDEX_H
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+
+#include <kurl.h>
+
+class KConfig;
+
+namespace Kita
+{
+ class Thread;
+
+ /**
+ @author Hideki Ikemoto
+ */
+ class KDE_EXPORT ThreadIndex
+ {
+ public:
+ ThreadIndex(const KUrl& url);
+
+ QString getSubject() const;
+ void setSubject(const QString& str);
+
+ int getResNum() const;
+ void setResNum(int resNum);
+
+ int getReadNum() const;
+ void setReadNum(int readNum);
+
+ int getViewPos() const;
+ void setViewPos(int viewPos);
+
+ void setMarkList(const QList<int>& markList);
+
+ /*---------------------------------*/
+
+ void loadIndex(Thread* thread, bool checkCached = true) const;
+ void saveIndex(const Thread* thread);
+
+ private:
+
+ QString getSubjectPrivate(const KConfig& config) const;
+ void setSubjectPrivate(KConfig& config, const QString& str);
+
+ int getResNumPrivate(KConfig& config) const;
+ void setResNumPrivate(KConfig& config, int resNum);
+
+ int getReadNumPrivate(KConfig& config, bool checkCached) const;
+ void setReadNumPrivate(KConfig& config, int readNum);
+
+ int getViewPosPrivate(const KConfig& config) const;
+ void setViewPosPrivate(KConfig& config, int viewPos);
+
+ QList<int> getMarkListPrivate(const KConfig& config) const;
+ void setMarkListPrivate(KConfig& config, const QList<int>& markList);
+
+ KUrl m_url;
+ QString m_indexPath;
+ };
+}
+
+#endif