From kde-commits Thu Mar 25 01:52:06 2004 From: =?utf-8?q?Richard=20J=2E=20Moore?= Date: Thu, 25 Mar 2004 01:52:06 +0000 To: kde-commits Subject: kdenetwork/ksirc Message-Id: <20040325015206.073319190 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108017953118315 CVS commit by rich: Added the ability to set the position of the tabbar as you can in konsole. M +24 -2 displayMgrMDI.cpp 1.43 M +1 -0 displayMgrMDI.h 1.15 --- kdenetwork/ksirc/displayMgrMDI.cpp #1.42:1.43 @@ -65,6 +65,13 @@ void DisplayMgrMDI::newTopLevel( QWidget connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) ); - KToggleAction *showfull = KStdAction::fullScreen( this, SLOT(toggleFullScreen()), - t->actionCollection(), t ); + KSelectAction *selectTabbar = new KSelectAction(i18n("&Tab Bar"), 0, this, "tabbar" ); + QStringList tabbaritems; + tabbaritems << i18n("&Top") << i18n("&Bottom"); + selectTabbar->setItems(tabbaritems); + selectTabbar->setCurrentItem(1); + selectTabbar->plug( sm ); + connect( selectTabbar, SIGNAL(activated(int)), this, SLOT(setTabPosition(int)) ); + + KToggleAction *showfull = KStdAction::fullScreen( 0, 0, t->actionCollection(), t ); showfull->plug( sm ); connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) ); @@ -240,4 +247,17 @@ MDITopLevel *DisplayMgrMDI::topLevel() } +void DisplayMgrMDI::setTabPosition( int idx ) { + + switch ( idx ) { + case 0: + m_topLevel->tabWidget()->setTabPosition(QTabWidget::Top); + break; + case 1: + m_topLevel->tabWidget()->setTabPosition(QTabWidget::Bottom); + break; + } +} + + void DisplayMgrMDI::setFullScreen( bool full ) { if ( full ) --- kdenetwork/ksirc/displayMgrMDI.h #1.14:1.15 @@ -29,4 +29,5 @@ protected slots: void moveWindowLeft(); void moveWindowRight(); + void setTabPosition(int); void setFullScreen(bool);