OSDN Git Service

remove useless code.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 18 Jun 2007 14:05:41 +0000 (14:05 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 18 Jun 2007 14:05:41 +0000 (14:05 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1959 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/write/previewpart.cpp
kita/src/write/previewpart.h

index 5556287..1d41870 100644 (file)
@@ -197,48 +197,6 @@ void KitaPreviewPart::createHTMLDocument()
 /* direct rendering functions */
 
 
-/*-----------------*/
-/* show  responses */
-
-/* !!! don't forget to call updateScreen() later !!! */   /* public */
-void KitaPreviewPart::showResponses( int startnum, int endnum )
-{
-    if ( !m_domtree ) return ;
-
-    for ( int i = startnum ; i <= endnum; i++ ) m_domtree->appendRes( i );
-}
-
-/*-------------------*/
-/* update screen     */ /* public */
-void KitaPreviewPart::updateScreen( bool showHeaderEtc, bool clock )
-{
-    if ( !m_domtree ) {
-        view() ->setFocus();
-        return ;
-    }
-
-    /* show clock cursor */
-    if ( clock ) {
-        QCursor qc; qc.setShape( Qt::WaitCursor );
-        QApplication::setOverrideCursor( qc );
-    }
-
-    /* show header, footer, and kokomadeyonda, etc. */
-    if ( showHeaderEtc ) {
-        m_domtree->appendKokoyon();
-        m_domtree->appendFooterAndHeader();
-    }
-
-    /* update display */
-    htmlDocument().applyChanges();
-    view() ->layout();
-    view() ->setVScrollBarMode( QScrollView::AlwaysOn );
-    view() ->setFocus();
-
-    if ( clock ) QApplication::restoreOverrideCursor();
-}
-
-
 /* public */
 void KitaPreviewPart::setInnerHTML( const QString& innerHTML )
 {
@@ -310,61 +268,6 @@ void KitaPreviewPart::slotSetStyleSheetOfHTMLPart()
 
 /*---------------------------------------------------------------*/
 /*---------------------------------------------------------------*/
-/* goto anchor */
-
-
-/* public */
-bool KitaPreviewPart::gotoAnchor( const QString& anc, bool pushPosition )
-{
-    if ( anc == QString::null ) return FALSE;
-    if ( !m_domtree )
-        return KHTMLPart::gotoAnchor( anc );
-
-    hidePopup();
-
-    QString ancstr = anc;
-    int res = ancstr.toInt();
-
-    if ( res > 1 ) {
-
-        /* is target valid ? */
-        if ( !Kita::DatManager::isResValid( m_datURL, res ) ) return FALSE;
-
-        ancstr = QString().setNum( res );
-    }
-
-    if ( res == 1 ) ancstr = "header";
-    if ( pushPosition ) pushCurrentPosition();
-
-    /* KHTMLPart::gotoAnchor() will fail if the thread is not shown. */
-    /* So KHTMLPart::gotoAnchor() should be called via custom event. */
-    /* See also KitaPreviewPart::customEvent() */
-    GotoAnchorEvent * e = new GotoAnchorEvent( ancstr );
-    QApplication::postEvent( this, e );  // Qt will delete it when done
-
-    return TRUE;
-}
-
-/* private */
-void KitaPreviewPart::pushCurrentPosition()
-{
-    m_anchorStack += getCurrentIDofNode();
-}
-
-
-/* find the id of current node */ /* private */
-QString KitaPreviewPart::getCurrentIDofNode()
-{
-    DOM::Node node;
-    node = nodeUnderMouse();
-    while ( node != NULL && node.nodeName().string() != "div" ) node = node.parentNode();
-    if ( node == NULL ) return QString::null;
-
-    return static_cast<DOM::Element>( node ).getAttribute( "id" ).string();
-}
-
-/*---------------------------------------------------------------*/
-/*---------------------------------------------------------------*/
 /* search */
 
 
index 2ee1129..6e45773 100644 (file)
@@ -60,7 +60,6 @@ class KitaPreviewPart : public KHTMLPart
 
 
     /* cache */
-    bool m_firstReceive;
     int m_centerNum;
 
     /* goto anchor */
@@ -89,13 +88,8 @@ public:
     bool setup( int mode , const KURL& url );
 
     /* rendering */
-    void showResponses( int startnum, int endnum );
-    void updateScreen( bool showHeaderEtc, bool clock );
     void setInnerHTML( const QString& innerHTML );
 
-    /* goto anchor */
-    bool gotoAnchor( const QString& anc, bool pushPosition );
-
 public slots:
 
     /* rendering */
@@ -115,10 +109,6 @@ private:
     void connectSignals();
     void createHTMLDocument();
 
-    /* goto anchor */
-    void pushCurrentPosition();
-    QString getCurrentIDofNode();
-
     /* popup menu */
     void showPopupMenu( const KURL& kurl );