Qwt User's Guide 6.3.0

Loading...
Searching...
No Matches
qwt_plot_picker.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
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 *****************************************************************************/
9
10#ifndef QWT_PLOT_PICKER_H
11#define QWT_PLOT_PICKER_H
12
13#include "qwt_global.h"
14#include "qwt_picker.h"
15#include "qwt_axis_id.h"
16
17 class QwtPlot;
18 class QPointF;
19 class QRectF;
20
21#if QT_VERSION < 0x060000
22 template< typename T > class QVector;
23#endif
24
33 class QWT_EXPORT QwtPlotPicker : public QwtPicker
34{
35 Q_OBJECT
36
37 public:
38 explicit QwtPlotPicker( QWidget* canvas );
39 virtual ~QwtPlotPicker();
40
41 explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId, QWidget* );
42
43 explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId,
44 RubberBand rubberBand, DisplayMode trackerMode, QWidget* );
45
46 virtual void setAxes( QwtAxisId xAxisId, QwtAxisId yAxisId );
47
48 QwtAxisId xAxis() const;
49 QwtAxisId yAxis() const;
50
51 QwtPlot* plot();
52 const QwtPlot* plot() const;
53
54 QWidget* canvas();
55 const QWidget* canvas() const;
56
57 Q_SIGNALS:
58
63 void selected( const QPointF& pos );
64
69 void selected( const QRectF& rect );
70
77 void selected( const QVector< QPointF >& pa );
78
85 void appended( const QPointF& pos );
86
94 void moved( const QPointF& pos );
95
96 protected:
97 QRectF scaleRect() const;
98
99 QRectF invTransform( const QRect& ) const;
100 QRect transform( const QRectF& ) const;
101
102 QPointF invTransform( const QPoint& ) const;
103 QPoint transform( const QPointF& ) const;
104
105 virtual QwtText trackerText( const QPoint& ) const QWT_OVERRIDE;
106 virtual QwtText trackerTextF( const QPointF& ) const;
107
108 virtual void move( const QPoint& ) QWT_OVERRIDE;
109 virtual void append( const QPoint& ) QWT_OVERRIDE;
110 virtual bool end( bool ok = true ) QWT_OVERRIDE;
111
112 private:
113 class PrivateData;
114 PrivateData* m_data;
115};
116
117#endif
QVector
Definition qwt_clipper.h:23
QwtPicker
QwtPicker provides selections on a widget.
Definition qwt_picker.h:104
QwtPicker::DisplayMode
DisplayMode
Display mode.
Definition qwt_picker.h:162
QwtPicker::move
virtual void move(const QPoint &)
Definition qwt_picker.cpp:1357
QwtPicker::append
virtual void append(const QPoint &)
Definition qwt_picker.cpp:1339
QwtPicker::RubberBand
RubberBand
Definition qwt_picker.h:128
QwtPicker::trackerText
virtual QwtText trackerText(const QPoint &pos) const
Return the label for a position.
Definition qwt_picker.cpp:491
QwtPicker::end
virtual bool end(bool ok=true)
Close a selection setting the state to inactive.
Definition qwt_picker.cpp:1291
QwtPlot
A 2-D plotting widget.
Definition qwt_plot.h:79
QwtPlotPicker
QwtPlotPicker provides selections on a plot canvas.
Definition qwt_plot_picker.h:34
QwtPlotPicker::selected
void selected(const QPointF &pos)
QwtPlotPicker::moved
void moved(const QPointF &pos)
QwtPlotPicker::appended
void appended(const QPointF &pos)
QwtPlotPicker::selected
void selected(const QVector< QPointF > &pa)
QwtPlotPicker::selected
void selected(const QRectF &rect)
QwtText
A class representing a text.
Definition qwt_text.h:52