QwtHistogram.h
Go to the documentation of this file.
/***************************************************************************
File : QwtHistogram.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2006 - 2009 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Histogram class
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#include "QwtBarCurve.h"
class Matrix;
class QwtHistogram: public QwtBarCurve
{
public:
QwtHistogram(Table *t, const QString& name, int startRow = 0, int endRow = -1);
QwtHistogram(Matrix *m);
void copy(QwtHistogram *h);
QwtDoubleRect boundingRect() const;
void setBinning(bool autoBin, double size, double begin, double end);
void setBinning(double binSize, double begin, double end);
bool autoBinning(){return d_autoBin;};
void setAutoBinning(bool autoBin = true);
double begin(){return d_begin;};
double end(){return d_end;};
double binSize(){return d_bin_size;};
void loadData();
double mean(){return d_mean;};
double standardDeviation(){return d_standard_deviation;};
double minimum(){return d_min;};
double maximum(){return d_max;};
Matrix* matrix(){return d_matrix;};
private:
void init();
void loadDataFromMatrix();
virtual void loadLabels();
Matrix *d_matrix;
bool d_autoBin;
double d_bin_size, d_begin, d_end;
double d_mean, d_standard_deviation, d_min, d_max;
};
QwtHistogram::d_end
double d_end
Definition: QwtHistogram.h:74
QwtBarCurve.h
QwtHistogram::maximum
double maximum()
Definition: QwtHistogram.h:61
QwtHistogram::end
double end()
Definition: QwtHistogram.h:53
QwtHistogram::d_matrix
Matrix * d_matrix
Definition: QwtHistogram.h:71
QwtBarCurve
Bar curve.
Definition: QwtBarCurve.h:36
QwtHistogram::standardDeviation
double standardDeviation()
Definition: QwtHistogram.h:59
QwtHistogram::d_begin
double d_begin
Definition: QwtHistogram.h:74
QwtHistogram::loadLabels
virtual void loadLabels()
Definition: QwtHistogram.cpp:266
QwtHistogram::d_autoBin
bool d_autoBin
Definition: QwtHistogram.h:73
QwtHistogram::setBinning
void setBinning(bool autoBin, double size, double begin, double end)
Definition: QwtHistogram.cpp:83
DataCurve::endRow
int endRow()
Definition: PlotCurve.h:145
QwtHistogram::mean
double mean()
Definition: QwtHistogram.h:58
QwtHistogram::d_standard_deviation
double d_standard_deviation
Definition: QwtHistogram.h:77
QwtHistogram::autoBinning
bool autoBinning()
Definition: QwtHistogram.h:48
QwtHistogram::loadDataFromMatrix
void loadDataFromMatrix()
Definition: QwtHistogram.cpp:200
QwtHistogram::binSize
double binSize()
Definition: QwtHistogram.h:54
QwtHistogram::d_min
double d_min
Definition: QwtHistogram.h:77
QwtHistogram::boundingRect
QwtDoubleRect boundingRect() const
Definition: QwtHistogram.cpp:73
QwtHistogram
Histogram class.
Definition: QwtHistogram.h:34
Matrix
Matrix worksheet class.
Definition: Matrix.h:57
QwtHistogram::minimum
double minimum()
Definition: QwtHistogram.h:60
QwtHistogram::d_max
double d_max
Definition: QwtHistogram.h:77
QwtHistogram::copy
void copy(QwtHistogram *h)
Definition: QwtHistogram.cpp:63
QwtHistogram::d_bin_size
double d_bin_size
Definition: QwtHistogram.h:74
QwtHistogram::d_mean
double d_mean
Variables storing statistical information.
Definition: QwtHistogram.h:77
DataCurve::startRow
int startRow()
Definition: PlotCurve.h:144
QwtHistogram::begin
double begin()
Definition: QwtHistogram.h:52
QwtHistogram::setAutoBinning
void setAutoBinning(bool autoBin=true)
Convenience function to be used in scripts.
Definition: QwtHistogram.cpp:99
Table
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
QwtHistogram::init
void init()
Definition: QwtHistogram.cpp:53
QwtHistogram::loadData
void loadData()
Definition: QwtHistogram.cpp:107
QwtHistogram::matrix
Matrix * matrix()
Definition: QwtHistogram.h:63
QwtHistogram::QwtHistogram
QwtHistogram(Table *t, const QString &name, int startRow=0, int endRow=-1)
Definition: QwtHistogram.cpp:38