~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt-5.1.0/examples/event_filter/canvaspicker.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-05-26 10:26:31 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080526102631-bp95mfccnrb957nx
Tags: 5.1.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <qobject.h>
2
 
 
3
 
class QPoint;
4
 
class QCustomEvent;
5
 
class QwtPlot;
6
 
class QwtPlotCurve;
7
 
 
8
 
class CanvasPicker: public QObject
9
 
{
10
 
    Q_OBJECT
11
 
public:
12
 
    CanvasPicker(QwtPlot *plot);
13
 
    virtual bool eventFilter(QObject *, QEvent *);
14
 
 
15
 
    virtual bool event(QEvent *);
16
 
 
17
 
private:
18
 
    void select(const QPoint &);
19
 
    void move(const QPoint &);
20
 
    void moveBy(int dx, int dy);
21
 
 
22
 
    void release();
23
 
 
24
 
    void showCursor(bool enable);
25
 
    void shiftPointCursor(bool up);
26
 
    void shiftCurveCursor(bool up);
27
 
 
28
 
    QwtPlot *plot() { return (QwtPlot *)parent(); }
29
 
    const QwtPlot *plot() const { return (QwtPlot *)parent(); }
30
 
 
31
 
    QwtPlotCurve *d_selectedCurve;
32
 
    int d_selectedPoint;
33
 
};