21#include <QApplication>
24#include "moc_qgslayoutviewtooltemporarykeyzoom.cpp"
34 if ( !event->isAccepted() )
38 if ( mDeactivateOnMouseRelease )
44 if ( event->isAutoRepeat() )
51 if ( !( event->modifiers() & Qt::ControlModifier ) )
60 mDeactivateOnMouseRelease =
true;
67 updateCursor( event->modifiers() );
68 if ( event->key() == Qt::Key_Space )
70 mDeactivateOnMouseRelease =
false;
77 if ( event->isAutoRepeat() )
83 if ( event->key() == Qt::Key_Space )
93 mDeactivateOnMouseRelease =
true;
98 updateCursor( event->modifiers() );
105 mDeactivateOnMouseRelease =
false;
108 updateCursor( QApplication::keyboardModifiers() );
111void QgsLayoutViewToolTemporaryKeyZoom::updateCursor( Qt::KeyboardModifiers modifiers )
static QCursor getThemeCursor(Cursor cursor)
Helper to get a theme cursor.
A mouse event which is the result of a user interaction with a QgsLayoutView.
A graphical widget to display and interact with QgsLayouts.
void setTool(QgsLayoutViewTool *tool)
Sets the tool currently being used in the view.