📄 qwtplotzoomer.3
字号:
.TH "QwtPlotZoomer" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtPlotZoomer \- .SH SYNOPSIS.br.PPInherits \fBQwtPlotPicker\fP..PP.SH "Detailed Description".PP QwtPlotZoomer provides stacked zooming for a plot widget. QwtPlotZoomer offers rubberband selections on the plot canvas, translating the selected rectangles into plot coordinates and adjusting the axes to them. Zooming can repeated as often as possible, limited only by \fBmaxStackDepth()\fP or \fBminZoomSize()\fP. Each rectangle is pushed on a stack..PPZoom rectangles can be selected depending on \fBselectionFlags()\fP using the mouse or keyboard (\fBQwtEventPattern\fP, \fBQwtPickerMachine\fP). QwtEventPattern::MouseSelect3/QwtEventPattern::KeyUndo, or QwtEventPattern::MouseSelect6/QwtEventPattern::KeyRedo walk up and down the zoom stack. QwtEventPattern::MouseSelect2 or QwtEventPattern::KeyHome unzoom to the initial size..PPQwtPlotZoomer is tailored for plots with one x and y axis, but it is allowed to attach a second QwtPlotZoomer for the other axes, even when one or both of them are disabled. In most situations it is recommended to disable rubber band and cursor label for one of the zoomers..PP\fBNote:\fP.RS 4The realtime example includes an derived zoomer class that adds scrollbars to the plot canvas..RE.PP\fBWarning:\fP.RS 4Calling \fBQwtPlot::setAxisScale()\fP while \fBQwtPlot::autoReplot()\fP is FALSE leaves the axis in an 'intermediate' state. In this case, to prevent buggy behaviour, your must call \fBQwtPlot::replot()\fP before calling \fBQwtPlotPicker::scaleRect()\fP, \fBQwtPlotZoomer::scaleRect()\fP, \fBQwtPlotPicker::QwtPlotPicker()\fP or \fBQwtPlotZoomer::QwtPlotZoomer()\fP. This quirk will be removed in a future release. .RE.PP.PPDefinition at line 59 of file qwt_plot_zoomer.h..SS "Public Slots".in +1c.ti -1c.RI "void \fBmoveBy\fP (double x, double y)".br.ti -1c.RI "virtual void \fBmove\fP (double x, double y)".br.ti -1c.RI "virtual void \fBzoom\fP (const \fBQwtDoubleRect\fP &)".br.ti -1c.RI "virtual void \fBzoom\fP (int up)".br.in -1c.SS "Signals".in +1c.ti -1c.RI "void \fBzoomed\fP (const \fBQwtDoubleRect\fP &rect)".br.in -1c.SS "Public Member Functions".in +1c.ti -1c.RI "\fBQwtPlotZoomer\fP (\fBQwtPlotCanvas\fP *, const char *name=0)".br.ti -1c.RI "\fBQwtPlotZoomer\fP (int xAxis, int yAxis, \fBQwtPlotCanvas\fP *, const char *name=0)".br.ti -1c.RI "\fBQwtPlotZoomer\fP (int xAxis, int yAxis, int selectionFlags, \fBDisplayMode\fP cursorLabelMode, \fBQwtPlotCanvas\fP *, const char *name=0)".br.ti -1c.RI "virtual void \fBsetZoomBase\fP ()".br.ti -1c.RI "virtual void \fBsetZoomBase\fP (const \fBQwtDoubleRect\fP &)".br.ti -1c.RI "\fBQwtDoubleRect\fP \fBzoomBase\fP () const".br.ti -1c.RI "\fBQwtDoubleRect\fP \fBzoomRect\fP () const".br.ti -1c.RI "virtual void \fBsetAxis\fP (int xAxis, int yAxis)".br.ti -1c.RI "void \fBsetMaxStackDepth\fP (int)".br.ti -1c.RI "int \fBmaxStackDepth\fP () const".br.ti -1c.RI "const QValueStack< \fBQwtDoubleRect\fP > & \fBzoomStack\fP () const".br.ti -1c.RI "uint \fBzoomRectIndex\fP () const".br.ti -1c.RI "virtual void \fBsetSelectionFlags\fP (int)".br.in -1c.SS "Protected Member Functions".in +1c.ti -1c.RI "QValueStack< \fBQwtDoubleRect\fP > & \fBzoomStack\fP ()".br.ti -1c.RI "virtual void \fBrescale\fP ()".br.ti -1c.RI "virtual \fBQwtDoubleSize\fP \fBminZoomSize\fP () const".br.ti -1c.RI "virtual void \fBwidgetMouseReleaseEvent\fP (QMouseEvent *)".br.ti -1c.RI "virtual void \fBwidgetKeyPressEvent\fP (QKeyEvent *)".br.ti -1c.RI "virtual void \fBbegin\fP ()".br.ti -1c.RI "virtual bool \fBend\fP (bool ok=TRUE)".br.ti -1c.RI "virtual bool \fBaccept\fP (QPointArray &) const".br.in -1c.SH "Constructor & Destructor Documentation".PP .SS "QwtPlotZoomer::QwtPlotZoomer (\fBQwtPlotCanvas\fP * canvas, const char * name = \fC0\fP)".PPCreate a zoomer for a plot canvas. .PPThe zoomer is set to those x- and y-axis of the parent plot of the canvas that are enabled. If both or no x-axis are enabled, the picker is set to QwtPlot::xBottom. If both or no y-axis are enabled, it is set to QwtPlot::yLeft..PPThe \fBselectionFlags()\fP are set to QwtPicker::RectSelection & QwtPicker::ClickSelection, the cursor label mode to QwtPicker::ActiveOnly..PP\fBParameters:\fP.RS 4\fIcanvas\fP Plot canvas to observe, also the parent object .br\fIname\fP Object name.RE.PP\fBWarning:\fP.RS 4Calling \fBQwtPlot::setAxisScale()\fP while \fBQwtPlot::autoReplot()\fP is FALSE leaves the axis in an 'intermediate' state. In this case, to prevent buggy behaviour, you must call \fBQwtPlot::replot()\fP before calling \fBQwtPlotZoomer()\fP. This quirk will be removed in a future release..RE.PP\fBSee also:\fP.RS 4\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, QwtPlotPicker::setZoomBase() .RE.PPDefinition at line 40 of file qwt_plot_zoomer.cpp..SS "QwtPlotZoomer::QwtPlotZoomer (int xAxis, int yAxis, \fBQwtPlotCanvas\fP * canvas, const char * name = \fC0\fP)".PPCreate a zoomer for a plot canvas. .PPThe \fBselectionFlags()\fP are set to QwtPicker::RectSelection & QwtPicker::ClickSelection, the cursor label mode to QwtPicker::ActiveOnly..PP\fBParameters:\fP.RS 4\fIxAxis\fP X axis of the zoomer .br\fIyAxis\fP Y axis of the zoomer .br\fIcanvas\fP Plot canvas to observe, also the parent object .br\fIname\fP Object name.RE.PP\fBWarning:\fP.RS 4Calling \fBQwtPlot::setAxisScale()\fP while \fBQwtPlot::autoReplot()\fP is FALSE leaves the axis in an 'intermediate' state. In this case, to prevent buggy behaviour, you must call \fBQwtPlot::replot()\fP before calling \fBQwtPlotZoomer()\fP. This quirk will be removed in a future release..RE.PP\fBSee also:\fP.RS 4\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, QwtPlotPicker::setZoomBase() .RE.PPDefinition at line 68 of file qwt_plot_zoomer.cpp..SS "QwtPlotZoomer::QwtPlotZoomer (int xAxis, int yAxis, int selectionFlags, \fBDisplayMode\fP cursorLabelMode, \fBQwtPlotCanvas\fP * canvas, const char * name = \fC0\fP)".PPCreate a zoomer for a plot canvas..PP\fBParameters:\fP.RS 4\fIxAxis\fP X axis of the zoomer .br\fIyAxis\fP Y axis of the zoomer .br\fIselectionFlags\fP Or磀 value of \fBQwtPicker::RectSelectionType\fP and \fBQwtPicker::SelectionMode\fP. QwtPicker::RectSelection will be auto added. .br\fIcursorLabelMode\fP Cursor label mode .br\fIcanvas\fP Plot canvas to observe, also the parent object .br\fIname\fP Object name.RE.PP\fBSee also:\fP.RS 4\fBQwtPicker\fP, \fBQwtPicker::setSelectionFlags()\fP, \fBQwtPicker::setRubberBand()\fP, \fBQwtPicker::setCursorLabelMode\fP.RE.PP\fBWarning:\fP.RS 4Calling \fBQwtPlot::setAxisScale()\fP while \fBQwtPlot::autoReplot()\fP is FALSE leaves the axis in an 'intermediate' state. In this case, to prevent buggy behaviour, you must call \fBQwtPlot::replot()\fP before calling \fBQwtPlotZoomer()\fP. This quirk will be removed in a future release..RE.PP\fBSee also:\fP.RS 4\fBQwtPlot::autoReplot()\fP, \fBQwtPlot::replot()\fP, QwtPlotPicker::setZoomBase() .RE.PPDefinition at line 102 of file qwt_plot_zoomer.cpp..SH "Member Function Documentation".PP .SS "bool QwtPlotZoomer::accept (QPointArray & pa) const\fC [protected, virtual]\fP".PPCheck and correct a selected rectangle. .PPReject rectangles with a hight or width < 2, otherwise expand the selected rectangle to a minimum size of 11x11 and accept it..PP\fBReturns:\fP.RS 4TRUE If rect is accepted, or has been changed to a accepted rectangle. .RE.PP.PPReimplemented from \fBQwtPicker\fP..PPDefinition at line 456 of file qwt_plot_zoomer.cpp..PPReferences minZoomSize()..SS "void QwtPlotZoomer::begin ()\fC [protected, virtual]\fP".PPRejects selections, when the stack depth is too deep, or the zoomed rectangle is \fBminZoomSize()\fP..PP\fBSee also:\fP.RS 4\fBminZoomSize()\fP, \fBmaxStackDepth()\fP .RE.PP.PPReimplemented from \fBQwtPicker\fP..PPDefinition at line 508 of file qwt_plot_zoomer.cpp..PPReferences QwtPicker::begin(), QwtDoubleSize::height(), QwtDoubleSize::isValid(), minZoomSize(), and QwtDoubleSize::width()..SS "bool QwtPlotZoomer::end (bool ok = \fCTRUE\fP)\fC [protected, virtual]\fP".PPExpand the selected rectangle to \fBminZoomSize()\fP and zoom in if accepted..PP\fBNote:\fP.RS 4The zoomed signal is emitted. .RE.PP\fBSee also:\fP.RS 4\fBQwtPlotZoomer::accept()\fPa, \fBQwtPlotZoomer::minZoomSize()\fP .RE.PP.PPReimplemented from \fBQwtPlotPicker\fP..PPDefinition at line 539 of file qwt_plot_zoomer.cpp..PPReferences QwtDoubleRect::center(), QwtPlotPicker::end(), QwtDoubleSize::expandedTo(), QwtPlotPicker::invTransform(), minZoomSize(), QwtDoubleRect::moveCenter(), QwtDoubleRect::normalize(), QwtPlotPicker::plot(), QwtPicker::selection(), QwtDoubleRect::setSize(), QwtDoubleRect::size(), zoom(), zoomed(), and zoomRect()..SS "int QwtPlotZoomer::maxStackDepth () const".PP\fBReturns:\fP.RS 4Maximal depth of the zoom stack. .RE.PP\fBSee also:\fP.RS 4\fBsetMaxStackDepth()\fP .RE.PPDefinition at line 159 of file qwt_plot_zoomer.cpp..SS "\fBQwtDoubleSize\fP QwtPlotZoomer::minZoomSize () const\fC [protected, virtual]\fP".PPLimit zooming by a minimum rectangle. .PPTries to stop zooming, when the precision of the axes label string conversion leads to identical values..PP\fBReturns:\fP.RS 4minimum rectangle .RE.PPDefinition at line 488 of file qwt_plot_zoomer.cpp..PPReferences QwtPlot::axisLabelFormat(), QwtPlotPicker::plot(), QwtPlotPicker::xAxis(), and QwtPlotPicker::yAxis()..PPReferenced by accept(), begin(), and end().
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -