SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
QwtPieCurve.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : QwtPieCurve.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 : Pie plot class
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 <qwt_plot.h>
30
#include "
PlotCurve.h
"
31
33
class
QwtPieCurve
:
public
DataCurve
34
{
35
public
:
36
QwtPieCurve
(
Table
*t,
const
char
*name,
int
startRow
,
int
endRow
);
37
38
public
slots:
39
QColor
color
(
int
i)
const
;
40
41
int
ray
(){
return
d_pie_ray
;};
42
void
setRay
(
int
size){
d_pie_ray
= size;
updateBoundingRect
();};
43
44
Qt::BrushStyle
pattern
(){
return
QwtPlotCurve::brush().style();};
45
void
setBrushStyle
(
const
Qt::BrushStyle& style);
46
47
void
setFirstColor
(
int
index){
d_first_color
= index;};
48
int
firstColor
(){
return
d_first_color
;};
49
50
virtual
bool
loadData
();
51
void
updateBoundingRect
();
52
53
private
:
54
void
draw
(QPainter *painter,
const
QwtScaleMap &xMap,
55
const
QwtScaleMap &yMap,
int
from,
int
to)
const
;
56
57
void
drawPie
(QPainter *painter,
const
QwtScaleMap &xMap,
58
const
QwtScaleMap &yMap,
int
from,
int
to)
const
;
59
60
int
d_pie_ray
,
d_first_color
;
62
double
d_left_coord
;
63
};
Generated by
1.8.1