mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Qt6: Fix QMouseEvent.x() and .y() deprecation.
This commit is contained in:
@@ -137,7 +137,7 @@ bool RicBoxManipulatorEventHandler::eventFilter( QObject* obj, QEvent* inputEven
|
||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
|
||||
|
||||
cvf::ref<cvf::RayIntersectSpec> rayIS =
|
||||
viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(), mouseEvent->pos().y() );
|
||||
viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->position().x(), mouseEvent->position().y() );
|
||||
|
||||
if ( rayIS.notNull() )
|
||||
{
|
||||
|
||||
@@ -128,8 +128,9 @@ bool RicPointTangentManipulator::eventFilter( QObject* obj, QEvent* inputEvent )
|
||||
{
|
||||
auto* mouseEvent = static_cast<QMouseEvent*>( inputEvent );
|
||||
|
||||
cvf::ref<cvf::RayIntersectSpec> rayIs =
|
||||
m_viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->pos().x(), mouseEvent->pos().y(), m_isDraggingInComparisonView );
|
||||
cvf::ref<cvf::RayIntersectSpec> rayIs = m_viewer->rayIntersectSpecFromWindowCoordinates( mouseEvent->position().x(),
|
||||
mouseEvent->position().y(),
|
||||
m_isDraggingInComparisonView );
|
||||
|
||||
if ( !rayIs.isNull() && rayIs->ray() )
|
||||
{
|
||||
|
||||
@@ -1076,8 +1076,8 @@ void RiuViewer::mouseMoveEvent( QMouseEvent* mouseEvent )
|
||||
RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker();
|
||||
if ( viewLinker )
|
||||
{
|
||||
int translatedMousePosX = mouseEvent->pos().x();
|
||||
int translatedMousePosY = height() - mouseEvent->pos().y();
|
||||
int translatedMousePosX = mouseEvent->position().x();
|
||||
int translatedMousePosY = height() - mouseEvent->position().y();
|
||||
|
||||
cvf::Vec3d displayCoord( 0, 0, 0 );
|
||||
if ( mainCamera()->unproject( cvf::Vec3d( static_cast<double>( translatedMousePosX ), static_cast<double>( translatedMousePosY ), 0 ),
|
||||
|
||||
@@ -139,11 +139,11 @@ void RiuWellLogTrack::onMouseMoveEvent( QMouseEvent* mouseEvent )
|
||||
double depth = 0.0;
|
||||
if ( depthTrackPlot->depthOrientation() == RiaDefines::Orientation::HORIZONTAL )
|
||||
{
|
||||
depth = axisMap.invTransform( mouseEvent->pos().x() );
|
||||
depth = axisMap.invTransform( mouseEvent->position().x() );
|
||||
}
|
||||
else
|
||||
{
|
||||
depth = axisMap.invTransform( mouseEvent->pos().y() );
|
||||
depth = axisMap.invTransform( mouseEvent->position().y() );
|
||||
}
|
||||
|
||||
depthTrackPlot->setDepthMarkerPosition( depth );
|
||||
|
||||
Reference in New Issue
Block a user