QwtHistogram Class Reference

Histogram class. More...

`#include <QwtHistogram.h>`

Inheritance diagram for QwtHistogram:

## Public Member Functions

bool | autoBinning ()
double | begin ()
double | binSize ()
QwtDoubleRect | boundingRect () const
void | copy (QwtHistogram *h)
double | end ()
void | loadData ()
Matrix * | matrix ()
double | maximum ()
double | mean ()
double | minimum ()
| QwtHistogram (Table *t, const QString &name, int startRow=0, int endRow=-1)
| QwtHistogram (Matrix *m)
void | setAutoBinning (bool autoBin=true)
| Convenience function to be used in scripts. More...
void | setBinning (bool autoBin, double size, double begin, double end)
void | setBinning (double binSize, double begin, double end)
| Convenience function. It disables autobinning. More...
double | standardDeviation ()
Public Member Functions inherited from QwtBarCurve
void | copy (QwtBarCurve *b)
double | dataOffset ()
int | gap () const
bool | isStacked ()
int | offset () const
BarStyle | orientation ()
| QwtBarCurve (BarStyle style, Table *t, const QString &xColName, const QString &name, int startRow, int endRow)
virtual QString | saveToString ()
void | setGap (int gap)
void | setOffset (int offset)
void | setStacked (bool on=true)
QList< QwtBarCurve * > | stackedCurvesList () const
double | stackOffset (int i, QList< QwtBarCurve *> stack) const
Public Member Functions inherited from DataCurve
void | addErrorBars (ErrorBarsCurve *c)
| Adds a single error bars curve to the list of attached error bars. More...
void | clearErrorBars ()
| Clears the list of attached error bars. More...
void | clearLabels ()
| Clears the list of attached text labels. More...
void | clone (DataCurve *c)
| DataCurve (Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1)
| DataCurve (Table *xt, const QString &xColName, Table *yt, const QString &name, int startRow=0, int endRow=-1)
void | enableSpeedMode ()
int | endRow ()
QList< ErrorBarsCurve * > | errorBarsList ()
| The list of attached error bars. More...
bool | hasLabels ()
bool | hasSelectedLabels ()
bool | hasVisibleLabels ()
bool | isFullRange ()
int | labelsAlignment ()
QColor | labelsColor ()
QString | labelsColumnName ()
QFont | labelsFont ()
double | labelsRotation ()
bool | labelsWhiteOut ()
int | labelsXOffset ()
int | labelsYOffset ()
void | moveLabels (const QPoint &pos)
virtual QStringList | plotAssociation ()
| A list of data sources for this curve. More...
void | remove ()
void | removeErrorBars (ErrorBarsCurve *c)
| Remove a single error bars curve from the list of attached error bars. More...
void | restoreLabels (const QStringList &lst)
bool | selectedLabels (const QPoint &pos)
void | setDataSource (Table *yt, int ycol=1, Table *xt=NULL, int xcol=0)
void | setFullRange ()
void | setLabelsAlignment (int flags)
void | setLabelsColor (const QColor &c)
void | setLabelsColumnName (const QString &name)
void | setLabelsFont (const QFont &font)
void | setLabelsOffset (int x, int y)
void | setLabelsRotation (double angle)
void | setLabelsSelected (bool on=true)
void | setLabelsWhiteOut (bool whiteOut=true)
void | setRowRange (int startRow, int endRow)
void | setVisible (bool on)
void | setVisibleLabels (bool on=true)
void | setXColumnName (const QString &name)
int | startRow ()
Table * | table ()
int | tableRow (int point)
| Returns the row index in the data source table corresponding to the data point index. More...
virtual void | updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName)
virtual bool | updateData (Table *t, const QString &colName)
virtual void | updateLabelsPosition ()
QString | xColumnName ()
Table * | xTable ()
Public Member Functions inherited from PlotCurve
void | enableSideLines (bool on)
| PlotCurve (const QString &name=QString())
int | plotStyle ()
| The plot style of the curve. More...
void | restoreCurveLayout (const QStringList &lst)
QString | saveCurveLayout ()
QString | saveCurveSymbolImage ()
void | setPlotStyle (int s)
void | setSkipSymbolsCount (int count)
| Set the number of symbols not to be drawn: usefull for large data sets. More...
void | setType (int t)
void | setXOffset (double dx)
void | setYOffset (double dy)
bool | sideLinesEnabled ()
int | skipSymbolsCount ()
| Returns the number of symbols not to be drawn. More...
int | type ()
| Sort of rtti() More...
double | xOffset ()
double | yOffset ()

## Private Member Functions

void | init ()
void | loadDataFromMatrix ()
virtual void | loadLabels ()

## Private Attributes

bool | d_autoBin
double | d_begin
double | d_bin_size
double | d_end
Matrix * | d_matrix
double | d_max
double | d_mean
| Variables storing statistical information. More...
double | d_min
double | d_standard_deviation

## Additional Inherited Members

Public Types inherited from QwtBarCurve
enum | BarStyle { Vertical = 0, Horizontal = 1 }
Protected Member Functions inherited from DataCurve
virtual void | drawCurve (QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
bool | validCurveType ()
Protected Member Functions inherited from PlotCurve
QwtDoubleRect | boundingRect () const
void | drawSideLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void | drawSticks (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
virtual void | drawSymbols (QPainter *p, const QwtSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
| Draw symbols. More...
Protected Attributes inherited from QwtBarCurve
int | bar_gap
int | bar_offset
BarStyle | bar_style
bool | d_is_stacked
Protected Attributes inherited from DataCurve
double | d_click_pos_x
| Keep track of the coordinates of the point where the user clicked when selecting the labels. More...
double | d_click_pos_y
std::vector< DataRange > | d_data_ranges
int | d_end_row
QList< ErrorBarsCurve * > | d_error_bars
| List of the error bar curves associated to this curve. More...
int | d_labels_align
double | d_labels_angle
QColor | d_labels_color
QString | d_labels_column
| The name of the column used for text labels. More...
QFont | d_labels_font
QList< PlotMarker * > | d_labels_list
| List of the text labels associated to this curve. More...
int | d_labels_x_offset
int | d_labels_y_offset
PlotMarker * | d_selected_label
| Keeps track of the plot marker on which the user clicked when selecting the labels. More...
bool | d_show_labels
int | d_start_row
Table * | d_table
| The data source table. More...
bool | d_white_out_labels
QString | d_x_column
| The name of the column used for abscissae values. More...
Table * | d_x_table
| The data source table in case X and Y datasets are from different tables. More...
Protected Attributes inherited from PlotCurve
int | d_plot_style
bool | d_side_lines
int | d_skip_symbols
int | d_type
double | d_x_offset
double | d_y_offset

## Detailed Description

Histogram class.

## Constructor & Destructor Documentation

## QwtHistogram() [1/2]

QwtHistogram::QwtHistogram | ( | Table * | t,
|  | const QString & | name,
|  | int | startRow = `0`,
|  | int | endRow = `-1`
| ) |  |

References init().

## QwtHistogram() [2/2]

QwtHistogram::QwtHistogram | ( | Matrix * | m | ) |

References d_matrix, and init().

## Member Function Documentation

## autoBinning()

bool QwtHistogram::autoBinning | ( |  | ) |

inline

References d_autoBin, and setAutoBinning().

Referenced by PlotDialog::acceptParams(), Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().

## begin()

double QwtHistogram::begin | ( |  | ) |

inline

References d_begin.

Referenced by PlotDialog::acceptParams(), Graph::saveCurveLayout(), PlotDialog::setAutomaticBinning(), and setBinning().

## binSize()

double QwtHistogram::binSize | ( |  | ) |

inline

References d_bin_size, and loadData().

Referenced by PlotDialog::acceptParams(), Graph::saveCurveLayout(), PlotDialog::setAutomaticBinning(), and setBinning().

## boundingRect()

QwtDoubleRect QwtHistogram::boundingRect | ( |  | ) | const

virtual

Reimplemented from QwtBarCurve.

## copy()

void QwtHistogram::copy | ( | QwtHistogram * | h | ) |

References QwtBarCurve::copy(), d_autoBin, d_begin, d_bin_size, and d_end.

## end()

double QwtHistogram::end | ( |  | ) |

inline

References d_end.

Referenced by PlotDialog::acceptParams(), Graph::saveCurveLayout(), PlotDialog::setAutomaticBinning(), and setBinning().

## init()

void QwtHistogram::init | ( |  | ) |

private

References QwtBarCurve::bar_gap, d_autoBin, d_matrix, Graph::Histogram, PlotCurve::setPlotStyle(), and PlotCurve::setType().

Referenced by matrix(), and QwtHistogram().

## loadData()

void QwtHistogram::loadData | ( |  | ) |

virtual

Reimplemented from DataCurve.

References Table::colIndex(), d_autoBin, d_begin, d_bin_size, d_end, DataCurve::d_end_row, d_matrix, d_max, d_mean, d_min, DataCurve::d_show_labels, d_standard_deviation, DataCurve::d_start_row, DataCurve::d_table, loadDataFromMatrix(), loadLabels(), min, and Table::text().

Referenced by PlotDialog::acceptParams(), Graph::addCurves(), Graph::addHistogram(), binSize(), ApplicationWindow::openGraph(), Graph::restoreHistogram(), and ApplicationWindow::updateMatrixPlots().

## loadDataFromMatrix()

void QwtHistogram::loadDataFromMatrix | ( |  | ) |

private

References d_autoBin, d_begin, d_bin_size, d_end, d_matrix, d_max, d_mean, d_min, DataCurve::d_show_labels, d_standard_deviation, MatrixModel::dataVector(), loadLabels(), Matrix::matrixModel(), min, Matrix::numCols(), Matrix::numRows(), and Matrix::range().

Referenced by loadData(), and matrix().

## loadLabels()

void QwtHistogram::loadLabels | ( |  | ) |

private virtual

Reimplemented from DataCurve.

References DataCurve::clearLabels(), DataCurve::d_labels_align, DataCurve::d_labels_angle, DataCurve::d_labels_color, DataCurve::d_labels_font, DataCurve::d_labels_list, DataCurve::d_labels_x_offset, DataCurve::d_labels_y_offset, DataCurve::d_show_labels, and DataCurve::d_white_out_labels.

Referenced by loadData(), loadDataFromMatrix(), and matrix().

## matrix()

Matrix* QwtHistogram::matrix | ( |  | ) |

inline

References d_matrix, init(), loadDataFromMatrix(), and loadLabels().

Referenced by Graph::copyCurves(), and ApplicationWindow::updateMatrixPlots().

## maximum()

double QwtHistogram::maximum | ( |  | ) |

inline

References d_max.

Referenced by PlotDialog::showStatistics().

## mean()

double QwtHistogram::mean | ( |  | ) |

inline

References d_mean.

Referenced by PlotDialog::showStatistics().

## minimum()

double QwtHistogram::minimum | ( |  | ) |

inline

References d_min.

Referenced by PlotDialog::showStatistics().

## setAutoBinning()

void QwtHistogram::setAutoBinning | ( | bool | autoBin = `true` | ) |

Convenience function to be used in scripts.

References d_autoBin.

Referenced by autoBinning().

## setBinning() [1/2]

void QwtHistogram::setBinning | ( | bool | autoBin,
|  | double | size,
|  | double | begin,
|  | double | end
| ) |  |

References begin(), d_autoBin, d_begin, d_bin_size, d_end, and end().

Referenced by PlotDialog::acceptParams(), ApplicationWindow::openGraph(), and Graph::restoreHistogram().

## setBinning() [2/2]

void QwtHistogram::setBinning | ( | double | binSize,
|  | double | begin,
|  | double | end
| ) |  |

Convenience function. It disables autobinning.

References begin(), binSize(), d_autoBin, d_begin, d_bin_size, d_end, and end().

## standardDeviation()

double QwtHistogram::standardDeviation | ( |  | ) |

inline

References d_standard_deviation.

Referenced by PlotDialog::showStatistics().

## Member Data Documentation

## d_autoBin

bool QwtHistogram::d_autoBin

private

Referenced by autoBinning(), copy(), init(), loadData(), loadDataFromMatrix(), setAutoBinning(), and setBinning().

## d_begin

double QwtHistogram::d_begin

private

Referenced by begin(), copy(), loadData(), loadDataFromMatrix(), and setBinning().

## d_bin_size

double QwtHistogram::d_bin_size

private

Referenced by binSize(), copy(), loadData(), loadDataFromMatrix(), and setBinning().

## d_end

double QwtHistogram::d_end

private

Referenced by copy(), end(), loadData(), loadDataFromMatrix(), and setBinning().

## d_matrix

Matrix* QwtHistogram::d_matrix

private

Referenced by init(), loadData(), loadDataFromMatrix(), matrix(), and QwtHistogram().

## d_max

double QwtHistogram::d_max

private

Referenced by loadData(), loadDataFromMatrix(), and maximum().

## d_mean

double QwtHistogram::d_mean

private

Variables storing statistical information.

Referenced by loadData(), loadDataFromMatrix(), and mean().

## d_min

double QwtHistogram::d_min

private

Referenced by loadData(), loadDataFromMatrix(), and minimum().

## d_standard_deviation

double QwtHistogram::d_standard_deviation

private

Referenced by loadData(), loadDataFromMatrix(), and standardDeviation().

The documentation for this class was generated from the following files:

- qtiplot/src/plot2D/QwtHistogram.h
- qtiplot/src/plot2D/QwtHistogram.cpp