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

bool QSizeGrip::event ( QEvent e  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 304 of file qsizegrip.cpp.

References QCoreApplication::closingDown(), QWidget::event(), QWidget::isRightToLeft(), QWidget::parentWidget(), and QEvent::type().

{
    Q_D(QSizeGrip);
    switch(e->type()) {
#if defined(Q_WS_MAC)
    case QEvent::Hide:
    case QEvent::Show:
        d->atBottom = qt_sizegrip_atBottom(this);
        if(!QApplication::closingDown() && parentWidget()) {
            if(QWidget *w = qt_sizegrip_topLevelWidget(this)) {
                if(w->isWindow())
                    QWidgetPrivate::qt_mac_update_sizer(w, e->type() == QEvent::Hide ? -1 : 1);
            }
        }
        break;
#endif
    case QEvent::MouseButtonRelease:
        d->gotMousePress = false;
        d->p = QPoint();
        break;
    case QEvent::Move:
        // We're inside a resize operation; no update necessary.
        if (!d->p.isNull())
            break;

        // Update "bottomness" and cursor.
        if (qt_sizegrip_atBottom(this) != d->atBottom) {
            d->atBottom = !d->atBottom;
#if !defined(QT_NO_CURSOR) && !defined(Q_WS_MAC)
            setCursor(isRightToLeft() ^ d->atBottom ? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor);
#endif
        }
        break;
    default:
        break;
    }
    return QWidget::event(e);
}


Generated by  Doxygen 1.6.0   Back to index