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

Method on_mouseDoubleClick

ImagePlay/src/ImageViewerWindow.cpp:958–982  ·  view source on GitHub ↗

----------------------------------------------------------------------------- ! ImageViewerWindow::on_mouseDoubleClick Doubleclick the image to lock or unlock the position of the zoomWidget. The position stays the same for all image tabs. */

Source from the content-addressed store, hash-verified

956The position stays the same for all image tabs.
957*/
958void ImageViewerWindow::on_mouseDoubleClick()
959{
960 // either finish picking coordinates
961 if(_coordinatePickHandler)
962 {
963 _coordinatePickHandler->pickCoordinates(_currentPosition.x(), _currentPosition.y());
964 _coordinatePickHandler->finishPickingCoordinates();
965 }// either finish picking coordinates
966 else if(_colorPickHandler)
967 {
968 _colorPickHandler->pickColor(IPLColor(_currentColor.redF(), _currentColor.greenF(), _currentColor.blueF()));
969 _colorPickHandler->finishPickingColor();
970 }
971 // or lock the zoomer position
972 else
973 {
974 ui->zoomWidget->togglePositionLocked();
975
976 // update icon
977 if(ui->zoomWidget->isPositionLocked())
978 ui->positionLockedLabel->setStyleSheet("background-image: url(:/padlock_closed_inv.png) no-repeat;");
979 else
980 ui->positionLockedLabel->setStyleSheet("background-image: url(:/padlock_open_inv.png) no-repeat;");
981 }
982}
983//-----------------------------------------------------------------------------
984/*!
985ImageViewerWindow::on_zoomWidgetModeCombobox_currentIndexChanged

Callers

nothing calls this directly

Calls 5

IPLColorClass · 0.85
pickCoordinatesMethod · 0.80
togglePositionLockedMethod · 0.80
isPositionLockedMethod · 0.80

Tested by

no test coverage detected