const Kita::Thread* thread = it.current();
if ( thread->datURL() == item->text( Col_DatURL ) ) {
- emit signalShowThread( thread );
+ emit showThreadRequested( thread, false );
}
}
}
KRun::runURL( thread->url(), "text/html" );
break;
case 1:
- emit signalShowThreadWithNewTab( thread );
+ emit showThreadRequested( thread, true );
break;
case 2:
clipboard->setText( thread->name() + "\n" + thread->url() );
/**
* @param thread ɽ¼¨¤¹¤ë¥¹¥ì
*/
- void signalShowThread( const Kita::Thread* thread );
- void signalShowThreadWithNewTab( const Kita::Thread* thread );
+ void showThreadRequested( const Kita::Thread* thread, bool withNewTab );
};
#endif
connect( m_boardView, SIGNAL( openBoardRequested( const QString&, bool ) ),
m_subjectTab, SLOT( loadBoard( const QString&, bool ) ) );
- connect( m_subjectTab, SIGNAL( signalShowThread( const Kita::Thread* ) ),
- m_threadTab, SLOT( showThread( const Kita::Thread* ) ) );
-
- // ad-hoc
- connect( m_subjectTab, SIGNAL( signalShowThreadWithNewTab( const Kita::Thread* ) ),
- m_threadTab, SLOT( showThreadWithNewTab( const Kita::Thread* ) ) );
+ connect( m_subjectTab, SIGNAL( showThreadRequested( const Kita::Thread*, bool ) ),
+ m_threadTab, SLOT( showThread( const Kita::Thread*, bool ) ) );
connect( m_threadTab, SIGNAL( thread( const Kita::Thread* ) ),
m_subjectTab, SLOT( updateThread( const Kita::Thread* ) ) );
void KitaSubjectTabWidget::connectSignals( Kita::ThreadListView* view )
{
- connect( view, SIGNAL( signalShowThread( const Kita::Thread* ) ),
- this, SIGNAL( signalShowThread( const Kita::Thread* ) ) );
- connect( view, SIGNAL( signalShowThreadWithNewTab( const Kita::Thread* ) ),
- this, SIGNAL( signalShowThreadWithNewTab( const Kita::Thread* ) ) );
+ connect( view, SIGNAL( showThreadRequested( const Kita::Thread*, bool ) ),
+ this, SIGNAL( showThreadRequested( const Kita::Thread*, bool ) ) );
}
void KitaSubjectTabWidget::slotCurrentChanged( QWidget* widget )
void deleteView( KitaSubjectView* view );
signals:
- void signalShowThread( const Kita::Thread* );
- void signalShowThreadWithNewTab( const Kita::Thread* );
+ void showThreadRequested( const Kita::Thread*, bool withNewTab );
void loadBoardCompleted( const KURL& );
};
Kita::Thread* thread = Kita::Thread::getByURL( datURL.url() );
- emit signalShowThread( thread );
+ emit showThreadRequested( thread, false );
}
void KitaSubjectView::loadBoard( const Kita::Board* board )
KRun::runURL( thread->url(), "text/html" );
break;
case 1:
- emit signalShowThreadWithNewTab( thread );
+ emit showThreadRequested( thread, true );
break;
case 2:
clipboard->setText( thread->name() + "\n" + thread->url() );
switch ( button ) {
case MidButton:
- emit signalShowThreadWithNewTab( thread );
+ emit showThreadRequested( thread, true );
break;
case LeftButton:
- emit signalShowThread( thread );
+ emit showThreadRequested( thread, false );
break;
}
}
signals:
void loadBoardCompleted( const KURL& );
- void signalShowThread( const Kita::Thread* thread );
- void signalShowThreadWithNewTab( const Kita::Thread* thread );
+ void showThreadRequested( const Kita::Thread* thread, bool withNewTab );
};
#endif
}
}
+void KitaThreadTabWidget::showThread( const Kita::Thread* thread, bool withNewTab )
+{
+ if ( withNewTab ) {
+ showThreadWithNewTab( thread );
+ } else {
+ showThread( thread );
+ }
+}
+
KitaThreadView* KitaThreadTabWidget::createView()
{
KLibFactory * factory = KLibLoader::self() ->factory( "libkitapart" );
public slots:
void showThread( const Kita::Thread* thread );
void showThread( const QString& datURL, bool withNewTab = false );
+ void showThread( const Kita::Thread* thread, bool withNewTab );
void showThreadWithNewTab( const Kita::Thread* thread ); // ad-hoc
void deleteView( KitaThreadView* );
void reloadThread();