src/chronoline.cpp
// Scale range changing by mouse wheel
Scale range changing by mouse wheel
Scale range changing by mouse wheel
void ChronoLine::wheelEvent(QWheelEvent* event)
{
    int centerX = event->pos().x();
    float centerRate = (float)centerX/width();
    if (event->delta()>0)
        zoomIn(centerRate);
    else
        zoomOut(centerRate);
    updateAll();
    event->accept();
}
void ChronoLine :: wheelEvent ( QWheelEvent * event ) { int centerX = event -> pos ( ) . x ( ) ; float centerRate = ( float ) centerX / width ( ) ; if ( event -> delta ( ) > 0 ) zoomIn ( centerRate ) ; else zoomOut ( centerRate ) ; updateAll ( ) ; event -> accept ( ) ; }
Scale range changing by mouse wheel
Scale range changing by mouse wheel