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 );
+ }
}