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

void QAbstractSpinBox::wheelEvent ( QWheelEvent event  )  [protected, virtual, inherited]

Reimplemented from QWidget.

Reimplemented in QDateTimeEdit.

Definition at line 1002 of file qabstractspinbox.cpp.

References QInputEvent::modifiers(), QAbstractSpinBox::stepBy(), and QAbstractSpinBox::stepEnabled().

Referenced by QDateTimeEdit::wheelEvent().

{
    const int steps = (event->delta() > 0 ? 1 : -1);
    if (stepEnabled() & (steps > 0 ? StepUpEnabled : StepDownEnabled))
        stepBy(event->modifiers() & Qt::ControlModifier ? steps * 10 : steps);
    event->accept();
}


Generated by  Doxygen 1.6.0   Back to index