⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwtplotzoomer.3

📁 软件无线电的平台
💻 3
字号:
.TH "QwtPlotZoomer" 3 "4 Nov 2003" "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.PP.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.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 "Protected Member Functions".in +1c.ti -1c.RI "void \fBzoomed\fP (const  \fBQwtDoubleRect\fP &rect)".br.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 = 0)".PPCreate a zoomer for a plot canvas. The 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.SS "QwtPlotZoomer::QwtPlotZoomer (int xAxis, int yAxis, \fBQwtPlotCanvas\fP * canvas, const char * name = 0)".PPCreate a zoomer for a plot canvas. The \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.SS "QwtPlotZoomer::QwtPlotZoomer (int xAxis, int yAxis, int selectionFlags, \fBDisplayMode\fP cursorLabelMode, \fBQwtPlotCanvas\fP * canvas, const char * name = 0)".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.SH "Member Function Documentation".PP .SS "bool QwtPlotZoomer::accept (QPointArray & pa) const\fC [protected, virtual]\fP".PPCheck and correct a selected rectangle. Reject 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.PPReimplemented from \fBQwtPicker\fP..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.PPReimplemented from \fBQwtPicker\fP..SS "bool QwtPlotZoomer::end (bool ok = TRUE)\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.PPReimplemented from \fBQwtPlotPicker\fP..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.PP.SS "\fBQwtDoubleSize\fP QwtPlotZoomer::minZoomSize () const\fC [protected, virtual]\fP".PPLimit zooming by a minimum rectangle. Tries to stop zooming, when the precision of the axes label string conversion leads to identical values..PP\fBReturns:\fP.RS 4minimum rectangle .RE.PP.SS "void QwtPlotZoomer::move (double x, double y)\fC [virtual]\fP".PPMove the the current zoom rectangle..PP\fBParameters:\fP.RS 4\fIx\fP X value .br\fIy\fP value.RE.PP\fBSee also:\fP.RS 4\fBQwtDoubleRect::move\fP .RE.PP\fBNote:\fP.RS 4The changed rectangle is limited by the zoom base .RE.PP.SS "void QwtPlotZoomer::moveBy (double dx, double dy)".PPMove the current zoom rectangle..PP\fBParameters:\fP.RS 4\fIdx\fP X offset .br\fIdy\fP Y offset.RE.PP\fBNote:\fP.RS 4The changed rectangle is limited by the zoom base .RE.PP.SS "void QwtPlotZoomer::rescale ()\fC [protected, virtual]\fP".PPAdjust the observed plot to \fBzoomRect()\fP.PP\fBNote:\fP.RS 4Initiates \fBQwtPlot::replot\fP .RE.PP.SS "void QwtPlotZoomer::setAxis (int xAxis, int yAxis)\fC [virtual]\fP".PPReinitialize the axes, and set the zoom base to their scales..PP\fBParameters:\fP.RS 4\fIxAxis\fP X axis .br\fIyAxis\fP Y axis .RE.PPReimplemented from \fBQwtPlotPicker\fP..SS "void QwtPlotZoomer::setMaxStackDepth (int depth)".PPLimit the number of recursive zoom operations to depth. A value of -1 set the depth to unlimited, 0 disables zooming. If the current zoom rectangle is below depth, the plot is unzoomed..PP\fBParameters:\fP.RS 4\fIdepth\fP Maximum for the stack depth .RE.PP\fBSee also:\fP.RS 4\fBmaxStackDepth()\fP .RE.PP\fBNote:\fP.RS 4depth doesn磘 include the zoom base, so \fBzoomStack()\fP.count() might be \fBmaxStackDepth()\fP + 1. .RE.PP.SS "void QwtPlotZoomer::setSelectionFlags (int flags)\fC [virtual]\fP".PPSet the selection flags.PP\fBParameters:\fP.RS 4\fIflags\fP Or磀 value of \fBQwtPicker::RectSelectionType\fP and \fBQwtPicker::SelectionMode\fP. The default value is QwtPicker::RectSelection & QwtPicker::ClickSelection..RE.PP\fBSee also:\fP.RS 4\fBselectionFlags()\fP, \fBSelectionType\fP, \fBRectSelectionType\fP, \fBSelectionMode\fP .RE.PP\fBNote:\fP.RS 4QwtPicker::RectSelection will be auto added. .RE.PPReimplemented from \fBQwtPicker\fP..SS "void QwtPlotZoomer::setZoomBase (const \fBQwtDoubleRect\fP & base)\fC [virtual]\fP".PPSet the initial size of the zoomer. base is united with the current \fBscaleRect()\fP and the zoom stack is reinitalized with it as zoom base. plot is zoomed to \fBscaleRect()\fP..PP\fBParameters:\fP.RS 4\fIbase\fP Zoom base.RE.PP\fBSee also:\fP.RS 4\fBzoomBase()\fP, \fBscaleRect()\fP .RE.PP.SS "void QwtPlotZoomer::setZoomBase ()\fC [virtual]\fP".PPReinitialized the zoom stack with \fBscaleRect()\fP as base..PP\fBSee also:\fP.RS 4\fBzoomBase()\fP, \fBscaleRect()\fP .RE.PP.SS "void QwtPlotZoomer::widgetKeyPressEvent (QKeyEvent * ke)\fC [protected, virtual]\fP".PPQt::Key_Plus zooms out, Qt::Key_Minus zooms in one position on the zoom stack, Qt::Key_Escape zooms out to the zoom base..PPChanges the current position on the stack, but doesn磘 pop any rectangle..PP\fBNote:\fP.RS 4The keys codes can be changed, using \fBQwtEventPattern::setKeyPattern\fP: 3, 4, 5 .RE.PPReimplemented from \fBQwtPicker\fP..SS "void QwtPlotZoomer::widgetMouseReleaseEvent (QMouseEvent * me)\fC [protected, virtual]\fP".PPQt::MidButton zooms out one position on the zoom stack, Qt::RightButton to the zoom base..PPChanges the current position on the stack, but doesn磘 pop any rectangle..PP\fBNote:\fP.RS 4The mouse events can be changed, using \fBQwtEventPattern::setMousePattern\fP: 2, 1 .RE.PPReimplemented from \fBQwtPicker\fP..SS "void QwtPlotZoomer::zoom (int offset)\fC [virtual]\fP".PPZoom in or out. Activate a rectangle on the zoom stack with an offset relative to the current position. Negative values of offest will zoom out, positive zoom in. A value of 0 zooms out to the zoom base..PP\fBParameters:\fP.RS 4\fIoffset\fP Offset relative to the current position of the zoom stack. .RE.PP\fBSee also:\fP.RS 4\fBzoomRectIndex()\fP .RE.PP.SS "void QwtPlotZoomer::zoom (const \fBQwtDoubleRect\fP & rect)\fC [virtual]\fP".PPZoom in. Clears all rectangles above the current position of the zoom stack and pushs the intersection of \fBzoomRect()\fP and the normalized rect on it..PP\fBNote:\fP.RS 4If the maximal stack depth is reached, zoom is ignored. .RE.PP.SS "\fBQwtDoubleRect\fP QwtPlotZoomer::zoomBase () const".PP\fBReturns:\fP.RS 4Initial rectangle of the zoomer .RE.PP\fBSee also:\fP.RS 4\fBsetZoomBase()\fP, \fBzoomRect()\fP .RE.PP.SS "void QwtPlotZoomer::zoomed (const \fBQwtDoubleRect\fP & rect)\fC [protected]\fP".PPA signal emitting the \fBzoomRect()\fP, when the plot has been zoomed in or out..PP\fBParameters:\fP.RS 4\fIrect\fP Current zoom rectangle. .RE.PP\fBWarning:\fP.RS 4\fBzoomed()\fP is only emitted after selections in \fBend()\fP, but never in \fBzoom()\fP. .RE.PP.SS "\fBQwtDoubleRect\fP QwtPlotZoomer::zoomRect () const".PPRectangle at the current position on the zoom stack..PP\fBSee also:\fP.RS 4\fBQwtPlotZoomer::zoomRectIndex()\fP, \fBQwtPlotZoomer::scaleRect()\fP. .RE.PP.SS "uint QwtPlotZoomer::zoomRectIndex () const".PP\fBReturns:\fP.RS 4Index of current position of zoom stack. .RE.PP.SS "QValueStack< \fBQwtDoubleRect\fP > & QwtPlotZoomer::zoomStack ()\fC [protected]\fP".PPReturn the zoom stack. \fBzoomStack()\fP[0] is the zoom base, \fBzoomStack()\fP[1] the first zoomed rectangle. .SS "const  QValueStack< \fBQwtDoubleRect\fP > & QwtPlotZoomer::zoomStack () const".PPReturn the zoom stack. \fBzoomStack()\fP[0] is the zoom base, \fBzoomStack()\fP[1] the first zoomed rectangle. .SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -