void UserTabBar::changeTab(unsigned id) { layoutTabs(); QList<QTab> *tList = tabList(); for (QTab *t = tList->first(); t; t = tList->next()){ UserTab *tab = static_cast<UserTab*>(t); if (tab->wnd()->id() == id){ tab->setText(tab->wnd()->getName()); QTimer::singleShot(0, this, SLOT(slotRepaint())); break; } } }
void PMSettingsDialog::registerPage( QWidget* topPage, PMSettingsDialogPage* page ) { int i = pageIndex( topPage ); if( i < 0 ) kdError( PMArea ) << "PMSettingsDialog: Registered settings page" << " not found" << endl; else { m_pages.push_back( PMRegisteredSettingsPage( topPage, page, i ) ); connect( page, SIGNAL( repaintViews( ) ), SLOT( slotRepaint( ) ) ); connect( page, SIGNAL( showMe( ) ), SLOT( slotShowPage( ) ) ); } }
void UserTabBar::removeTab(unsigned id) { layoutTabs(); QList<QTab> *tList = tabList(); for (QTab *t = tList->first(); t; t = tList->next()){ UserTab *tab = static_cast<UserTab*>(t); if (tab == NULL) continue; if (tab->wnd()->id() == id){ QTabBar::removeTab(tab); QTimer::singleShot(0, this, SLOT(slotRepaint())); break; } } }
void UserTabBar::resizeEvent(QResizeEvent *e) { QTabBar::resizeEvent(e); QTimer::singleShot(0, this, SLOT(slotRepaint())); }