KitaCacheInfo* KitaCacheInfo::instance = 0;
-KitaCacheInfo::KitaCacheInfo() : m_vestedDict()
+KitaCacheInfo::KitaCacheInfo() : m_readDict()
{
}
return instance;
}
-int KitaCacheInfo::getVestedNum(const KURL& url)
+int KitaCacheInfo::readNum(const KURL& url)
{
QString key = url.prettyURL();
- if(m_vestedDict.contains(key)) {
- return m_vestedDict[key];
+ if( m_readDict.contains(key) ) {
+ return m_readDict[key];
} else {
return 0;
}
}
-void KitaCacheInfo::setVestedNum(const KURL& url, int num)
+void KitaCacheInfo::setReadNum(const KURL& url, int num)
{
- m_vestedDict.insert(url.prettyURL(), num);
+ m_readDict.insert(url.prettyURL(), num);
}
int KitaCacheInfo::resNum( const KURL& url )
QDataStream& operator<<(QDataStream& s, KitaCacheInfo& c)
{
- s << c.m_vestedDict;
+ s << c.m_readDict;
return s;
}
QDataStream& operator>>(QDataStream& s, KitaCacheInfo& c)
{
- s >> c.m_vestedDict;
+ s >> c.m_readDict;
return s;
}
{
public:
static KitaCacheInfo* getInstance();
- void setVestedNum(const KURL& url, int num);
- int getVestedNum(const KURL& url);
+ void setReadNum(const KURL& url, int num);
+ int readNum(const KURL& url);
void setResNum( const KURL& url, int num );
int resNum( const KURL& url );
friend QDataStream& operator<<(QDataStream& s, KitaCacheInfo& c);
private:
KitaCacheInfo();
~KitaCacheInfo();
- QMap<QString, int> m_vestedDict;
+ QMap<QString, int> m_readDict;
QMap<QString, int> m_resNumDict;
static KitaCacheInfo* instance;
};
Row_Icon,
Row_Subject,
Row_ResNum,
- Row_Vested,
+ Row_Read,
Row_Unread,
Row_DatName,
Row_DatURL
subjectList->addColumn("");
subjectList->addColumn(i18n("Title"));
subjectList->addColumn(i18n("ResNum"));
- subjectList->addColumn(i18n("Vested"));
+ subjectList->addColumn(i18n("ReadNum"));
subjectList->addColumn(i18n("Unread"));
subjectList->addColumn(i18n("Dat"));
Kita::Thread* thread = new Kita::Thread( m_board, datURL,
item->text( Row_Subject ),
- item->text( Row_Vested ).toInt() );
+ item->text( Row_Read ).toInt() );
emit signalShowThread( *thread );
}
for(unsigned i=0; i<threadList.count(); i++) {
Kita::Thread* thread = threadList.at(i);
- int vested = cache->getVestedNum(thread->datURL());
+ int readNum = cache->readNum(thread->datURL());
new KListViewItem(subjectList,
QString("%1").arg(i+1, 4),
"",
thread->name(),
QString("%1").arg(thread->resNum(), 4),
- (vested > 0) ? QString::number(vested) : QString(""),
- (vested > 0 && thread->resNum() != vested) ? QString::number(thread->resNum() - vested) : QString(""),
+ (readNum > 0) ? QString::number(readNum) : QString(""),
+ (readNum > 0 && thread->resNum() != readNum) ? QString::number(thread->resNum() - readNum) : QString(""),
thread->datURL().fileName(),
thread->datURL().prettyURL());
}
for(QListViewItem* item = subjectList->firstChild(); item; item = item->nextSibling() ) {
if( item->text(Row_DatURL) == updated_thread.datURL().prettyURL() ) {
int resNum = item->text( Row_ResNum ).toInt();
- int vested = updated_thread.resNum();
- item->setText( Row_Vested, QString::number( vested ) );
- item->setText( Row_Unread, vested > 0 && resNum != vested ? QString::number(resNum - vested) : QString(""));
+ int readNum = updated_thread.resNum();
+ item->setText( Row_Read, QString::number( readNum ) );
+ item->setText( Row_Unread, readNum > 0 && resNum != readNum ? QString::number(resNum - readNum) : QString(""));
}
}
}
Kita::Thread thread( m_board, datURL );
thread.setName( item->text( Row_Subject ) );
- thread.setResNum( item->text( Row_Vested ).toInt() );
+ thread.setResNum( item->text( Row_Read ).toInt() );
QClipboard* clipboard = QApplication::clipboard();