MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / zoomTo

Method zoomTo

ImagePlay/src/IPProcessGrid.cpp:470–483  ·  view source on GitHub ↗

! * \brief IPProcessGrid::zoomTo * \param newScale */

Source from the content-addressed store, hash-verified

468 * \param newScale
469 */
470void IPProcessGrid::zoomTo(float newScale)
471{
472 newScale = newScale > 3.0 ? 3.0 : newScale;
473 newScale = newScale < 0.5 ? 0.5 : newScale;
474
475 _scale = newScale;
476
477 QMatrix matrix;
478 matrix.scale(_scale, _scale);
479 setMatrix(matrix);
480
481 // update statusbar
482 _mainWindow->statusBar()->showMessage(QString("Zoom: %1%").arg(QString::number(_scale*100, 'f', 0)));
483}
484
485/*!
486 * \brief IPProcessGrid::wheelEvent

Callers

nothing calls this directly

Calls 1

showMessageMethod · 0.80

Tested by

no test coverage detected