qwt_plot_picker.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_PLOT_PICKER_H
#define QWT_PLOT_PICKER_H
#include "qwt_global.h"
#include "qwt_picker.h"
#include <qvector.h>
class QwtPlot;
class QWT_EXPORT QwtPlotPicker: public QwtPicker
{
Q_OBJECT
public:
explicit QwtPlotPicker( QWidget *canvas );
virtual ~QwtPlotPicker();
explicit QwtPlotPicker( int xAxis, int yAxis, QWidget * );
explicit QwtPlotPicker( int xAxis, int yAxis,
RubberBand rubberBand, DisplayMode trackerMode, QWidget * );
virtual void setAxis( int xAxis, int yAxis );
int xAxis() const;
int yAxis() const;
QwtPlot *plot();
const QwtPlot *plot() const;
QWidget *canvas();
const QWidget *canvas() const;
Q_SIGNALS:
void selected( const QPointF &pos );
void selected( const QRectF &rect );
void selected( const QVector<QPointF> &pa );
void appended( const QPointF &pos );
void moved( const QPointF &pos );
protected:
QRectF scaleRect() const;
QRectF invTransform( const QRect & ) const;
QRect transform( const QRectF & ) const;
QPointF invTransform( const QPoint & ) const;
QPoint transform( const QPointF & ) const;
virtual QwtText trackerText( const QPoint & ) const;
virtual QwtText trackerTextF( const QPointF & ) const;
virtual void move( const QPoint & );
virtual void append( const QPoint & );
virtual bool end( bool ok = true );
private:
int d_xAxis;
int d_yAxis;
};
#endif
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtPicker::DisplayMode
DisplayMode
Display mode.
Definition: qwt_picker.h:153
QwtPicker::selected
void selected(const QPolygon &polygon)
QwtPicker::move
virtual void move(const QPoint &)
Definition: qwt_picker.cpp:1333
QwtPicker::trackerText
virtual QwtText trackerText(const QPoint &pos) const
Return the label for a position.
Definition: qwt_picker.cpp:502
QwtPicker::RubberBand
RubberBand
Definition: qwt_picker.h:119
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition: qwt_plot_picker.h:27
QwtPicker::appended
void appended(const QPoint &pos)
QwtPicker
QwtPicker provides selections on a widget.
Definition: qwt_picker.h:95
QwtPlot
A 2-D plotting widget.
Definition: qwt_plot.h:74
QwtPicker::end
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
Definition: qwt_picker.cpp:1265
QwtPicker::append
virtual void append(const QPoint &)
Definition: qwt_picker.cpp:1313
QwtPicker::moved
void moved(const QPoint &pos)