Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions

QwtPlotZoomer Class Reference

QwtPlotZoomer provides stacked zooming for a plot widget. More...

#include <qwt_plot_zoomer.h>

Inheritance diagram for QwtPlotZoomer:
Inheritance graph
[legend]
Collaboration diagram for QwtPlotZoomer:
Collaboration graph
[legend]

List of all members.

Classes

class  PrivateData

Public Slots

void moveBy (double x, double y)
virtual void move (double x, double y)
virtual void zoom (const QwtDoubleRect &)
 Zoom in.
virtual void zoom (int up)
 Zoom in or out.

Signals

void zoomed (const QwtDoubleRect &rect)

Public Member Functions

 QwtPlotZoomer (QwtPlotCanvas *, bool doReplot=true)
 Create a zoomer for a plot canvas.
 QwtPlotZoomer (int xAxis, int yAxis, QwtPlotCanvas *, bool doReplot=true)
 Create a zoomer for a plot canvas.
 QwtPlotZoomer (int xAxis, int yAxis, int selectionFlags, DisplayMode trackerMode, QwtPlotCanvas *, bool doReplot=true)
virtual ~QwtPlotZoomer ()
virtual void setZoomBase (bool doReplot=true)
virtual void setZoomBase (const QwtDoubleRect &)
 Set the initial size of the zoomer.
QwtDoubleRect zoomBase () const
QwtDoubleRect zoomRect () const
virtual void setAxis (int xAxis, int yAxis)
void setMaxStackDepth (int)
 Limit the number of recursive zoom operations to depth.
int maxStackDepth () const
const QValueStack
< QwtDoubleRect > & 
zoomStack () const
void setZoomStack (const QValueStack< QwtDoubleRect > &, int zoomRectIndex=-1)
uint zoomRectIndex () const
virtual void setSelectionFlags (int)

Protected Member Functions

virtual void rescale ()
virtual QwtDoubleSize minZoomSize () const
 Limit zooming by a minimum rectangle.
virtual void widgetMouseReleaseEvent (QMouseEvent *)
virtual void widgetKeyPressEvent (QKeyEvent *)
virtual void begin ()
virtual bool end (bool ok=true)
virtual bool accept (QwtPolygon &) const
 Check and correct a selected rectangle.

Detailed Description

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 maxStackDepth() or minZoomSize(). Each rectangle is pushed on a stack.

Zoom rectangles can be selected depending on selectionFlags() using the mouse or keyboard (QwtEventPattern, QwtPickerMachine). QwtEventPattern::MouseSelect3/QwtEventPatternKeyUndo, or QwtEventPattern::MouseSelect6/QwtEventPatternKeyRedo walk up and down the zoom stack. QwtEventPattern::MouseSelect2 or QwtEventPattern::KeyHome unzoom to the initial size.

QwtPlotZoomer is tailored for plots with one x and y axis, but it is allowed to attach a second QwtPlotZoomer for the other axes.

Note:
The realtime example includes an derived zoomer class that adds scrollbars to the plot canvas.

Definition at line 49 of file qwt_plot_zoomer.h.


Constructor & Destructor Documentation

QwtPlotZoomer::QwtPlotZoomer ( QwtPlotCanvas canvas,
bool  doReplot = true 
) [explicit]

Create 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.

The selectionFlags() are set to QwtPicker::RectSelection & QwtPicker::ClickSelection, the tracker mode to QwtPicker::ActiveOnly.

Parameters:
canvasPlot canvas to observe, also the parent object
doReplotCall replot for the attached plot before initializing the zoomer with its scales. This might be necessary, when the plot is in a state with pending scale changes.
See also:
QwtPlot::autoReplot(), QwtPlot::replot(), setZoomBase()

Definition at line 51 of file qwt_plot_zoomer.cpp.

References QwtPicker::ActiveOnly, QwtPicker::ClickSelection, and QwtPicker::RectSelection.

                                                                :
    QwtPlotPicker(canvas)
{
    if ( canvas )
        init(RectSelection & ClickSelection, ActiveOnly, doReplot);
}
QwtPlotZoomer::QwtPlotZoomer ( int  xAxis,
int  yAxis,
QwtPlotCanvas canvas,
bool  doReplot = true 
) [explicit]

