20 #include <QApplication>
30 if ( !event->isAccepted() )
34 if ( mDeactivateOnMouseRelease )
40 if ( event->isAutoRepeat() )
47 if ( !( event->modifiers() & Qt::ControlModifier ) )
56 mDeactivateOnMouseRelease =
true;
63 updateCursor( event->modifiers() );
64 if ( event->key() == Qt::Key_Space )
66 mDeactivateOnMouseRelease =
false;
73 if ( event->isAutoRepeat() )
79 if ( event->key() == Qt::Key_Space )
89 mDeactivateOnMouseRelease =
true;
94 updateCursor( event->modifiers() );
101 mDeactivateOnMouseRelease =
false;
104 updateCursor( QApplication::keyboardModifiers() );
107 void QgsLayoutViewToolTemporaryKeyZoom::updateCursor( Qt::KeyboardModifiers modifiers )
109 view()->viewport()->setCursor( ( modifiers & Qt::AltModifier ) ?