コード例 #1
0
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;
        }
    }
}
コード例 #2
0
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( ) ) );
   }
}
コード例 #3
0
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;
        }
    }
}
コード例 #4
0
void UserTabBar::resizeEvent(QResizeEvent *e)
{
    QTabBar::resizeEvent(e);
    QTimer::singleShot(0, this, SLOT(slotRepaint()));
}