SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
DataPointPicker.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : DataPointPicker.h
3
Project : SciDAVis
4
--------------------------------------------------------------------
5
Copyright : (C) 2010 Knut Franke
6
Email (use @ for *) : Knut.Franke*gmx.net
7
Description : Let the user pick single data points from a plot.
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
30
#ifndef DATA_POINT_PICKER_H
31
#define DATA_POINT_PICKER_H
32
33
#include <QEventLoop>
34
#include <QPointF>
35
36
class
Graph
;
37
class
ApplicationWindow
;
38
class
QwtPlotCurve;
39
40
class
DataPointPicker
:
public
QObject
41
{
42
Q_OBJECT
43
44
public
:
45
DataPointPicker
(
Graph
*g,
ApplicationWindow
*app);
46
~DataPointPicker
();
47
QPointF
pick
();
48
protected
slots:
49
void
pointSelected
(QwtPlotCurve *curve,
int
pointIndex);
50
private
:
51
QEventLoop
m_picking_loop
;
52
Graph
*
m_graph
;
53
ApplicationWindow
*
m_app
;
54
QPointF
m_result
;
55
};
56
57
#endif // ifndef DATA_POINT_PICKER_H
Generated by
1.8.1