Qwt Polar User's Guide 1.0.0

qwt_polar_picker.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * QwtPolar Widget Library
00003  * Copyright (C) 2008   Uwe Rathmann
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the Qwt License, Version 1.0
00007  *****************************************************************************/
00008 
00009 #ifndef QWT_POLAR_PICKER_H
00010 #define QWT_POLAR_PICKER_H
00011 
00012 #include "qwt_polar_global.h"
00013 #include "qwt_picker.h"
00014 #include <qvector.h>
00015 #include <qpainterpath.h>
00016 
00017 class QwtPolarPlot;
00018 class QwtPolarCanvas;
00019 class QwtPointPolar;
00020 
00028 class QWT_POLAR_EXPORT QwtPolarPicker: public QwtPicker
00029 {
00030     Q_OBJECT
00031 
00032 public:
00033     explicit QwtPolarPicker( QwtPolarCanvas * );
00034     virtual ~QwtPolarPicker();
00035 
00036     explicit QwtPolarPicker(
00037         RubberBand rubberBand, DisplayMode trackerMode,
00038         QwtPolarCanvas * );
00039 
00040     QwtPolarPlot *plot();
00041     const QwtPolarPlot *plot() const;
00042 
00043     QwtPolarCanvas *canvas();
00044     const QwtPolarCanvas *canvas() const;
00045 
00046     virtual QRect pickRect() const;
00047 
00048 Q_SIGNALS:
00049 
00054     void selected( const QwtPointPolar &pos );
00055 
00062     void selected( const QVector<QwtPointPolar> &points );
00063 
00070     void appended( const QwtPointPolar &pos );
00071 
00079     void moved( const QwtPointPolar &pos );
00080 
00081 protected:
00082     QwtPointPolar invTransform( const QPoint & ) const;
00083 
00084     virtual QwtText trackerText( const QPoint & ) const;
00085     virtual QwtText trackerTextPolar( const QwtPointPolar & ) const;
00086 
00087     virtual void move( const QPoint & );
00088     virtual void append( const QPoint & );
00089     virtual bool end( bool ok = true );
00090 
00091 private:
00092     virtual QPainterPath pickArea() const;
00093 
00094     class PrivateData;
00095     PrivateData *d_data;
00096 };
00097 
00098 #endif