QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 槽 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtPolarMagnifier类 参考

QwtPolarMagnifier provides zooming, by magnifying in steps 更多...

#include <qwt_polar_magnifier.h>

类 QwtPolarMagnifier 继承关系图:
QwtMagnifier

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
 
QwtPolarPlotplot ()
 Get the plot
 
const QwtPolarPlotplot () const
 Get the plot (const version)
 
QwtPolarCanvascanvas ()
 Get the canvas
 
const QwtPolarCanvascanvas () 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.

参见
QwtPolarPanner, QwtPolarPlot, QwtPolarCanvas

构造及析构函数说明

◆ QwtPolarMagnifier()

QwtPolarMagnifier::QwtPolarMagnifier ( QwtPolarCanvas canvas)
explicit

Constructor

参数
canvasPlot canvas to be magnified

Destructor

成员函数说明

◆ canvas() [1/2]

QwtPolarCanvas * QwtPolarMagnifier::canvas ( )

Get the canvas

Get the observed plot canvas

返回
Observed plot canvas

◆ canvas() [2/2]

const QwtPolarCanvas * QwtPolarMagnifier::canvas ( ) const

Get the canvas (const version)

Get the observed plot canvas (const version)

返回
Observed plot canvas

◆ getUnzoomKey()

void QwtPolarMagnifier::getUnzoomKey ( int &  key,
int &  modifiers 
) const

Get the unzoom key

Get the key and modifiers that are used for unzooming

参数
[out]keyKey code
[out]modifiersModifiers
参见
setUnzoomKey(), QwtPolarPlot::unzoom()

◆ plot() [1/2]

QwtPolarPlot * QwtPolarMagnifier::plot ( )

Get the plot

Get the observed plot

返回
Observed plot

◆ plot() [2/2]

const QwtPolarPlot * QwtPolarMagnifier::plot ( ) const

Get the plot (const version)

Get the observed plot (const version)

返回
Observed plot

◆ rescale

void QwtPolarMagnifier::rescale ( double  factor)
overridevirtualslot

Rescale the plot

Zoom in/out the zoomed area

参数
factorA value < 1.0 zooms in, a value > 1.0 zooms out

◆ setUnzoomKey()

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.

参数
keyKey code
modifiersModifiers
参见
getUnzoomKey(), QwtPolarPlot::unzoom()

◆ unzoom

void QwtPolarMagnifier::unzoom ( )
slot

Unzoom the plot

Unzoom the plot widget

◆ widgetKeyPressEvent()

void QwtPolarMagnifier::widgetKeyPressEvent ( QKeyEvent *  event)
overrideprotectedvirtual

Handle key press events

Handle a key press event for the observed widget.

参数
eventKey event

重载 QwtMagnifier .


该类的文档由以下文件生成: