----------------------------------------------------------------------------- ! ImageViewerWindow::on_mouseDoubleClick Doubleclick the image to lock or unlock the position of the zoomWidget. The position stays the same for all image tabs. */
| 956 | The position stays the same for all image tabs. |
| 957 | */ |
| 958 | void 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 | /*! |
| 985 | ImageViewerWindow::on_zoomWidgetModeCombobox_currentIndexChanged |
nothing calls this directly
no test coverage detected