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

Method on_mouseClick

ImagePlay/src/ImageViewerWindow.cpp:932–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932void ImageViewerWindow::on_mouseClick()
933{
934 if(_colorPickHandler)
935 _colorPickHandler->pickColor(IPLColor(_currentColor.redF(), _currentColor.greenF(), _currentColor.blueF()));
936
937 if(_coordinatePickHandler)
938 _coordinatePickHandler->pickCoordinates(_currentPosition.x(), _currentPosition.y());
939
940 // update the scroll bars when they are moved by a drag
941 IPImageViewer* viewer = dynamic_cast<IPImageViewer*>( ui->tabWidget->currentWidget() );
942 if (viewer && viewer->image()){
943 int horiz = viewer->horizontalScrollBar()->value();
944 int vert = viewer->verticalScrollBar()->value();
945 if ( horiz != _horizontalScrollValue )
946 on_horizontalScrollBarChanged( horiz );
947 if ( vert != _verticalScrollValue )
948 on_verticalScrollBarChanged( vert );
949 }
950}
951
952//-----------------------------------------------------------------------------
953/*!

Callers

nothing calls this directly

Calls 6

IPLColorClass · 0.85
pickCoordinatesMethod · 0.80
imageMethod · 0.80
horizontalScrollBarMethod · 0.80
verticalScrollBarMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected