return TRUE;
}
+
+bool DatInfo::isOpened()
+{
+ return m_isOpened;
+}
+
+void DatInfo::setIsOpened( bool isOpened )
+{
+ m_isOpened = isOpened;
+}
KURL m_datURL;
bool m_broken;
ResDatVec m_resDatVec;
+ bool m_isOpened;
/* for caching */
Access* m_access;
bool isResBroken( int num );
bool checkID( const QString& strid, int num );
bool checkWord( QStringList& stlist, int num, bool checkOR );
+ bool isOpened();
+ void setIsOpened( bool isOpened );
/* abone check */
bool checkAbone( int num );
/* check if the thread is shown on the main thread tab. */ /* public */
bool DatManager::isMainThreadOpened( const KURL& url )
{
- KURL datURL = Kita::getDatURL( url ).prettyURL();
- Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
- if ( thread == NULL ) return FALSE;
+ DatInfo * datInfo = getDatInfo( url );
+ if ( datInfo == NULL ) return FALSE;
- return thread->isOpened();
+ return datInfo->isOpened();
}
void DatManager::setMainThreadOpened( const KURL& url, bool isOpened )
{
- KURL datURL = Kita::getDatURL( url ).prettyURL();
- Kita::Thread* thread = Kita::Thread::getByURLNew( datURL );
- if ( thread != NULL ) thread->setIsOpened( isOpened );
+ DatInfo * datInfo = getDatInfo( url );
+ if ( datInfo == NULL ) return;
+
+ datInfo->setIsOpened( isOpened );
}
QDict<Thread>* Thread::m_threadDict = 0;
Thread::Thread( const KURL& datURL )
- : m_datURL( datURL ), m_threadName( 0 ) , m_resNum( 0 ), m_readNum( 0 ), m_viewPos( 0 ), m_isOpened( 0 )
+ : m_datURL( datURL ), m_threadName( 0 ) , m_resNum( 0 ), m_readNum( 0 ), m_viewPos( 0 )
{}
Thread::~Thread()
m_viewPos = num;
}
-
-/* public */
-bool Thread::isOpened() const
-{
- return m_isOpened;
-}
-
-/* public */
-void Thread::setIsOpened( bool isOpened )
-{
- m_isOpened = isOpened;
-}
-
/* public */
const QValueList< int >& Thread::markList() const
{
int m_resNum;
int m_readNum;
int m_viewPos;
- bool m_isOpened;
QValueList< int > m_markList;
public:
const int viewPos() const;
void setViewPos( int viewPos );
- bool isOpened() const;
- void setIsOpened( bool isOpend );
-
const QValueList< int >& markList() const;
void setMarkList( const QValueList< int >& markList );
bool isMarked( int num );