OSDN Git Service

remove unused code.
[kita/kita.git] / kita / src / threadtabwidget.cpp
index 1ac081f..31901b6 100644 (file)
@@ -11,6 +11,7 @@
 #include "threadtabwidget.h"
 #include "threadview.h"
 #include "htmlpart.h"
+#include "viewmediator.h"
 
 #include "libkita/kita_misc.h"
 #include "libkita/parsemisc.h"
@@ -42,7 +43,6 @@ KitaThreadTabWidget::KitaThreadTabWidget( QWidget* parent, const char* name, WFl
 {
     setXMLFile( "threadtabwidgetui.rc" );
 
-    connectSignals();
     setupActions();
 
     /* default view */
@@ -52,7 +52,6 @@ KitaThreadTabWidget::KitaThreadTabWidget( QWidget* parent, const char* name, WFl
 
 KitaThreadTabWidget::~KitaThreadTabWidget() {}
 
-
 /* show "Main thread" view */  /* public slots */
 void KitaThreadTabWidget::slotShowMainThread( const KURL& url )
 {
@@ -133,19 +132,6 @@ KitaThreadView* KitaThreadTabWidget::createView( QString label )
     return view;
 }
 
-
-/* private */
-void KitaThreadTabWidget::connectSignals()
-{
-    Kita::SignalCollection * signalCollection = Kita::SignalCollection::getInstance();
-
-    connect( signalCollection, SIGNAL( updateThreadTab( const KURL& ) ),
-             this, SLOT( slotUpdateThreadTab( const KURL& ) ) );
-    connect( signalCollection, SIGNAL( threadFaceChanged() ),
-             SLOT( slotFontChanged() ) );
-}
-
-
 /* private */
 KitaThreadView* KitaThreadTabWidget::findMainView( const KURL& url )
 {
@@ -210,9 +196,9 @@ void KitaThreadTabWidget::deleteWidget( QWidget* w )
     KitaTabWidgetBase::deleteWidget( w );
 
     if ( count() == 0 ) {
-        emit setMainCaption( QString::null );
-        emit setMainStatusbar( QString::null );
-        emit setMainURLLine( QString::null );
+        ViewMediator::getInstance()->setMainCaption( QString::null );
+        ViewMediator::getInstance()->setMainStatusBar( QString::null );
+        ViewMediator::getInstance()->setMainURLLine( QString::null );
 
         /* default view */
         KitaThreadView * threadView = createView( "thread" );
@@ -472,58 +458,3 @@ void KitaThreadTabWidget::slotDeleteButtonClicked()
     KitaThreadView * view = isThreadView( currentPage() );
     if ( view ) view->slotDeleteButtonClicked();
 }
-
-
-/*---------------------------------------------------------------------*/
-/*---------------------------------------------------------------------*/
-/*---------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------*/
-/*---------------------------------------------------------------------*/
-/*---------------------------------------------------------------------*/
-
-
-/* Don't forget to call setup later ! */
-KitaThreadDock::KitaThreadDock( KDockManager* dockManager,
-                                const char* name,
-                                const QPixmap &pixmap,
-                                QWidget* parent,
-                                const QString& strCaption,
-                                const QString& strTabPageLabel,
-                                WFlags f )
-    : KitaDockWidgetBase( dockManager, name, pixmap, parent, strCaption, strTabPageLabel, f ) {}
-
-
-KitaThreadDock::~KitaThreadDock() {}
-
-
-/*-----------------------------*/
-/* Main Thread View */
-
-/* setup thig dock as main thread view */ /* public */
-KitaThreadTabWidget* KitaThreadDock::setupAsMainView()
-{
-    m_threadTab = new KitaThreadTabWidget( this, "Thread View" );
-    setWidget( m_threadTab );
-
-    return m_threadTab;
-}
-
-/* public slot */
-void KitaThreadDock::slotShowThread( const KURL& url )
-{
-    showDock();
-
-    if ( m_threadTab ) m_threadTab->slotShowMainThread( url );
-}
-
-/* show Thread Dock */ /* private slot */
-void KitaThreadDock::slotShowThreadDock()
-{
-    QWidget * topWidget = topLevelWidget();
-    if ( topWidget->isMinimized() ) topWidget->showNormal();
-    topWidget->raise();
-    topWidget->setActiveWindow();
-
-    slotShowDock();
-}