QtiPlot  0.9.8.2
QwtHistogram.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : QwtHistogram.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 - 2009 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
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 
31 class Matrix;
32 
35 {
36 public:
37  QwtHistogram(Table *t, const QString& name, int startRow = 0, int endRow = -1);
38  QwtHistogram(Matrix *m);
39 
40  void copy(QwtHistogram *h);
41 
42  QwtDoubleRect boundingRect() const;
43 
44  void setBinning(bool autoBin, double size, double begin, double end);
46  void setBinning(double binSize, double begin, double end);
47 
48  bool autoBinning(){return d_autoBin;};
50  void setAutoBinning(bool autoBin = true);
51 
52  double begin(){return d_begin;};
53  double end(){return d_end;};
54  double binSize(){return d_bin_size;};
55 
56  void loadData();
57 
58  double mean(){return d_mean;};
60  double minimum(){return d_min;};
61  double maximum(){return d_max;};
62 
63  Matrix* matrix(){return d_matrix;};
64 
65 private:
66  void init();
67 
68  void loadDataFromMatrix();
69  virtual void loadLabels();
70 
72 
73  bool d_autoBin;
75 
78 };