OSDN Git Service

impl 'open with tab'
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 28 Jul 2003 16:01:30 +0000 (16:01 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 28 Jul 2003 16:01:30 +0000 (16:01 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@421 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/kitathreadtabwidget.cpp

index 3e55172..7d5bd9d 100644 (file)
@@ -45,10 +45,32 @@ KitaThreadTabWidget::~KitaThreadTabWidget()
 
 void KitaThreadTabWidget::showThread( const Kita::Thread& thread )
 {
-  m_view->showThread( thread );
+  // TODO: ¥¹¥ì¤¬¤É¤³¤«¤Î¥¿¥Ö¤Ë¤¹¤Ç¤Ë¤¢¤ë¤È¤­¤Ï¤½¤ì¤ò»È¤¦
+  static_cast<KitaThreadView *>( currentPage() )->showThread( thread );
+  setTabLabel( currentPage(), thread.name() );
 }
 
 void KitaThreadTabWidget::showThreadWithTab( const Kita::Thread& thread )
 {
-  m_view->showThreadWithTab( thread );
+  KLibFactory* factory = KLibLoader::self()->factory( "libkitapart" );
+  if( factory ) {
+    KitaThreadPart* part = static_cast<KitaThreadPart *>( factory->create( this, "thread", "KitaThreadPart" ) );
+    KitaThreadView* view = static_cast<KitaThreadView *>( part->widget() );
+    addTab( view, thread.name() );
+
+    connect( view, SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ),
+             this, SIGNAL( openURLRequest( const KURL&, const KParts::URLArgs& ) ) );
+    connect( view, SIGNAL( signalChangeStatusbar( const QString& ) ),
+             this, SIGNAL( signalChangeStatusbar( const QString& ) ) );
+    connect( view, SIGNAL( thread( const Kita::Thread& ) ),
+             this, SIGNAL( thread( const Kita::Thread& ) ) );
+    connect( view, SIGNAL( writeSucceeded() ),
+             this, SIGNAL( writeSucceeded() ) );
+    connect( view, SIGNAL( bookmarked( const Kita::Thread&, bool ) ),
+             this, SIGNAL( bookmarked( const Kita::Thread&, bool ) ) );
+    connect( view, SIGNAL( showThreadCompleted( const KURL& ) ),
+             this, SIGNAL( showThreadCompleted( const KURL& ) ) );
+    view->showThread( thread );
+    showPage( view );
+  }
 }