Create a zoomer for a plot canvas.

The selectionFlags() are set to QwtPicker::RectSelection & QwtPicker::ClickSelection, the tracker mode to QwtPicker::ActiveOnly.

Parameters:
xAxisX axis of the zoomer
yAxisY axis of the zoomer
canvasPlot canvas to observe, also the parent object
doReplotCall replot for the attached plot before initializing the zoomer with its scales. This might be necessary, when the plot is in a state with pending scale changes.
See also:
QwtPlot::autoReplot(), QwtPlot::replot(), setZoomBase()

Definition at line 75 of file qwt_plot_zoomer.cpp.

References QwtPicker::ActiveOnly, QwtPicker::ClickSelection, and QwtPicker::RectSelection.

                                             :
    QwtPlotPicker(xAxis, yAxis, canvas)
{
    if ( canvas )
        init(RectSelection & ClickSelection, ActiveOnly, doReplot);
}
QwtPlotZoomer::QwtPlotZoomer ( int  xAxis,
int  yAxis,
int  selectionFlags,
DisplayMode  trackerMode,
QwtPlotCanvas canvas,
bool  doReplot = true 
) [explicit]

Create a zoomer for a plot canvas.

Parameters:
xAxisX axis of the zoomer
yAxisY axis of the zoomer
selectionFlagsOr'd value of QwtPicker::RectSelectionType and QwtPicker::SelectionMode. QwtPicker::RectSelection will be auto added.
trackerModeTracker mode
canvasPlot canvas to observe, also the parent object
doReplotCall replot for the attached plot before initializing the zoomer with its scales. This might be necessary, when the plot is in a state with pending scale changes.
See also:
QwtPicker, QwtPicker::setSelectionFlags(), QwtPicker::setRubberBand(), QwtPicker::setTrackerMode()
QwtPlot::autoReplot(), QwtPlot::replot(), setZoomBase()

Definition at line 103 of file qwt_plot_zoomer.cpp.

                                                                      :
    QwtPlotPicker(xAxis, yAxis, canvas)
{
    if ( canvas )
        init(selectionFlags, trackerMode, doReplot);
}
QwtPlotZoomer::~QwtPlotZoomer (  ) [virtual]

Definition at line 129 of file qwt_plot_zoomer.cpp.

{
    delete d_data;
}

Member Function Documentation

bool QwtPlotZoomer::accept ( QwtPolygon pa ) const [protected, virtual]

Check 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.

Returns:
true If rect is accepted, or has been changed to a accepted rectangle.

Reimplemented from QwtPicker.

Definition at line 539 of file qwt_plot_zoomer.cpp.

References minZoomSize().

{
    if ( pa.count() < 2 )
        return false;

    QRect rect = QRect(pa[0], pa[int(pa.count()) - 1]);
#if QT_VERSION < 0x040000
    rect = rect.normalize();
#else
    rect = rect.normalized();
#endif

    const int minSize = 2;
    if (rect.width() < minSize && rect.height() < minSize )
        return false; 

    const int minZoomSize = 11;

    const QPoint center = rect.center();
    rect.setSize(rect.size().expandedTo(QSize(minZoomSize, minZoomSize)));
    rect.moveCenter(center);

    pa.resize(2);
    pa[0] = rect.topLeft();
    pa[1] = rect.bottomRight();

    return true;
}
void QwtPlotZoomer::begin (  ) [protected, virtual]

Rejects selections, when the stack depth is too deep, or the zoomed rectangle is minZoomSize().

See also:
minZoomSize(), maxStackDepth()

Reimplemented from QwtPicker.

Definition at line 587 of file qwt_plot_zoomer.cpp.

References QwtDoubleSize::height(), QwtDoubleSize::isValid(), QwtPlotZoomer::PrivateData::maxStackDepth, minZoomSize(), QwtDoubleSize::width(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

{
    if ( d_data->maxStackDepth >= 0 )
    {
        if ( d_data->zoomRectIndex >= uint(d_data->maxStackDepth) )
            return;
    }

    const QwtDoubleSize minSize = minZoomSize();
    if ( minSize.isValid() )
    {
        const QwtDoubleSize sz = 
            d_data->zoomStack[d_data->zoomRectIndex].size() * 0.9999;

        if ( minSize.width() >= sz.width() &&
            minSize.height() >= sz.height() )
        {
            return;
        }
    }

    QwtPlotPicker::begin();
}
bool QwtPlotZoomer::end ( bool  ok = true ) [protected, virtual]

Expand the selected rectangle to minZoomSize() and zoom in if accepted.

See also:
accept(), minZoomSize()

Reimplemented from QwtPlotPicker.

Definition at line 617 of file qwt_plot_zoomer.cpp.

References QwtDoubleRect::center(), QwtDoubleSize::expandedTo(), QwtPlotPicker::invTransform(), minZoomSize(), QwtDoubleRect::moveCenter(), QwtDoubleRect::normalized(), QwtPlotPicker::plot(), QwtPicker::selection(), QwtDoubleRect::setSize(), QwtDoubleRect::size(), zoom(), and zoomRect().

{
    ok = QwtPlotPicker::end(ok);
    if (!ok)
        return false;

    QwtPlot *plot = QwtPlotZoomer::plot();
    if ( !plot )
        return false;

    const QwtPolygon &pa = selection();
    if ( pa.count() < 2 )
        return false;

    QRect rect = QRect(pa[0], pa[int(pa.count() - 1)]);
#if QT_VERSION < 0x040000
    rect = rect.normalize();
#else
    rect = rect.normalized();
#endif


    QwtDoubleRect zoomRect = invTransform(rect).normalized();

    const QwtDoublePoint center = zoomRect.center();
    zoomRect.setSize(zoomRect.size().expandedTo(minZoomSize()));
    zoomRect.moveCenter(center);

    zoom(zoomRect);

    return true;
}
int QwtPlotZoomer::maxStackDepth (  ) const
Returns:
Maximal depth of the zoom stack.
See also:
setMaxStackDepth()

Definition at line 172 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::maxStackDepth.

{
    return d_data->maxStackDepth;
}
QwtDoubleSize QwtPlotZoomer::minZoomSize (  ) const [protected, virtual]

Limit zooming by a minimum rectangle.

Returns:
zoomBase().width() / 10e4, zoomBase().height() / 10e4

Definition at line 573 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::zoomStack.

Referenced by accept(), begin(), and end().

{
    return QwtDoubleSize(
        d_data->zoomStack[0].width() / 10e4,
        d_data->zoomStack[0].height() / 10e4
    );
}
void QwtPlotZoomer::move ( double  x,
double  y 
) [virtual, slot]

Move the the current zoom rectangle.

Parameters:
xX value
yY value
See also:
QwtDoubleRect::move()
Note:
The changed rectangle is limited by the zoom base

Definition at line 509 of file qwt_plot_zoomer.cpp.

References QwtDoubleRect::bottom(), QwtDoubleRect::height(), QwtDoubleRect::left(), rescale(), QwtDoubleRect::right(), QwtDoubleRect::top(), QwtDoubleRect::width(), zoomBase(), zoomRect(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

Referenced by moveBy().

{
    if ( x < zoomBase().left() )
        x = zoomBase().left();
    if ( x > zoomBase().right() - zoomRect().width() )
        x = zoomBase().right() - zoomRect().width();

    if ( y < zoomBase().top() )
        y = zoomBase().top();
    if ( y > zoomBase().bottom() - zoomRect().height() )
        y = zoomBase().bottom() - zoomRect().height();

    if ( x != zoomRect().left() || y != zoomRect().top() )
    {
        d_data->zoomStack[d_data->zoomRectIndex].moveTo(x, y);
        rescale();
    }
}
void QwtPlotZoomer::moveBy ( double  dx,
double  dy 
) [slot]

Move the current zoom rectangle.

Parameters:
dxX offset
dyY offset
Note:
The changed rectangle is limited by the zoom base

Definition at line 494 of file qwt_plot_zoomer.cpp.

References QwtDoubleRect::left(), move(), QwtDoubleRect::top(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

{
    const QwtDoubleRect &rect = d_data->zoomStack[d_data->zoomRectIndex];
    move(rect.left() + dx, rect.top() + dy);
}
void QwtPlotZoomer::rescale (  ) [protected, virtual]

Adjust the observed plot to zoomRect()

Note:
Initiates QwtPlot::replot

Definition at line 385 of file qwt_plot_zoomer.cpp.

References QwtPlot::autoReplot(), QwtPlot::axisScaleDiv(), QwtDoubleRect::bottom(), QwtDoubleRect::left(), QwtScaleDiv::lowerBound(), QwtPlotPicker::plot(), QwtPlot::replot(), QwtDoubleRect::right(), QwtPlotPicker::scaleRect(), QwtPlot::setAutoReplot(), QwtPlot::setAxisScale(), QwtDoubleRect::top(), QwtScaleDiv::upperBound(), QwtPlotPicker::xAxis(), QwtPlotPicker::yAxis(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

Referenced by move(), setZoomBase(), and zoom().

{
    QwtPlot *plt = plot();
    if ( !plt )
        return;

    const QwtDoubleRect &rect = d_data->zoomStack[d_data->zoomRectIndex];
    if ( rect != scaleRect() )
    {
        const bool doReplot = plt->autoReplot();
        plt->setAutoReplot(false);

        double x1 = rect.left();
        double x2 = rect.right();
        if ( plt->axisScaleDiv(xAxis())->lowerBound() > 
            plt->axisScaleDiv(xAxis())->upperBound() )
        {
            qSwap(x1, x2);
        }

        plt->setAxisScale(xAxis(), x1, x2);

        double y1 = rect.top();
        double y2 = rect.bottom();
        if ( plt->axisScaleDiv(yAxis())->lowerBound() > 
            plt->axisScaleDiv(yAxis())->upperBound() )
        {
            qSwap(y1, y2);
        }
        plt->setAxisScale(yAxis(), y1, y2);

        plt->setAutoReplot(doReplot);

        plt->replot();
    }
}
void QwtPlotZoomer::setAxis ( int  xAxis,
int  yAxis 
) [virtual]

Reinitialize the axes, and set the zoom base to their scales.

Parameters:
xAxisX axis
yAxisY axis

Reimplemented from QwtPlotPicker.

Definition at line 429 of file qwt_plot_zoomer.cpp.

References QwtPlotPicker::scaleRect(), setZoomBase(), QwtPlotPicker::xAxis(), and QwtPlotPicker::yAxis().

void QwtPlotZoomer::setMaxStackDepth ( int  depth )

Limit 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.

Parameters:
depthMaximum for the stack depth
See also:
maxStackDepth()
Note:
depth doesn't include the zoom base, so zoomStack().count() might be maxStackDepth() + 1.

Definition at line 145 of file qwt_plot_zoomer.cpp.

References int(), QwtPlotZoomer::PrivateData::maxStackDepth, void(), zoom(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

{
    d_data->maxStackDepth = depth;

    if ( depth >= 0 )
    {
        // unzoom if the current depth is below d_data->maxStackDepth

        const int zoomOut = 
            int(d_data->zoomStack.count()) - 1 - depth; // -1 for the zoom base

        if ( zoomOut > 0 )
        {
            zoom(-zoomOut);
            for ( int i = int(d_data->zoomStack.count()) - 1; 
                i > int(d_data->zoomRectIndex); i-- )
            {
                (void)d_data->zoomStack.pop(); // remove trailing rects
            }
        }
    }
}
void QwtPlotZoomer::setSelectionFlags ( int  flags ) [virtual]

Set the selection flags

Parameters:
flagsOr'd value of QwtPicker::RectSelectionType and QwtPicker::SelectionMode. The default value is QwtPicker::RectSelection & QwtPicker::ClickSelection.
See also:
selectionFlags(), SelectionType, RectSelectionType, SelectionMode
Note:
QwtPicker::RectSelection will be auto added.

Reimplemented from QwtPicker.

Definition at line 661 of file qwt_plot_zoomer.cpp.

References QwtPicker::PointSelection, QwtPicker::PolygonSelection, and QwtPicker::RectSelection.

Referenced by QmitkHistogramWidget::InitializeZoomer().

{
    // we accept only rects
    flags &= ~(PointSelection | PolygonSelection);
    flags |= RectSelection;

    QwtPlotPicker::setSelectionFlags(flags);
}
void QwtPlotZoomer::setZoomBase ( bool  doReplot = true ) [virtual]

Reinitialized the zoom stack with scaleRect() as base.

Parameters:
doReplotCall replot for the attached plot before initializing the zoomer with its scales. This might be necessary, when the plot is in a state with pending scale changes.
See also:
zoomBase(), scaleRect() QwtPlot::autoReplot(), QwtPlot::replot().

Definition at line 206 of file qwt_plot_zoomer.cpp.

References QwtPlotPicker::plot(), QwtPlot::replot(), rescale(), QwtPlotPicker::scaleRect(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

Referenced by setAxis().

{
    QwtPlot *plt = plot();
    if ( plt == NULL )
        return;

    if ( doReplot )
        plt->replot();

    d_data->zoomStack.clear();
    d_data->zoomStack.push(scaleRect());
    d_data->zoomRectIndex = 0;

    rescale();
}
void QwtPlotZoomer::setZoomBase ( const QwtDoubleRect base ) [virtual]

Set the initial size of the zoomer.

base is united with the current scaleRect() and the zoom stack is reinitalized with it as zoom base. plot is zoomed to scaleRect().

Parameters:
baseZoom base
See also:
zoomBase(), scaleRect()

Definition at line 232 of file qwt_plot_zoomer.cpp.

References QwtPlotPicker::plot(), rescale(), QwtPlotPicker::scaleRect(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

{
    const QwtPlot *plt = plot();
    if ( !plt )
        return;

    const QwtDoubleRect sRect = scaleRect();
    const QwtDoubleRect bRect = base | sRect;

    d_data->zoomStack.clear();
    d_data->zoomStack.push(bRect);
    d_data->zoomRectIndex = 0;

    if ( base != sRect )
    {
        d_data->zoomStack.push(sRect);
        d_data->zoomRectIndex++;
    }

    rescale();
}
void QwtPlotZoomer::setZoomStack ( const QValueStack< QwtDoubleRect > &  ,
int  zoomRectIndex = -1 
)
void QwtPlotZoomer::widgetKeyPressEvent ( QKeyEvent *  ke ) [protected, virtual]

Qt::Key_Plus zooms out, Qt::Key_Minus zooms in one position on the zoom stack, Qt::Key_Escape zooms out to the zoom base.

Changes the current position on the stack, but doesn't pop any rectangle.

Note:
The keys codes can be changed, using QwtEventPattern::setKeyPattern: 3, 4, 5

Reimplemented from QwtPicker.

Definition at line 471 of file qwt_plot_zoomer.cpp.

References QwtPicker::isActive(), QwtEventPattern::KeyHome, QwtEventPattern::keyMatch(), QwtEventPattern::KeyRedo, QwtEventPattern::KeyUndo, and zoom().

{
    if ( !isActive() )
    {
        if ( keyMatch(KeyUndo, ke) )
            zoom(-1);
        else if ( keyMatch(KeyRedo, ke) )
            zoom(+1);
        else if ( keyMatch(KeyHome, ke) )
            zoom(0);
    }

    QwtPlotPicker::widgetKeyPressEvent(ke);
}
void QwtPlotZoomer::widgetMouseReleaseEvent ( QMouseEvent *  me ) [protected, virtual]

Qt::MidButton zooms out one position on the zoom stack, Qt::RightButton to the zoom base.

Changes the current position on the stack, but doesn't pop any rectangle.

Note:
The mouse events can be changed, using QwtEventPattern::setMousePattern: 2, 1

Reimplemented from QwtPicker.

Definition at line 448 of file qwt_plot_zoomer.cpp.

References QwtEventPattern::mouseMatch(), QwtEventPattern::MouseSelect2, QwtEventPattern::MouseSelect3, QwtEventPattern::MouseSelect6, and zoom().

{
    if ( mouseMatch(MouseSelect2, me) )
        zoom(0);
    else if ( mouseMatch(MouseSelect3, me) )
        zoom(-1);
    else if ( mouseMatch(MouseSelect6, me) )
        zoom(+1);
    else 
        QwtPlotPicker::widgetMouseReleaseEvent(me);
}
void QwtPlotZoomer::zoom ( int  offset ) [virtual, slot]

Zoom 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.

Parameters:
offsetOffset relative to the current position of the zoom stack.
Note:
The zoomed signal is emitted.
See also:
zoomRectIndex()

Definition at line 320 of file qwt_plot_zoomer.cpp.

References qwtMax, qwtMin, rescale(), zoomed(), zoomRect(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

{
    if ( offset == 0 )
        d_data->zoomRectIndex = 0;
    else
    {
        int newIndex = d_data->zoomRectIndex + offset;
        newIndex = qwtMax(0, newIndex);
        newIndex = qwtMin(int(d_data->zoomStack.count()) - 1, newIndex);

        d_data->zoomRectIndex = uint(newIndex);
    }

    rescale();

    emit zoomed(zoomRect());
}
void QwtPlotZoomer::zoom ( const QwtDoubleRect rect ) [virtual, slot]

Zoom in.

Clears all rectangles above the current position of the zoom stack and pushs the intersection of zoomRect() and the normalized rect on it.

Note:
If the maximal stack depth is reached, zoom is ignored.
The zoomed signal is emitted.

Definition at line 283 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::maxStackDepth, QwtDoubleRect::normalized(), rescale(), void(), zoomed(), zoomRect(), QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

Referenced by end(), setMaxStackDepth(), widgetKeyPressEvent(), and widgetMouseReleaseEvent().

{   
    if ( d_data->maxStackDepth >= 0 && 
        int(d_data->zoomRectIndex) >= d_data->maxStackDepth )
    {
        return;
    }

    const QwtDoubleRect zoomRect = d_data->zoomStack[0] & rect.normalized();
    if ( zoomRect != d_data->zoomStack[d_data->zoomRectIndex] )
    {
        for ( uint i = int(d_data->zoomStack.count()) - 1; 
           i > d_data->zoomRectIndex; i-- )
        {
            (void)d_data->zoomStack.pop();
        }

        d_data->zoomStack.push(zoomRect);
        d_data->zoomRectIndex++;

        rescale();

        emit zoomed(zoomRect);
    }
}
QwtDoubleRect QwtPlotZoomer::zoomBase (  ) const
Returns:
Initial rectangle of the zoomer
See also:
setZoomBase(), zoomRect()

Definition at line 192 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::zoomStack.

Referenced by move().

{
    return d_data->zoomStack[0];
}
void QwtPlotZoomer::zoomed ( const QwtDoubleRect rect ) [signal]

A signal emitting the zoomRect(), when the plot has been zoomed in or out.

Parameters:
rectCurrent zoom rectangle.

Referenced by zoom().

QwtDoubleRect QwtPlotZoomer::zoomRect (  ) const

Rectangle at the current position on the zoom stack.

See also:
zoomRectIndex(), scaleRect().

Definition at line 259 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::zoomRectIndex, and QwtPlotZoomer::PrivateData::zoomStack.

Referenced by end(), move(), and zoom().

{
    return d_data->zoomStack[d_data->zoomRectIndex];
}
uint QwtPlotZoomer::zoomRectIndex (  ) const
Returns:
Index of current position of zoom stack.

Definition at line 267 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::zoomRectIndex.

{
    return d_data->zoomRectIndex;
}
const QwtZoomStack & QwtPlotZoomer::zoomStack (  ) const

Return the zoom stack. zoomStack()[0] is the zoom base, zoomStack()[1] the first zoomed rectangle.

See also:
setZoomStack(), zoomRectIndex()

Definition at line 183 of file qwt_plot_zoomer.cpp.

References QwtPlotZoomer::PrivateData::zoomStack.

{
    return d_data->zoomStack;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines