OSDN Git Service

remove custom tabbar
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 7 Jun 2007 15:12:17 +0000 (15:12 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Thu, 7 Jun 2007 15:12:17 +0000 (15:12 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1933 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/thread/threadtabwidget.cpp
kita/src/thread/threadtabwidget.h

index 9a3d504..52cb089 100644 (file)
@@ -46,8 +46,6 @@ KitaThreadTabWidget::KitaThreadTabWidget( int mode, QWidget* parent, const char*
     case TABMODE_THREADVIEW: setXMLFile( "threadtabwidgetui.rc" ); break;
     }
 
-    setTabBar( new KitaThreadTabBar( this ) );
-
     connectSignals();
     setupActions();
 
@@ -678,72 +676,6 @@ void KitaThreadTabWidget::slotDeleteButtonClicked()
 /*---------------------------------------------------------------------*/
 /*---------------------------------------------------------------------*/
 
-
-
-KitaThreadTabBar::KitaThreadTabBar( QWidget* parent, const char* name ) : KTabBar( parent, name ) {
-    connect( this, SIGNAL( contextMenu( int, const QPoint& ) ),
-             SLOT( showPopupMenu( int, const QPoint& ) ) );
-}
-
-KitaThreadTabBar::~KitaThreadTabBar() {
-}
-
-/* private */ /* virtual */
-void KitaThreadTabBar::showPopupMenu( int idx, const QPoint& global )
-{
-    enum{
-        MENU_CLOSE,
-        MENU_CLOSEOTHER,
-        MENU_CLOSELEFT,
-        MENU_CLOSERIGHT,
-        MENU_OPENBROWSER,
-        MENU_COPYURL,
-        MENU_COPYTITLE
-    };
-
-    KitaThreadTabWidget* tabwidget = static_cast<KitaThreadTabWidget*>( parentWidget() );
-    KActionCollection * collection = tabwidget->actionCollection();
-
-    KPopupMenu* popup = new KPopupMenu( this );
-    popup->clear();
-
-    popup->insertItem( i18n( "Close this tab" ) , MENU_CLOSE );
-    collection->action( "tab_prevtab" ) ->plug( popup );
-    collection->action( "tab_nexttab" ) ->plug( popup );
-    popup->insertSeparator();
-
-    popup->insertItem( i18n( "Close Other Tabs" ) , MENU_CLOSEOTHER );
-    popup->insertItem( i18n( "Close right tabs" ) , MENU_CLOSERIGHT );
-    popup->insertItem( i18n( "Close left tabs" ) , MENU_CLOSELEFT );
-    collection->action( "tab_closealltab" ) ->plug( popup );
-
-    popup->insertSeparator();
-
-    popup->insertItem( i18n( "Open with Web Browser" ) , MENU_OPENBROWSER );
-    popup->insertItem( i18n( "Copy URL" ) , MENU_COPYURL );
-    popup->insertItem( i18n( "Copy title and URL" ) , MENU_COPYTITLE );
-
-    popup->insertSeparator();
-    collection->action( "tab_configkeys" ) ->plug( popup );
-
-
-    int ret = popup->exec( global );
-    delete popup;
-
-    switch ( ret ) {
-    case MENU_CLOSE: tabwidget->slotCloseTab( idx ); break;
-    case MENU_CLOSEOTHER: tabwidget->slotCloseOtherTab( idx ); break;
-    case MENU_CLOSERIGHT: tabwidget->slotCloseRightTab( idx ); break;
-    case MENU_CLOSELEFT: tabwidget->slotCloseLeftTab( idx ); break;
-    case MENU_OPENBROWSER: tabwidget->slotOpenBrowser( idx ); break;
-    case MENU_COPYURL: tabwidget->slotCopyURL( idx ); break;
-    case MENU_COPYTITLE: tabwidget->slotCopyTitleURL( idx ); break;
-    }
-
-}
-
-
-
 /*---------------------------------------------------------------------*/
 /*---------------------------------------------------------------------*/
 /*---------------------------------------------------------------------*/
index ecf104c..e8dcba8 100644 (file)
@@ -90,26 +90,8 @@ public slots:
     void slotDeleteButtonClicked();
 };
 
-
-/*--------------------------------------------------*/
-
-
-class KitaThreadTabBar : public KTabBar
-{
-    Q_OBJECT
-
-public:
-    KitaThreadTabBar( QWidget* parent = 0, const char* name = 0 );
-    ~KitaThreadTabBar();
-
-public slots:
-    virtual void showPopupMenu( int idx, const QPoint& global );
-};
-
-
 /*------------------------------------------------------------*/
 
-
 class KitaThreadDock : public KitaDockWidgetBase
 {