qwt_plot_picker.h
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_PLOT_PICKER_H
00011 #define QWT_PLOT_PICKER_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_picker.h"
00015 #include <qvector.h>
00016 
00017 class QwtPlot;
00018 
00027 class QWT_EXPORT QwtPlotPicker: public QwtPicker
00028 {
00029     Q_OBJECT
00030 
00031 public:
00032     explicit QwtPlotPicker( QWidget *canvas );
00033     virtual ~QwtPlotPicker();
00034 
00035     explicit QwtPlotPicker( int xAxis, int yAxis, QWidget * );
00036 
00037     explicit QwtPlotPicker( int xAxis, int yAxis,
00038         RubberBand rubberBand, DisplayMode trackerMode, QWidget * );
00039 
00040     virtual void setAxis( int xAxis, int yAxis );
00041 
00042     int xAxis() const;
00043     int yAxis() const;
00044 
00045     QwtPlot *plot();
00046     const QwtPlot *plot() const;
00047 
00048     QWidget *canvas();
00049     const QWidget *canvas() const;
00050 
00051 Q_SIGNALS:
00052 
00057     void selected( const QPointF &pos );
00058 
00063     void selected( const QRectF &rect );
00064 
00071     void selected( const QVector<QPointF> &pa );
00072 
00079     void appended( const QPointF &pos );
00080 
00088     void moved( const QPointF &pos );
00089 
00090 protected:
00091     QRectF scaleRect() const;
00092 
00093     QRectF invTransform( const QRect & ) const;
00094     QRect transform( const QRectF & ) const;
00095 
00096     QPointF invTransform( const QPoint & ) const;
00097     QPoint transform( const QPointF & ) const;
00098 
00099     virtual QwtText trackerText( const QPoint & ) const;
00100     virtual QwtText trackerTextF( const QPointF & ) const;
00101 
00102     virtual void move( const QPoint & );
00103     virtual void append( const QPoint & );
00104     virtual bool end( bool ok = true );
00105 
00106 private:
00107     int d_xAxis;
00108     int d_yAxis;
00109 };
00110 
00111 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:05