Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QSize Q3Table::sizeHint (  )  const [virtual]

Reimplemented from Q3ScrollView.

Definition at line 4273 of file q3table.cpp.

References Q3ScrollView::cachedSizeHint(), QWidget::height(), QSize::height(), Q3ScrollView::setCachedSizeHint(), QSize::setHeight(), QSize::setWidth(), Q3ScrollView::sizeHint(), tableSize(), Q3ScrollView::topMargin(), QSize::width(), and QWidget::width().

{
    if (cachedSizeHint().isValid())
        return cachedSizeHint();

    constPolish();

    QSize s = tableSize();
    QSize sh;
    if (s.width() < 500 && s.height() < 500) {
        sh = QSize(tableSize().width() + VERTICALMARGIN + 5,
                    tableSize().height() + topMargin() + 5);
    } else {
            sh = Q3ScrollView::sizeHint();
            if (!topHeader->isHidden())
                sh.setHeight(sh.height() + topHeader->height());
            if (!leftHeader->isHidden())
                sh.setWidth(sh.width() + leftHeader->width());
    }
    setCachedSizeHint(sh);
    return sh;
}


Generated by  Doxygen 1.6.0   Back to index