SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
CanvasPicker.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : CanvasPicker.h
3
Project : SciDAVis
4
--------------------------------------------------------------------
5
Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6
Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7
Description : Canvas picker
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
#include <QObject>
30
#include "
Plot.h
"
31
32
class
Graph
;
33
class
ArrowMarker
;
34
41
class
CanvasPicker
:
public
QObject
42
{
43
Q_OBJECT
44
public
:
45
CanvasPicker
(
Graph
*
plot
);
46
virtual
bool
eventFilter
(QObject *, QEvent *);
47
void
selectPoints
(
int
n);
48
void
selectPeak
(
const
QPoint& p);
49
51
53
void
disableEditing
();
54
55
private
:
56
void
drawTextMarker
(
const
QPoint&);
57
void
drawLineMarker
(
const
QPoint&,
bool
endArrow);
58
60
63
bool
selectMarker
(
const
QMouseEvent *e);
64
70
Graph
*
plot
() {
return
(
Graph
*)parent(); }
71
77
Plot
*
plotWidget
;
78
QPoint
startLinePoint
,
endLinePoint
;
79
80
signals:
81
void
showPlotDialog
(
int
);
82
void
viewTextDialog
();
83
void
viewLineDialog
();
84
void
viewImageDialog
();
85
void
drawTextOff
();
86
void
showMarkerPopupMenu
();
87
void
modified
();
88
void
selectPlot
();
89
90
private
:
91
bool
pointSelected
;
98
ArrowMarker
*
d_editing_marker
;
99
};
Generated by
1.8.1