OSDN Git Service

refactoring.
[kita/kita.git] / kita / src / threadlistview.cpp
index 720ae5a..1a7b4cd 100644 (file)
@@ -10,6 +10,8 @@
 
 #include "threadlistview.h"
 
+#include "viewmediator.h"
+
 #include <kiconloader.h>
 #include <klistview.h>
 #include <klocale.h>
@@ -74,12 +76,6 @@ ThreadListView::ThreadListView( QWidget* parent, const char* name )
              SLOT( slotHideButton( bool ) ) );
     connect( subjectList, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ),
              SLOT( slotMouseButtonClicked( int, QListViewItem* ) ) );
-    connect( this, SIGNAL( bookmarked( const QString&, bool ) ),
-             Kita::SignalCollection::getInstance(), SIGNAL( bookmarked( const QString&, bool ) ) );
-    connect( this, SIGNAL( openURLRequestExt( const KURL&, const QString ) ),
-             Kita::SignalCollection::getInstance(), SIGNAL( openURLRequestExt( const KURL&, const QString ) ) );
-    connect( this, SIGNAL( openThread( const KURL& ) ),
-             Kita::SignalCollection::getInstance(), SIGNAL( openThread( const KURL& ) ) );
 }
 
 ThreadListView::~ThreadListView()
@@ -94,7 +90,7 @@ void ThreadListView::slotSearchButton()
         clearSearch();
     } else if ( list != m_prevquery ) {
         searchNew( list );
-        slotHideButton( true );
+        HideButton->setOn( true );
     } else {
         searchNext( list );
     }
@@ -177,10 +173,8 @@ void ThreadListView::slotMouseButtonClicked( int button, QListViewItem* item )
 
     KURL datURL = item->text( Col_DatURL );
 
-    switch ( button ) {
-    case LeftButton:
-        emit openThread( datURL );
-        break;
+    if ( button == LeftButton ) {
+        ViewMediator::getInstance()->openThread( datURL );
     }
 }