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

void MandelbrotWidget::keyPressEvent ( QKeyEvent event  )  [protected, virtual]

[10]

[11]

Reimplemented from QWidget.

Definition at line 142 of file mandelbrotwidget.cpp.

References QKeyEvent::key(), QWidget::keyPressEvent(), scroll(), and zoom().

{
    switch (event->key()) {
    case Qt::Key_Plus:
        zoom(ZoomInFactor);
        break;
    case Qt::Key_Minus:
        zoom(ZoomOutFactor);
        break;
    case Qt::Key_Left:
        scroll(-ScrollStep, 0);
        break;
    case Qt::Key_Right:
        scroll(+ScrollStep, 0);
        break;
    case Qt::Key_Down:
        scroll(0, -ScrollStep);
        break;
    case Qt::Key_Up:
        scroll(0, +ScrollStep);
        break;
    default:
        QWidget::keyPressEvent(event);
    }
}


Generated by  Doxygen 1.6.0   Back to index