17#include "moc_qgslayoutviewtooltemporarykeyzoom.cpp"
21#include <QApplication>
31 if ( !event->isAccepted() )
35 if ( mDeactivateOnMouseRelease )
41 if ( event->isAutoRepeat() )
48 if ( !( event->modifiers() & Qt::ControlModifier ) )
57 mDeactivateOnMouseRelease =
true;
64 updateCursor( event->modifiers() );
65 if ( event->key() == Qt::Key_Space )
67 mDeactivateOnMouseRelease =
false;
74 if ( event->isAutoRepeat() )
80 if ( event->key() == Qt::Key_Space )
90 mDeactivateOnMouseRelease =
true;
95 updateCursor( event->modifiers() );
102 mDeactivateOnMouseRelease =
false;
105 updateCursor( QApplication::keyboardModifiers() );
108void QgsLayoutViewToolTemporaryKeyZoom::updateCursor( Qt::KeyboardModifiers modifiers )
Extends QApplication to provide access to QGIS specific resources such as theme paths,...
static QCursor getThemeCursor(Cursor cursor)
Helper to get a theme cursor.
A QgsLayoutViewMouseEvent is the result of a user interaction with the mouse on a QgsLayoutView.
A graphical widget to display and interact with QgsLayouts.
void setTool(QgsLayoutViewTool *tool)
Sets the tool currently being used in the view.