1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
12
#ifndef QWT_PLOT_PICKER_H
13
#define QWT_PLOT_PICKER_H
15
#include "qwt_double_rect.h"
16
#include "qwt_plot_canvas.h"
17
#include "qwt_picker.h"
22
\brief QwtPlotPicker provides selections on a plot canvas
24
QwtPlotPicker is a QwtPicker tailored for selections on
25
a plot canvas. It is set to a x-Axis and y-Axis and
26
translates all pixel coordinates into this coodinate system.
29
class QWT_EXPORT QwtPlotPicker: public QwtPicker
34
explicit QwtPlotPicker(QwtPlotCanvas *);
36
explicit QwtPlotPicker(int xAxis, int yAxis,
39
explicit QwtPlotPicker(int xAxis, int yAxis, int selectionFlags,
40
RubberBand rubberBand, DisplayMode trackerMode,
43
virtual void setAxis(int xAxis, int yAxis);
49
const QwtPlot *plot() const;
51
QwtPlotCanvas *canvas();
52
const QwtPlotCanvas *canvas() const;
57
A signal emitted in case of selectionFlags() & PointSelection.
58
\param pos Selected point
60
void selected(const QwtDoublePoint &pos);
63
A signal emitted in case of selectionFlags() & RectSelection.
64
\param rect Selected rectangle
66
void selected(const QwtDoubleRect &rect);
69
A signal emitting the selected points,
70
at the end of a selection.
72
\param pa Selected points
74
void selected(const QwtArray<QwtDoublePoint> &pa);
77
A signal emitted when a point has been appended to the selection
79
\param pos Position of the appended point.
82
void appended(const QwtDoublePoint &pos);
85
A signal emitted whenever the last appended point of the
86
selection has been moved.
88
\param pos Position of the moved last point of the selection.
89
\sa move(), appended()
91
void moved(const QwtDoublePoint &pos);
94
QwtDoubleRect scaleRect() const;
96
QwtDoubleRect invTransform(const QRect &) const;
97
QRect transform(const QwtDoubleRect &) const;
99
QwtDoublePoint invTransform(const QPoint &) const;
100
QPoint transform(const QwtDoublePoint &) const;
102
virtual QwtText trackerText(const QPoint &) const;
103
virtual QwtText trackerText(const QwtDoublePoint &) const;
105
virtual void move(const QPoint &);
106
virtual void append(const QPoint &);
107
virtual bool end(bool ok = true);