Go to the documentation of this file.
25 if ( max - min < minRange )
27 min = 0.5 * ( min + max - minRange );
35 double minBounded = transform->
bounded( min );
36 double maxBounded = transform->
bounded( max );
38 if ( minBounded != min )
40 maxBounded = transform->
bounded( minBounded + minRange );
42 else if ( maxBounded != max )
44 minBounded = transform->
bounded( maxBounded - minRange );
60 if ( minSize.width() > r.width() )
63 r.left(), r.right(), minSize.width(), transformX );
69 if ( minSize.height() > r.height() )
72 zoomRect.top(), zoomRect.bottom(), minSize.height(), transformY );
134 QWidget* canvas,
bool doReplot )
152 if ( doReplot &&
plot() )
268 const QRectF bRect = base | sRect;
318 const QRectF
zoomRect = rect.normalized();
395 if ( zoomRectIndex < 0 || zoomRectIndex >
zoomStack.count() )
428 double x1 = rect.left();
429 double x2 = rect.right();
435 double y1 = rect.top();
436 double y2 = rect.bottom();
523 moveTo( QPointF( rect.left() + dx, rect.top() + dy ) );
569 if ( pa.count() < 2 )
572 QRect rect = QRect( pa.first(), pa.last() );
573 rect = rect.normalized();
575 const int minSize = 2;
576 if ( rect.width() < minSize && rect.height() < minSize )
581 const QPoint center = rect.center();
583 rect.moveCenter( center );
586 pa[0] = rect.topLeft();
587 pa[1] = rect.bottomRight();
618 if ( minSize.isValid() )
623 if ( minSize.width() >= sz.width() &&
624 minSize.height() >= sz.height() )
654 if ( pa.count() < 2 )
657 QRect rect = QRect( pa.first(), pa.last() );
658 rect = rect.normalized();
674 #include "moc_qwt_plot_zoomer.cpp"
bool keyMatch(KeyPatternCode, const QKeyEvent *) const
Compare a key event with an event pattern.
double invTransform(double p) const
void setZoomStack(const QStack< QRectF > &, int zoomRectIndex=-1)
Assign a zoom stack.
virtual void widgetKeyPressEvent(QKeyEvent *) QWT_OVERRIDE
A state machine for rectangle selections.
@ RectRubberBand
A rectangle ( only for QwtPickerMachine::RectSelection )
void setAxisScale(QwtAxisId, double min, double max, double stepSize=0)
Disable autoscaling and specify a fixed scale for a selected axis.
virtual void setAxes(QwtAxisId xAxis, QwtAxisId yAxis) QWT_OVERRIDE
virtual void moveTo(const QPointF &)
void setAutoReplot(bool=true)
Set or reset the autoReplot option.
bool mouseMatch(MousePatternCode, const QMouseEvent *) const
Compare a mouse event with an event pattern.
QStack< QRectF > zoomStack
QwtAxisId xAxis() const
Return x axis.
A class representing an interval.
QwtPlotPicker provides selections on a plot canvas.
virtual bool end(bool ok=true) QWT_OVERRIDE
@ ActiveOnly
Display only when the selection is active.
virtual void widgetKeyPressEvent(QKeyEvent *)
virtual bool end(bool ok=true) QWT_OVERRIDE
virtual void setZoomBase(bool doReplot=true)
virtual QSizeF minZoomSize() const
Limit zooming by a minimum rectangle.
const QwtScaleDiv & axisScaleDiv(QwtAxisId) const
Return the scale division of a specified axis.
int QwtAxisId
Axis identifier.
void setStateMachine(QwtPickerMachine *)
void moveBy(double dx, double dy)
int maxStackDepth() const
QwtAxisId yAxis() const
Return y axis.
QPolygon selection() const
QwtPlotZoomer(QWidget *, bool doReplot=true)
Create a zoomer for a plot canvas.
void zoomed(const QRectF &rect)
static QRectF qwtExpandedZoomRect(const QRectF &zoomRect, const QSizeF &minSize, const QwtTransform *transformX, const QwtTransform *transformY)
virtual void replot()
Redraw the plot.
uint zoomRectIndex() const
const QStack< QRectF > & zoomStack() const
virtual void zoom(const QRectF &)
Zoom in.
virtual void widgetMouseReleaseEvent(QMouseEvent *)
void init(bool doReplot)
Init the zoomer, used by the constructors.
const QwtTransform * transformation() const
Get the transformation.
void setRubberBand(RubberBand)
static QwtInterval qwtExpandedZoomInterval(double v1, double v2, double minRange, const QwtTransform *transform)
virtual QwtScaleMap canvasMap(QwtAxisId) const
virtual void widgetMouseReleaseEvent(QMouseEvent *) QWT_OVERRIDE
virtual void begin() QWT_OVERRIDE
void setTrackerMode(DisplayMode)
Set the display mode of the tracker.
virtual bool accept(QPolygon &) const QWT_OVERRIDE
Check and correct a selected rectangle.
void setMaxStackDepth(int)
Limit the number of recursive zoom operations to depth.
virtual void setAxes(QwtAxisId xAxisId, QwtAxisId yAxisId)
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46