Go to the documentation of this file.
70 if ( parent->focusPolicy() == Qt::NoFocus )
71 parent->setFocusPolicy( Qt::WheelFocus );
98 QObject* o = parent();
102 o->installEventFilter(
this );
104 o->removeEventFilter(
this );
203 Qt::MouseButton button, Qt::KeyboardModifiers modifiers )
211 Qt::MouseButton& button, Qt::KeyboardModifiers& modifiers )
const
251 Qt::KeyboardModifiers modifiers )
266 Qt::KeyboardModifiers& modifiers )
const
281 Qt::KeyboardModifiers modifiers )
296 Qt::KeyboardModifiers& modifiers )
const
319 if (
object &&
object == parent() )
321 switch ( event->type() )
323 case QEvent::MouseButtonPress:
328 case QEvent::MouseMove:
333 case QEvent::MouseButtonRelease:
343 case QEvent::KeyPress:
348 case QEvent::KeyRelease:
356 return QObject::eventFilter(
object, event );
392 Q_UNUSED( mouseEvent );
440 #if QT_VERSION < 0x050000
441 const int wheelDelta = wheelEvent->delta();
443 const QPoint delta = wheelEvent->angleDelta();
444 const int wheelDelta = ( qAbs( delta.x() ) > qAbs( delta.y() ) )
445 ? delta.x() : delta.y();
458 qAbs( wheelDelta / 120.0 ) );
460 if ( wheelDelta > 0 )
495 Q_UNUSED( keyEvent );
501 return qobject_cast< QWidget* >( parent() );
507 return qobject_cast< const QWidget* >( parent() );
511 #include "moc_qwt_magnifier.cpp"
void setZoomOutKey(int key, Qt::KeyboardModifiers=Qt::NoModifier)
virtual void widgetMouseMoveEvent(QMouseEvent *)
Qt::KeyboardModifiers zoomOutKeyModifiers
Qt::KeyboardModifiers wheelModifiers() const
void getZoomOutKey(int &key, Qt::KeyboardModifiers &) const
Retrieve the settings of the zoom out key.
void setKeyFactor(double)
Change the key factor.
virtual void widgetKeyReleaseEvent(QKeyEvent *)
Qt::KeyboardModifiers wheelModifiers
void setMouseFactor(double)
Change the mouse factor.
void setMouseButton(Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)
virtual void widgetKeyPressEvent(QKeyEvent *)
Qt::KeyboardModifiers mouseButtonModifiers
virtual void widgetMouseReleaseEvent(QMouseEvent *)
virtual void rescale(double factor)=0
void setEnabled(bool)
En/disable the magnifier.
void setZoomInKey(int key, Qt::KeyboardModifiers=Qt::NoModifier)
void setWheelModifiers(Qt::KeyboardModifiers)
virtual bool eventFilter(QObject *, QEvent *) QWT_OVERRIDE
Event filter.
virtual void widgetWheelEvent(QWheelEvent *)
double mouseFactor() const
Qt::MouseButton mouseButton
void getMouseButton(Qt::MouseButton &, Qt::KeyboardModifiers &) const
virtual void widgetMousePressEvent(QMouseEvent *)
void setWheelFactor(double)
Change the wheel factor.
void getZoomInKey(int &key, Qt::KeyboardModifiers &) const
Retrieve the settings of the zoom in key.
virtual ~QwtMagnifier()
Destructor.
double wheelFactor() const
Qt::KeyboardModifiers zoomInKeyModifiers
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45