QwtMagnifier provides zooming, by magnifying in steps.
More...
#include <qwt_magnifier.h>
QwtMagnifier provides zooming, by magnifying in steps.
Using QwtMagnifier a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction.
Definition at line 27 of file qwt_magnifier.h.
QwtMagnifier::QwtMagnifier |
( |
QWidget * |
parent | ) |
|
|
explicit |
Constructor
- Parameters
-
parent | Widget to be magnified |
Definition at line 62 of file qwt_magnifier.cpp.
QwtMagnifier::~QwtMagnifier |
( |
| ) |
|
|
virtual |
bool QwtMagnifier::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
virtual |
void QwtMagnifier::getMouseButton |
( |
Qt::MouseButton & |
button, |
|
|
Qt::KeyboardModifiers & |
modifiers |
|
) |
| const |
void QwtMagnifier::getZoomInKey |
( |
int & |
key, |
|
|
Qt::KeyboardModifiers & |
modifiers |
|
) |
| const |
Retrieve the settings of the zoom in key.
- Parameters
-
key | Key code, see Qt::Key |
modifiers | Keyboard modifiers |
- See also
- setZoomInKey()
Definition at line 264 of file qwt_magnifier.cpp.
void QwtMagnifier::getZoomOutKey |
( |
int & |
key, |
|
|
Qt::KeyboardModifiers & |
modifiers |
|
) |
| const |
Retrieve the settings of the zoom out key.
- Parameters
-
key | Key code, see Qt::Key |
modifiers | Keyboard modifiers |
- See also
- setZoomOutKey()
Definition at line 294 of file qwt_magnifier.cpp.
bool QwtMagnifier::isEnabled |
( |
| ) |
const |
double QwtMagnifier::keyFactor |
( |
| ) |
const |
double QwtMagnifier::mouseFactor |
( |
| ) |
const |
QWidget * QwtMagnifier::parentWidget |
( |
| ) |
|
const QWidget * QwtMagnifier::parentWidget |
( |
| ) |
const |
virtual void QwtMagnifier::rescale |
( |
double |
factor | ) |
|
|
protectedpure virtual |
void QwtMagnifier::setEnabled |
( |
bool |
on | ) |
|
En/disable the magnifier.
When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.
- Parameters
-
- See also
- isEnabled(), eventFilter()
Definition at line 91 of file qwt_magnifier.cpp.
void QwtMagnifier::setKeyFactor |
( |
double |
factor | ) |
|
void QwtMagnifier::setMouseButton |
( |
Qt::MouseButton |
button, |
|
|
Qt::KeyboardModifiers |
modifiers = Qt::NoModifier |
|
) |
| |
Assign the mouse button, that is used for zooming in/out. The default value is Qt::RightButton.
- Parameters
-
button | Button |
modifiers | Keyboard modifiers |
- See also
- getMouseButton()
Definition at line 201 of file qwt_magnifier.cpp.
void QwtMagnifier::setMouseFactor |
( |
double |
factor | ) |
|
void QwtMagnifier::setWheelFactor |
( |
double |
factor | ) |
|
Change the wheel factor.
The wheel factor defines the ratio between the current range on the parent widget and the zoomed range for each step of the wheel.
Use values > 1 for magnification (i.e. 2.0) and values < 1 for scaling down (i.e. 1/2.0 = 0.5). You can use this feature for inverting the direction of the wheel.
The default value is 0.9.
- Parameters
-
- See also
- wheelFactor(), setWheelButtonState(), setMouseFactor(), setKeyFactor()
Definition at line 133 of file qwt_magnifier.cpp.
void QwtMagnifier::setWheelModifiers |
( |
Qt::KeyboardModifiers |
modifiers | ) |
|
Assign keyboard modifiers for zooming in/out using the wheel. The default modifiers are Qt::NoModifiers.
- Parameters
-
modifiers | Keyboard modifiers |
- See also
- wheelModifiers()
Definition at line 154 of file qwt_magnifier.cpp.
void QwtMagnifier::setZoomInKey |
( |
int |
key, |
|
|
Qt::KeyboardModifiers |
modifiers = Qt::NoModifier |
|
) |
| |
void QwtMagnifier::setZoomOutKey |
( |
int |
key, |
|
|
Qt::KeyboardModifiers |
modifiers = Qt::NoModifier |
|
) |
| |
double QwtMagnifier::wheelFactor |
( |
| ) |
const |
Qt::KeyboardModifiers QwtMagnifier::wheelModifiers |
( |
| ) |
const |
void QwtMagnifier::widgetKeyPressEvent |
( |
QKeyEvent * |
keyEvent | ) |
|
|
protectedvirtual |
void QwtMagnifier::widgetKeyReleaseEvent |
( |
QKeyEvent * |
keyEvent | ) |
|
|
protectedvirtual |
void QwtMagnifier::widgetMouseMoveEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
void QwtMagnifier::widgetMousePressEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
void QwtMagnifier::widgetMouseReleaseEvent |
( |
QMouseEvent * |
mouseEvent | ) |
|
|
protectedvirtual |
void QwtMagnifier::widgetWheelEvent |
( |
QWheelEvent * |
wheelEvent | ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following files: