QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 所有成员列表
QwtPlotCanvasZoomState结构体 参考

Struct that stores zoom states for all four axes 更多...

#include <qwt_plot_canvas_zoomer.h>

Public 成员函数

 QwtPlotCanvasZoomState ()
 Default constructor creating an invalid zoom state
 
 QwtPlotCanvasZoomState (QwtPlot *p, const QwtInterval &yLeft, const QwtInterval &yRight, const QwtInterval &xBottom, const QwtInterval &xTop)
 Constructor creating a zoom state with specified axis intervals
 
void apply () const
 Apply this zoom state to the associated plot
 
bool operator== (const QwtPlotCanvasZoomState &other) const
 Compare two zoom states for equality
 
bool operator!= (const QwtPlotCanvasZoomState &other) const
 Compare two zoom states for inequality
 
bool isValid () const
 Check if this zoom state is valid
 

静态 Public 成员函数

static QwtPlotCanvasZoomState fromPlot (QwtPlot *plot)
 Create a zoom state from the current axis ranges of a plot
 

Public 属性

QPointer< QwtPlotplot
 
QwtInterval axisInterval [QwtAxis::AxisPositions]
 

详细描述

Struct that stores zoom states for all four axes

构造及析构函数说明

◆ QwtPlotCanvasZoomState()

QwtPlotCanvasZoomState::QwtPlotCanvasZoomState ( QwtPlot p,
const QwtInterval yLeft,
const QwtInterval yRight,
const QwtInterval xBottom,
const QwtInterval xTop 
)

Constructor creating a zoom state with specified axis intervals

参数
[in]pPlot widget associated with this zoom state
[in]yLeftInterval for the left Y axis
[in]yRightInterval for the right Y axis
[in]xBottomInterval for the bottom X axis
[in]xTopInterval for the top X axis

成员函数说明

◆ apply()

void QwtPlotCanvasZoomState::apply ( ) const

Apply this zoom state to the associated plot

Sets all four axis scales to the intervals stored in this zoom state. Does nothing if the plot pointer is null.

◆ fromPlot()

QwtPlotCanvasZoomState QwtPlotCanvasZoomState::fromPlot ( QwtPlot p)
static

Create a zoom state from the current axis ranges of a plot

参数
[in]pPlot widget to capture axis ranges from
返回
QwtPlotCanvasZoomState containing current axis intervals

This static method captures the current scale divisions of all four axes from the given plot and stores them in a new zoom state object.

◆ isValid()

bool QwtPlotCanvasZoomState::isValid ( ) const

Check if this zoom state is valid

返回
true if the zoom state has an associated plot pointer

◆ operator!=()

bool QwtPlotCanvasZoomState::operator!= ( const QwtPlotCanvasZoomState other) const

Compare two zoom states for inequality

参数
[in]otherAnother zoom state to compare with
返回
true if the states differ in plot or any axis interval

◆ operator==()

bool QwtPlotCanvasZoomState::operator== ( const QwtPlotCanvasZoomState other) const

Compare two zoom states for equality

参数
[in]otherAnother zoom state to compare with
返回
true if both states have the same plot and axis intervals

该结构体的文档由以下文件生成: