Graphical histogram for displaying distributions of field values.
More...
#include <qgshistogramwidget.h>
|
void | refresh () |
| Redraws the histogram.
|
|
void | refreshValues () |
| Refreshes the values for the histogram by fetching them from the layer.
|
|
void | setLayer (QgsVectorLayer *layer) |
| Sets the vector layer associated with the histogram.
|
|
void | setSourceFieldExp (const QString &fieldOrExp) |
| Sets the source field or expression to use for values in the histogram.
|
|
|
| QgsHistogramWidget (QWidget *parent=nullptr, QgsVectorLayer *layer=nullptr, const QString &fieldOrExp=QString()) |
| QgsHistogramWidget constructor.
|
|
| ~QgsHistogramWidget () override |
|
QBrush | brush () const |
| Returns the brush used when drawing histogram bars.
|
|
QgsRangeList | graduatedRanges () const |
| Returns the graduated ranges associated with the histogram.
|
|
QgsVectorLayer * | layer () |
| Returns the layer currently associated with the widget.
|
|
QPen | pen () const |
| Returns the pen used when drawing histogram bars.
|
|
void | setBrush (const QBrush &brush) |
| Sets the brush used for drawing histogram bars.
|
|
void | setGraduatedRanges (const QgsRangeList &ranges) |
| Sets the graduated ranges associated with the histogram.
|
|
void | setPen (const QPen &pen) |
| Sets the pen to use when drawing histogram bars.
|
|
void | setXAxisTitle (const QString &title) |
| Sets the title for the histogram's x-axis.
|
|
void | setYAxisTitle (const QString &title) |
| Sets the title for the histogram's y-axis.
|
|
QString | sourceFieldExp () const |
| Returns the source field name or expression used to calculate values displayed in the histogram.
|
|
QString | xAxisTitle () const |
| Returns the title for the histogram's x-axis.
|
|
QString | yAxisTitle () const |
| Returns the title for the histogram's y-axis.
|
|
Graphical histogram for displaying distributions of field values.
Definition at line 48 of file qgshistogramwidget.h.
◆ QgsHistogramWidget()
QgsHistogramWidget::QgsHistogramWidget |
( |
QWidget * |
parent = nullptr , |
|
|
QgsVectorLayer * |
layer = nullptr , |
|
|
const QString & |
fieldOrExp = QString() |
|
) |
| |
QgsHistogramWidget constructor.
If layer and fieldOrExp are specified then the histogram will be initially populated with the corresponding values.
- Parameters
-
parent | parent widget |
layer | source vector layer |
fieldOrExp | field name or expression string |
Definition at line 44 of file qgshistogramwidget.cpp.
◆ ~QgsHistogramWidget()
QgsHistogramWidget::~QgsHistogramWidget |
( |
| ) |
|
|
override |
◆ brush()
QBrush QgsHistogramWidget::brush |
( |
| ) |
const |
|
inline |
◆ drawHistogram()
void QgsHistogramWidget::drawHistogram |
( |
| ) |
|
|
protectedvirtual |
◆ graduatedRanges()
Returns the graduated ranges associated with the histogram.
If set, the ranges will be used to color the histogram bars and for showing vertical dividers at the histogram breaks.
- Returns
- graduated range list
- See also
- setGraduatedRanges
Definition at line 126 of file qgshistogramwidget.h.
◆ layer()
◆ pen()
QPen QgsHistogramWidget::pen |
( |
| ) |
const |
|
inline |
◆ refresh
void QgsHistogramWidget::refresh |
( |
| ) |
|
|
slot |
◆ refreshValues
void QgsHistogramWidget::refreshValues |
( |
| ) |
|
|
slot |
Refreshes the values for the histogram by fetching them from the layer.
Definition at line 99 of file qgshistogramwidget.cpp.
◆ setBrush()
void QgsHistogramWidget::setBrush |
( |
const QBrush & |
brush | ) |
|
|
inline |
◆ setGraduatedRanges()
void QgsHistogramWidget::setGraduatedRanges |
( |
const QgsRangeList & |
ranges | ) |
|
Sets the graduated ranges associated with the histogram.
If set, the ranges will be used to color the histogram bars and for showing vertical dividers at the histogram breaks.
- Parameters
-
ranges | graduated range list |
- See also
- graduatedRanges
Definition at line 93 of file qgshistogramwidget.cpp.
◆ setLayer
◆ setPen()
void QgsHistogramWidget::setPen |
( |
const QPen & |
pen | ) |
|
|
inline |
Sets the pen to use when drawing histogram bars.
If set to Qt::NoPen then the pen will be automatically calculated. If ranges have been set using setGraduatedRanges() then the pen and brush will have no effect.
- Parameters
-
- See also
- pen
-
setBrush
Definition at line 87 of file qgshistogramwidget.h.
◆ setSourceFieldExp
void QgsHistogramWidget::setSourceFieldExp |
( |
const QString & |
fieldOrExp | ) |
|
|
slot |
Sets the source field or expression to use for values in the histogram.
- Parameters
-
fieldOrExp | field name or expression string |
- See also
- setLayer
Definition at line 164 of file qgshistogramwidget.cpp.
◆ setXAxisTitle()
void QgsHistogramWidget::setXAxisTitle |
( |
const QString & |
title | ) |
|
|
inline |
◆ setYAxisTitle()
void QgsHistogramWidget::setYAxisTitle |
( |
const QString & |
title | ) |
|
|
inline |
◆ sourceFieldExp()
QString QgsHistogramWidget::sourceFieldExp |
( |
| ) |
const |
|
inline |
◆ xAxisTitle()
QString QgsHistogramWidget::xAxisTitle |
( |
| ) |
const |
|
inline |
◆ yAxisTitle()
QString QgsHistogramWidget::yAxisTitle |
( |
| ) |
const |
|
inline |
◆ mPlot
QwtPlot* QgsHistogramWidget::mPlot = nullptr |
|
protected |
◆ mRangeMarkers
QList<QwtPlotMarker *> QgsHistogramWidget::mRangeMarkers |
|
protected |
◆ mRanges
The documentation for this class was generated from the following files: