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

void Q3MainWindow::setVisible ( bool  visible  )  [virtual]

Reimplemented from QWidget.

Definition at line 1302 of file q3mainwindow.cpp.

References QWidget::hide(), QWidget::isVisible(), QWidget::isWindow(), QWidget::setAttribute(), setUpLayout(), QWidget::show(), and QWidget::testAttribute().

{
    Q_D(Q3MainWindow);
    if (visible) {
        if (!d->tll)
            setUpLayout();

        // show all floating dock windows not explicitly hidden
        if (!isVisible()) {
            for (int i = 0; i < d->dockWindows.size(); ++i) {
                Q3DockWindow *dw = d->dockWindows.at(i);
                if (dw->isWindow() && !dw->isVisible() && !dw->testAttribute(Qt::WA_WState_Hidden)) {
                    reinterpret_cast<Q3MainWindow *>(dw)->setAttribute(Qt::WA_WState_Hidden);
                    dw->show();
                }
            }
        }
    } else if (isVisible()) {
        for (int i = 0; i < d->dockWindows.size(); ++i) {
            Q3DockWindow *dw = d->dockWindows.at(i);
            if (dw->isWindow() && dw->isVisible()) {
                dw->hide(); // implicit hide, so clear forcehide
                reinterpret_cast<Q3MainWindow *>(dw)->setAttribute(Qt::WA_WState_Hidden, false);
            }
        }
    }
    QWidget::setVisible(visible);
}


Generated by  Doxygen 1.6.0   Back to index