SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
QwtHistogram.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : QwtHistogram.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 : Histogram 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 "
QwtBarCurve.h
"
30
32
class
QwtHistogram
:
public
QwtBarCurve
33
{
34
public
:
35
QwtHistogram
(
Table
*t,
const
char
*name,
int
startRow
,
int
endRow
);
36
37
void
copy
(
const
QwtHistogram
*h);
38
39
QwtDoubleRect
boundingRect
()
const
;
40
41
void
setBinning
(
bool
autoBin,
double
size,
double
begin
,
double
end
);
42
bool
autoBinning
(){
return
d_autoBin
;};
43
double
begin
(){
return
d_begin
;};
44
double
end
(){
return
d_end
;};
45
double
binSize
(){
return
d_bin_size
;};
46
47
virtual
bool
loadData
();
48
void
initData
(
const
QVector<double>& Y,
int
size);
49
50
double
mean
(){
return
d_mean
;};
51
double
standardDeviation
(){
return
d_standard_deviation
;};
52
double
minimum
(){
return
d_min
;};
53
double
maximum
(){
return
d_max
;};
54
55
private
:
56
void
draw
(QPainter *painter,
const
QwtScaleMap &xMap,
57
const
QwtScaleMap &yMap,
int
from,
int
to)
const
;
58
59
bool
d_autoBin
;
60
double
d_bin_size
,
d_begin
,
d_end
;
61
63
double
d_mean
,
d_standard_deviation
,
d_min
,
d_max
;
64
};
Generated by
1.8.1