Exemplo n.º 1
0
QToolBoxPrivate::Page *QToolBoxPrivate::page( QWidget *widget )
{
    if ( !widget )
	return 0;

    for ( PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i )
	if ( (*i).widget == widget )
	    return (Page*) &(*i);
    return 0;
}
Exemplo n.º 2
0
void QToolBoxPrivate::updateTabs()
{
    QToolBoxButton *lastButton = currentPage ? currentPage->button : 0;
    bool after = FALSE;
    for ( PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i ) {
	if (after) {
	    (*i).button->setEraseColor((*i).widget->eraseColor());
	    (*i).button->update();
	} else if ( (*i).button->backgroundMode() != Qt::PaletteBackground ) {
	    (*i).button->setBackgroundMode( Qt::PaletteBackground );
	    (*i).button->update();
	}
	after = (*i).button == lastButton;
    }
}