QtiPlot
0.9.8.2
Main Page
Related Pages
Classes
Files
File List
File Members
qtiplot
src
plot2D
AddWidgetTool.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : AddWidgetTool.h
3
Project : QtiPlot
4
--------------------------------------------------------------------
5
Copyright : (C) 2008 by Ion Vasilief
6
Email (use @ for *) : ion_vasilief*yahoo.fr
7
Description : Tool for adding enrichements to 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
#ifndef ADD_WIDGET_TOOL_H
30
#define ADD_WIDGET_TOOL_H
31
32
#include "
PlotToolInterface.h
"
33
#include <QObject>
34
35
class
QAction;
36
class
QPoint;
37
class
FrameWidget
;
38
43
class
AddWidgetTool
:
public
QObject,
public
PlotToolInterface
44
{
45
Q_OBJECT
46
public
:
47
enum
WidgetType
{
48
Text
= 0,
49
TexEquation
,
50
Rectangle
,
51
Ellipse
,
52
UserWidget
= 1000
53
};
54
55
AddWidgetTool
(
WidgetType
type,
Graph
*graph, QAction *
d_action
,
const
QObject *status_target = NULL,
const
char
*status_slot =
""
);
56
virtual
~AddWidgetTool
();
57
58
virtual
int
rtti
()
const
{
return
PlotToolInterface::Rtti_AddWidgetTool
;};
60
WidgetType
widgetType
(){
return
d_widget_type
;};
61
62
signals:
67
void
statusText
(
const
QString&);
68
69
protected
:
70
void
addEllipse
(
const
QPoint& point);
71
void
addRectangle
(
const
QPoint& point);
72
void
addEquation
(
const
QPoint& point);
73
void
addText
(
const
QPoint& point);
74
void
addWidget
(
const
QPoint& point);
75
76
virtual
bool
eventFilter
(QObject *obj, QEvent *event);
77
QAction *
d_action
;
78
WidgetType
d_widget_type
;
79
FrameWidget
*
d_fw
;
80
};
81
82
#endif // ifndef ADD_WIDGET_TOOL_H
Generated on Tue Dec 10 2013 17:29:14 for QtiPlot by
1.8.4