From: <hep...@us...> - 2011-03-10 17:43:39
|
Revision: 1289 http://qterm.svn.sourceforge.net/qterm/?rev=1289&view=rev Author: hephooey Date: 2011-03-10 17:43:33 +0000 (Thu, 10 Mar 2011) Log Message: ----------- Factor out the tab setup part Modified Paths: -------------- trunk/qterm-qt4/src/qtermframe.cpp trunk/qterm-qt4/src/qtermframe.h Modified: trunk/qterm-qt4/src/qtermframe.cpp =================================================================== --- trunk/qterm-qt4/src/qtermframe.cpp 2011-03-05 22:11:16 UTC (rev 1288) +++ trunk/qterm-qt4/src/qtermframe.cpp 2011-03-10 17:43:33 UTC (rev 1289) @@ -93,13 +93,7 @@ setupUi(this); - foreach(QTabBar* tabBar, findChildren<QTabBar*>()) { - tabBar->setTabsClosable(true); - tabBar->setMovable(true); - tabBar->setExpanding(false); - connect(tabBar, SIGNAL(tabCloseRequested(int)), - this, SLOT(closeWindowByIndex(int))); - } + updateTabBar(); connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(windowActivated(QMdiSubWindow*)) ); @@ -1220,6 +1214,16 @@ actionsExtra->addAction(action); } } +void Frame::updateTabBar() +{ + foreach(QTabBar* tabBar, findChildren<QTabBar*>()) { + tabBar->setTabsClosable(true); + tabBar->setMovable(true); + tabBar->setExpanding(false); + connect(tabBar, SIGNAL(tabCloseRequested(int)), + this, SLOT(closeWindowByIndex(int))); + } +} } Modified: trunk/qterm-qt4/src/qtermframe.h =================================================================== --- trunk/qterm-qt4/src/qtermframe.h 2011-03-05 22:11:16 UTC (rev 1288) +++ trunk/qterm-qt4/src/qtermframe.h 2011-03-10 17:43:33 UTC (rev 1289) @@ -147,6 +147,7 @@ QAction * insertThemeItem(const QString &); void setUseTray(bool); + void updateTabBar(); private: static Frame * s_instance; AssistantClient m_assistant; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |