| 122 | } |
| 123 | |
| 124 | void PathologyViewer::zoom(float numSteps) { |
| 125 | if (!_img) { |
| 126 | return; |
| 127 | } |
| 128 | _numScheduledScalings += numSteps; |
| 129 | if (_numScheduledScalings * numSteps < 0) { |
| 130 | _numScheduledScalings = numSteps; |
| 131 | } |
| 132 | |
| 133 | QTimeLine *anim = new QTimeLine(300, this); |
| 134 | anim->setUpdateInterval(5); |
| 135 | |
| 136 | connect(anim, SIGNAL(valueChanged(qreal)), SLOT(scalingTime(qreal))); |
| 137 | connect(anim, SIGNAL(finished()), SLOT(zoomFinished())); |
| 138 | anim->start(); |
| 139 | } |
| 140 | |
| 141 | void PathologyViewer::scalingTime(qreal x) |
| 142 | { |