Inserts first successfull qt6 migration Lts/Viewer

This commit is contained in:
torsten committed 2026-10-14 10:11:30 +02:00
1 parent c6d5dd1649
commit f675a65bc3
29 files changed
+238 -18437

No files matched your search

@@ -155,16 +155,16 @@ bool EventDispatcher::eventFilterGesture( QGestureEvent * gestureEvent )
{
case Qt::GestureStarted:
{
handled = onPress( hotSpot.x(), hotSpot.y(), nullptr );
handled = onPress( hotSpot.x(), hotSpot.y(), Qt::NoModifier );
if (handled) gestureEvent -> accept( panGesture );
} break;
case Qt::GestureUpdated:
handled = onMove ( hotSpot.x() + offset.x(), hotSpot.y() + offset.y(), Qt::MouseButton::LeftButton, nullptr );
handled = onMove ( hotSpot.x() + offset.x(), hotSpot.y() + offset.y(), Qt::MouseButton::LeftButton, Qt::NoModifier );
break;
case Qt::GestureFinished:
// handled = onMove ( hotSpot.x() + offset.x(), hotSpot.y() + offset.y(), Qt::MouseButton::LeftButton, 0 );
handled = onClick( hotSpot.x() + offset.x(), hotSpot.y() + offset.y(), nullptr );
handled = onClick( hotSpot.x() + offset.x(), hotSpot.y() + offset.y(), Qt::NoModifier );
break;
case Qt::GestureCanceled:
getEventActions()->resetAction( this, 0, 0 );
@@ -183,7 +183,7 @@ bool EventDispatcher::eventFilterGesture( QGestureEvent * gestureEvent )
case Qt::GestureFinished :
{
getEventActions()->resetAction( this, qRound(applyGesture->position().x()), qRound(applyGesture->position().y()) );
handled = onDoubleClick( qRound(applyGesture->position().x()), qRound(applyGesture->position().y()), nullptr );
handled = onDoubleClick( qRound(applyGesture->position().x()), qRound(applyGesture->position().y()), Qt::NoModifier );
if (handled)
{
gestureEvent -> accept( applyGesture );
@@ -211,11 +211,11 @@ bool EventDispatcher::eventFilterWheel( QWheelEvent * e )
const int WHEEL_DELTA = 120; // natural mouse driver constant
if (e->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier) &&
e->buttons().testFlag(Qt::MidButton))
e->buttons().testFlag(Qt::MiddleButton))
{
int newValue = (int)_snapRatio + (e->angleDelta() / WHEEL_DELTA).manhattanLength();
_snapRatio = (newValue < 5) ? 5 : newValue;
return onMove( e->x(), e->y(), e->buttons(), e->modifiers() );
return onMove( e->position().x(), e->position().y(), e->buttons(), e->modifiers() );
}
return false;
} /* EventDispatcher::eventFilterWheel */
@@ -266,21 +266,21 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e);
if (Qt::RightButton == mouseEvent->button())
{
handled = onMenuPress( mouseEvent->x()
, mouseEvent->y()
handled = onMenuPress( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->modifiers() );
}
if (Qt::LeftButton == mouseEvent->button())
{
if (!(mouseEvent->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier)))
{
handled = onPress( mouseEvent->x()
, mouseEvent->y()
handled = onPress( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->modifiers() );
if (handled) _leftPressHandled = true;
}
}
if (Qt::MidButton == mouseEvent->button())
if (Qt::MiddleButton == mouseEvent->button())
{
handled = mouseEvent->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier);
}
@@ -294,12 +294,12 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
QTouchEvent *mouseEvent = static_cast<QTouchEvent*>(e);
if (mouseEvent->touchPoints().size() > 0)
if (mouseEvent->points().size() > 0)
{
const QTouchEvent::TouchPoint tp = mouseEvent->touchPoints().at(0);
const QTouchEvent::TouchPoint tp = mouseEvent->points().at(0);
handled = onPress( tp.pos().x()
, tp.pos().y()
handled = onPress( tp.position().x()
, tp.position().y()
, mouseEvent->modifiers() );
if (handled) _leftPressHandled = true;
}
@@ -316,8 +316,8 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
{
if (!(mouseEvent->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier)))
{
onDoubleClick( mouseEvent->x()
, mouseEvent->y()
onDoubleClick( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->modifiers() );
_doubleClickHandled = handled = true;
@@ -334,8 +334,8 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e);
if (Qt::RightButton == mouseEvent->button())
{
handled = onMenuClick( mouseEvent->x()
, mouseEvent->y()
handled = onMenuClick( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->modifiers() );
}
if (Qt::LeftButton == mouseEvent->button())
@@ -346,14 +346,14 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
if (_leftPressHandled)
{
_leftPressHandled = false;
handled = onClick( mouseEvent->x()
, mouseEvent->y()
handled = onClick( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->modifiers() );
}
else callEventAction( &EventActionInterface::buttonPositionAction, mouseEvent->x(), mouseEvent->y() );
else callEventAction( &EventActionInterface::buttonPositionAction, mouseEvent->position().x(), mouseEvent->position().y() );
}
}
if (Qt::MidButton == mouseEvent->button())
if (Qt::MiddleButton == mouseEvent->button())
{
handled = mouseEvent->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier);
}
@@ -369,20 +369,20 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
QTouchEvent *mouseEvent = static_cast<QTouchEvent*>(e);
// The mouse button press event must had be handled before. If not skip button release ...
if (mouseEvent->touchPoints().size() > 0)
if (mouseEvent->points().size() > 0)
{
const QTouchEvent::TouchPoint tp = mouseEvent->touchPoints().at(0);
const QTouchEvent::TouchPoint tp = mouseEvent->points().at(0);
if (_leftPressHandled)
{
_leftPressHandled = false;
handled = onClick( tp.pos().x()
, tp.pos().y()
handled = onClick( tp.position().x()
, tp.position().y()
, mouseEvent->modifiers() );
}
else
{
callEventAction( &EventActionInterface::buttonPositionAction, tp.pos().x(), tp.pos().y() );
callEventAction( &EventActionInterface::buttonPositionAction, tp.position().x(), tp.position().y() );
}
}
@@ -398,7 +398,7 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e);
if (mouseEvent->buttons() != Qt::MidButton)
if (mouseEvent->buttons() != Qt::MiddleButton)
{
if (!(mouseEvent->modifiers().testFlag(Qt::KeyboardModifier::ControlModifier)))
{
@@ -417,8 +417,8 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
}
}
handled = onMove( mouseEvent->x()
, mouseEvent->y()
handled = onMove( mouseEvent->position().x()
, mouseEvent->position().y()
, mouseEvent->buttons()
, mouseEvent->modifiers());
@@ -441,12 +441,12 @@ bool EventDispatcher::eventFilter( QObject * watched, QEvent * e )
_doubleClickHandled = false;
QTouchEvent* mouseEvent = static_cast<QTouchEvent*>(e);
if (mouseEvent->touchPoints().size() > 0)
if (mouseEvent->points().size() > 0)
{
const QTouchEvent::TouchPoint tp = mouseEvent->touchPoints().at(0);
const QEventPoint tp = mouseEvent->points().at(0);
handled = onMove( tp.pos().x()
, tp.pos().y()
handled = onMove( tp.position().x()
, tp.position().y()
, Qt::LeftButton
, mouseEvent->modifiers());
}