QValueStack<QPoint> m_pointStack;
public:
int nextHit();
+ void resetHit() { m_nextHit = 0; }
int hitCount() { return m_hitCount; }
QStringList prevQuery() { return m_prevQuery; }
QString contents() { return m_contents; }
bool gobackAnchor();
bool gotoAnchor(const QString& name);
- void setNextHit(int nextHit) { m_nextHit = nextHit; }
+// void setNextHit(int nextHit) { m_nextHit = nextHit; }
void setHitCount(int hitCount) { m_hitCount = hitCount; }
void setPrevQuery(QStringList prevQuery) { m_prevQuery = prevQuery; }
void setContents(QString contents) { m_contents = contents; }
{
{ //reset member variables associated with a thread.
m_threadPart->setPrevQuery("");
- m_threadPart->setNextHit(0);
+ m_threadPart->resetHit();
m_threadPart->setHitCount(0);
m_writeResult = "";
m_threadData = "";
gotoAnchor( QString().setNum(m_thread.resNum() - 1) );
}
m_threadPart->pointStack().clear();
-#if 0
- KHTMLView * view = m_threadPart->view();
- m_threadPart->pointStack().push( QPoint( view->contentsX(), view->contentsY() ) );
-#else
m_threadPart->pushCurrentPosition();
-#endif
emit showThreadCompleted();
}
if ( query.isEmpty() ) return;
if ( ! HighLightButton->isOn() ) {
HighLightButton->toggle();
- m_threadPart->setNextHit(0); //A next jump-search target reset to '0'.
+ m_threadPart->resetHit(); //A next jump-search target reset to '0'.
// Process works asynchronusly. So Firstly, we don't do jump-search as a simple solution.
return;
}
if ( query != m_threadPart->prevQuery() ) {
highLighten( true, query );
- m_threadPart->setNextHit(0); //A next jump-search target reset to '0'.
+ m_threadPart->resetHit(); //A next jump-search target reset to '0'.
return;
}
- gotoAnchor( QString("highlighten%1").arg(m_threadPart->nextHit()) );
-#if 0
- m_threadPart->setNextHit(m_threadPart->nextHit() + 1);
- if ( !( m_threadPart->nextHit() < m_threadPart->hitCount() ) ) m_threadPart->setNextHit(0);
-#endif
+ gotoAnchor( QString("highlighten%1").arg( m_threadPart->nextHit() ) );
}
void KitaThreadView::highLighten(bool yes, const QStringList &query)
m_threadPart->setPrevQuery(query);
slotDisplayContents( m_threadPart->contents(), m_thread.datURL() );
DOM::NodeList nodes;
- m_threadPart->setHitCount(0);
+ m_threadPart->resetHit();
nodes = m_threadPart->document().getElementsByTagName("body");
m_threadPart->highLightenNodes( nodes, query );
}