OSDN Git Service

remove.
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 19 Jul 2007 11:43:52 +0000 (11:43 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 19 Jul 2007 11:43:52 +0000 (11:43 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@2031 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/htmlpart.cpp
kita/src/htmlpart.h
kita/src/libkita/signalcollection.h
kita/src/prefs/prefs.cpp
kita/src/prefs/prefs.h
kita/src/previewpart.cpp
kita/src/previewpart.h

index 9197215..f07dde0 100644 (file)
@@ -160,7 +160,6 @@ void KitaHTMLPart::connectSignals()
     /* rendering */
     connect( signalCollection, SIGNAL( redrawAllHTMLPart( bool ) ), SLOT( slotRedrawAllHTMLPart( bool ) ) );
     connect( signalCollection, SIGNAL( threadFaceChanged() ), SLOT( slotSetFaceOfHTMLPart() ) );
-    connect( signalCollection, SIGNAL( setStyleSheetOfHTMLPart() ), SLOT( slotSetStyleSheetOfHTMLPart() ) );
 
     /* popup */
     connect( this, SIGNAL( onURL( const QString& ) ), SLOT( slotOnURL( const QString& ) ) );
@@ -345,35 +344,6 @@ void KitaHTMLPart::slotSetFaceOfHTMLPart()
     htmlDocument().applyChanges();
 }
 
-/* public slot */
-void KitaHTMLPart::slotSetStyleSheetOfHTMLPart()
-{
-    /* [0]<html> -> [1]<head> -> [2]<style> */
-    DOM::HTMLCollection collection = htmlDocument().all();
-    DOM::HTMLElement elm;
-    unsigned int i;
-    for ( i = 0 ; i < collection.length() ; i++ ) {
-        elm = collection.item( i );
-        if ( elm.tagName().upper() == "STYLE" ) {
-            QString style = QString( "body { font-size: %1pt; font-family: %2; color: %3; background-color: %4; }" )
-                            .arg( Kita::Config::threadFont().pointSize() )
-                            .arg( Kita::Config::threadFont().family() )
-                            .arg( Kita::Config::threadColor().name() )
-                            .arg( Kita::Config::threadBackground().name() );
-
-            QString style0 = KitaConfig::defaultStyleSheetText();
-            style0 += style;
-            if ( Kita::Config::useStyleSheet() ) {
-                style0 += KitaConfig::styleSheetText();
-            }
-
-            elm.setInnerText( style0 );
-            htmlDocument().applyChanges();
-            break;
-        }
-    }
-}
-
 /*---------------------------------------------------------------*/
 /*---------------------------------------------------------------*/
 /* cache functions */
index dc1989a..b5e6e17 100644 (file)
@@ -108,7 +108,6 @@ public slots:
     /* rendering */
     void slotRedrawAllHTMLPart( bool force );
     void slotSetFaceOfHTMLPart();
-    void slotSetStyleSheetOfHTMLPart();
 
     /* cache */
     void slotReceiveData();
index d2f1cc2..41736c5 100644 (file)
@@ -55,7 +55,6 @@ namespace Kita
 
         /* to : KitaHTMLPart */
         void redrawAllHTMLPart( bool force );
-        void setStyleSheetOfHTMLPart();
 
         /*--------------------------------*/
 
index 1bdafc7..6192602 100644 (file)
@@ -260,9 +260,6 @@ FacePrefPage::FacePrefPage( QWidget* parent )
 
     connect( styleSheetText, SIGNAL( textChanged() ), SIGNAL( changed() ) );
     connect( useStyleSheetCheckBox, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) );
-
-    connect( this, SIGNAL( setStyleSheetOfHTMLPart() ),
-             signalCollection, SIGNAL( setStyleSheetOfHTMLPart() ) );
 }
 
 void FacePrefPage::apply()
@@ -298,7 +295,6 @@ void FacePrefPage::apply()
             Kita::Config::useStyleSheet() != useStyleSheetCheckBox->isChecked() ) {
         KitaConfig::setStyleSheetText( styleSheetText->text() );
         Kita::Config::setUseStyleSheet( useStyleSheetCheckBox->isChecked() );
-        emit setStyleSheetOfHTMLPart();
     }
 }
 
index 6d8fb86..2fa20f5 100644 (file)
@@ -130,7 +130,6 @@ namespace Kita
         void fontChanged( const QFont& );
         void threadFaceChanged();
         void changed();
-        void setStyleSheetOfHTMLPart();
     };
 }
 
index eb0669d..1190954 100644 (file)
@@ -83,7 +83,6 @@ void KitaPreviewPart::connectSignals()
 
     /* rendering */
     connect( signalCollection, SIGNAL( threadFaceChanged() ), SLOT( slotSetFaceOfHTMLPart() ) );
-    connect( signalCollection, SIGNAL( setStyleSheetOfHTMLPart() ), SLOT( slotSetStyleSheetOfHTMLPart() ) );
 
     /* popup */
     connect( this, SIGNAL( onURL( const QString& ) ), SLOT( slotOnURL( const QString& ) ) );
@@ -147,34 +146,6 @@ void KitaPreviewPart::slotSetFaceOfHTMLPart()
     htmlDocument().applyChanges();
 }
 
-void KitaPreviewPart::slotSetStyleSheetOfHTMLPart()
-{
-    /* [0]<html> -> [1]<head> -> [2]<style> */
-    DOM::HTMLCollection collection = htmlDocument().all();
-    DOM::HTMLElement element;
-    unsigned int i;
-    for ( i = 0 ; i < collection.length() ; i++ ) {
-        element = collection.item( i );
-        if ( element.tagName().upper() == "STYLE" ) {
-            QString style = QString( "body { font-size: %1pt; font-family: %2; color: %3; background-color: %4; }" )
-                            .arg( Kita::Config::threadFont().pointSize() )
-                            .arg( Kita::Config::threadFont().family() )
-                            .arg( Kita::Config::threadColor().name() )
-                            .arg( Kita::Config::threadBackground().name() );
-
-            QString style0 = KitaConfig::defaultStyleSheetText();
-            style0 += style;
-            if ( Kita::Config::useStyleSheet() ) {
-                style0 += KitaConfig::styleSheetText();
-            }
-
-            element.setInnerText( style0 );
-            htmlDocument().applyChanges();
-            break;
-        }
-    }
-}
-
 /*
  * @Override
  */
index 39d0551..385f3ee 100644 (file)
@@ -49,7 +49,6 @@ public slots:
 
     /* rendering */
     void slotSetFaceOfHTMLPart();
-    void slotSetStyleSheetOfHTMLPart();
 
     /* res popup */
     void slotDeletePopup();