|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
QwtPolarMagnifier provides zooming, by magnifying in steps 更多...
#include <qwt_polar_magnifier.h>
类 | |
| class | PrivateData |
Public 槽 | |
| virtual void | rescale (double factor) override |
| Rescale the plot | |
| void | unzoom () |
| Unzoom the plot | |
Public 成员函数 | |
| QwtPolarMagnifier (QwtPolarCanvas *) | |
| Constructor | |
| ~QwtPolarMagnifier () override | |
| Destructor | |
| void | setUnzoomKey (int key, int modifiers) |
| Set the unzoom key | |
| void | getUnzoomKey (int &key, int &modifiers) const |
| Get the unzoom key | |
| QwtPolarPlot * | plot () |
| Get the plot | |
| const QwtPolarPlot * | plot () const |
| Get the plot (const version) | |
| QwtPolarCanvas * | canvas () |
| Get the canvas | |
| const QwtPolarCanvas * | canvas () const |
| Get the canvas (const version) | |
Public 成员函数 继承自 QwtMagnifier | |
| QwtMagnifier (QWidget *) | |
| Constructor | |
| QWidget * | parentWidget () |
| Return the parent widget where the rescaling happens | |
| const QWidget * | parentWidget () const |
| Return the parent widget where the rescaling happens | |
| void | setEnabled (bool) |
| En/disable the magnifier | |
| bool | isEnabled () const |
| Return whether the magnifier is enabled | |
| void | setMouseFactor (double) |
| Change the mouse factor | |
| double | mouseFactor () const |
| Return the mouse factor | |
| void | setMouseButton (Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier) |
| Assign the mouse button that is used for zooming in/out | |
| void | getMouseButton (Qt::MouseButton &, Qt::KeyboardModifiers &) const |
| Get the mouse button and modifiers used for zooming | |
| void | setWheelFactor (double) |
| Change the wheel factor | |
| double | wheelFactor () const |
| Return the wheel factor | |
| void | setWheelModifiers (Qt::KeyboardModifiers) |
| Assign keyboard modifiers for zooming in/out using the wheel | |
| Qt::KeyboardModifiers | wheelModifiers () const |
| Return the wheel modifiers | |
| void | setKeyFactor (double) |
| Change the key factor | |
| double | keyFactor () const |
| Return the key factor | |
| void | setZoomInKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| Assign the key that is used for zooming in | |
| void | getZoomInKey (int &key, Qt::KeyboardModifiers &) const |
| Retrieve the settings of the zoom in key | |
| void | setZoomOutKey (int key, Qt::KeyboardModifiers=Qt::NoModifier) |
| Assign the key that is used for zooming out | |
| void | getZoomOutKey (int &key, Qt::KeyboardModifiers &) const |
| Retrieve the settings of the zoom out key | |
| virtual bool | eventFilter (QObject *, QEvent *) override |
| Event filter | |
Protected 成员函数 | |
| virtual void | widgetKeyPressEvent (QKeyEvent *) override |
| Handle key press events | |
Protected 成员函数 继承自 QwtMagnifier | |
| virtual void | rescale (double factor)=0 |
| virtual void | widgetMousePressEvent (QMouseEvent *) |
| Handle a mouse press event for the observed widget. | |
| virtual void | widgetMouseReleaseEvent (QMouseEvent *) |
| Handle a mouse release event for the observed widget. | |
| virtual void | widgetMouseMoveEvent (QMouseEvent *) |
| Handle a mouse move event for the observed widget. | |
| virtual void | widgetWheelEvent (QWheelEvent *) |
| Handle a wheel event for the observed widget. | |
| virtual void | widgetKeyReleaseEvent (QKeyEvent *) |
| Handle a key release event for the observed widget. | |
QwtPolarMagnifier provides zooming, by magnifying in steps
Using QwtPlotMagnifier a plot can be zoomed in/out in steps using keys, the mouse wheel or moving a mouse button in vertical direction.
Together with QwtPolarPanner it is possible to implement an individual navigation of the plot canvas.
|
explicit |
Constructor
| canvas | Plot canvas to be magnified |
Destructor
| QwtPolarCanvas * QwtPolarMagnifier::canvas | ( | ) |
Get the canvas
Get the observed plot canvas
| const QwtPolarCanvas * QwtPolarMagnifier::canvas | ( | ) | const |
Get the canvas (const version)
Get the observed plot canvas (const version)
| void QwtPolarMagnifier::getUnzoomKey | ( | int & | key, |
| int & | modifiers | ||
| ) | const |
Get the unzoom key
Get the key and modifiers that are used for unzooming
| [out] | key | Key code |
| [out] | modifiers | Modifiers |
| QwtPolarPlot * QwtPolarMagnifier::plot | ( | ) |
Get the plot
Get the observed plot
| const QwtPolarPlot * QwtPolarMagnifier::plot | ( | ) | const |
Get the plot (const version)
Get the observed plot (const version)
|
overridevirtualslot |
Rescale the plot
Zoom in/out the zoomed area
| factor | A value < 1.0 zooms in, a value > 1.0 zooms out |
| void QwtPolarMagnifier::setUnzoomKey | ( | int | key, |
| int | modifiers | ||
| ) |
Set the unzoom key
Assign key and modifiers that are used for unzooming
The default combination is Qt::Key_Home + Qt::NoModifier.
| key | Key code |
| modifiers | Modifiers |
|
slot |
Unzoom the plot
Unzoom the plot widget
|
overrideprotectedvirtual |
Handle key press events
Handle a key press event for the observed widget.
| event | Key event |
重载 QwtMagnifier .