{
}
+void KitaHTMLPart::reset()
+{
+ m_prevQuery = "";
+ m_nextHit = 0;
+ m_hitCount = 0;
+ m_contents = "";
+ m_pointStack.clear();
+}
+
void KitaHTMLPart::highLightenNodes( DOM::NodeList nodes, const QStringList &query )
{
for ( unsigned int count = 0; count < nodes.length(); ++count ) {
void KitaHTMLPart::displayContentsAndGotoURL( const QString& input, const Kita::Thread& thread )
{
- setContents( input );
+ m_contents = input;
displayContents( contents(), thread.datURL() );
if ( thread.datURL().hasRef() ) {
highlightCSS = highlightCSS.arg( "yellow" ).arg( "black" );
if ( prevQuery() != query && !query.isEmpty() ) {
- setPrevQuery(query);
+ m_prevQuery = query;
displayContents( contents(), m_url );
DOM::NodeList nodes;
resetHit();
public:
int nextHit();
void resetHit() { m_nextHit = 0; }
- void resetHitCount() { m_hitCount = 0; }
const QStringList prevQuery() const { return m_prevQuery; }
void pushCurrentPosition();
- void clearPosition() { m_pointStack.clear(); }
+ void reset();
bool gotoAnchor( const QString& name );
+private:
- void setPrevQuery( const QStringList& prevQuery ) { m_prevQuery = prevQuery; }
- void setContents( const QString& contents ) { m_contents = contents; }
-
+public:
KitaHTMLPart(QWidget *parent, const char *name = 0);
~KitaHTMLPart();
void highLighten( bool yes, const QStringList &query );
private:
const QString contents() const { return m_contents; }
void displayContents( const QString& input, const KURL& urlOfInput = 0 );
+ void clearPosition() { m_pointStack.clear(); }
signals:
void setLocationBarURL( const QString &url );
void KitaThreadView::showThread( const Kita::Thread& thread )
{
{ //reset member variables associated with a thread.
- m_threadPart->setPrevQuery("");
- m_threadPart->resetHit();
- m_threadPart->resetHitCount();
+ m_threadPart->reset();
m_writeResult = "";
- m_threadPart->setContents("");
- m_threadPart->clearPosition();
}
m_thread = thread;