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

void QPlainTextEdit::wheelEvent ( QWheelEvent e  )  [protected, virtual]

Reimplemented from QAbstractScrollArea.

Definition at line 2152 of file qplaintextedit.cpp.

References QWheelEvent::delta(), QWheelEvent::orientation(), QWidget::updateMicroFocus(), and QAbstractScrollArea::wheelEvent().

{
    Q_D(QPlainTextEdit);

    if (e->orientation() == Qt::Vertical) {
        int offset = qAbs(QApplication::wheelScrollLines() * e->delta() / 120);
        d->_q_verticalScrollbarActionTriggered(e->delta() < 0 ?
                                               QAbstractSlider::SliderSingleStepAdd
                                               : QAbstractSlider::SliderSingleStepSub,
                                               offset);
    } else {
        QAbstractScrollArea::wheelEvent(e);
    }
    updateMicroFocus();
}


Generated by  Doxygen 1.6.0   Back to index