QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
Signals | Public Member Functions | Protected Member Functions | List of all members
QgsGraduatedHistogramWidget Class Reference

Graphical histogram for displaying distribution of field values and editing range breaks for a QgsGraduatedSymbolRenderer renderer. More...

#include <qgsgraduatedhistogramwidget.h>

Inheritance diagram for QgsGraduatedHistogramWidget:
Inheritance graph
[legend]

Signals

void rangesModified (bool rangesAdded)
 Emitted when the user modifies the graduated ranges using the histogram widget. More...
 

Public Member Functions

 QgsGraduatedHistogramWidget (QWidget *parent=nullptr)
 QgsGraduatedHistogramWidget constructor. More...
 
void setRenderer (QgsGraduatedSymbolRenderer *renderer)
 Sets the QgsGraduatedSymbolRenderer renderer associated with the histogram. More...
 
- Public Member Functions inherited from QgsHistogramWidget
 QgsHistogramWidget (QWidget *parent=nullptr, QgsVectorLayer *layer=nullptr, const QString &fieldOrExp=QString())
 QgsHistogramWidget constructor. More...
 
 ~QgsHistogramWidget () override
 
QBrush brush () const
 Returns the brush used when drawing histogram bars. More...
 
QgsRangeList graduatedRanges () const
 Returns the graduated ranges associated with the histogram. More...
 
QgsVectorLayerlayer ()
 Returns the layer currently associated with the widget. More...
 
QPen pen () const
 Returns the pen used when drawing histogram bars. More...
 
void setBrush (const QBrush &brush)
 Sets the brush used for drawing histogram bars. More...
 
void setGraduatedRanges (const QgsRangeList &ranges)
 Sets the graduated ranges associated with the histogram. More...
 
void setPen (const QPen &pen)
 Sets the pen to use when drawing histogram bars. More...
 
void setXAxisTitle (const QString &title)
 Sets the title for the histogram's x-axis. More...
 
void setYAxisTitle (const QString &title)
 Sets the title for the histogram's y-axis. More...
 
QString sourceFieldExp () const
 Returns the source field name or expression used to calculate values displayed in the histogram. More...
 
QString xAxisTitle () const
 Returns the title for the histogram's x-axis. More...
 
QString yAxisTitle () const
 Returns the title for the histogram's y-axis. More...
 

Protected Member Functions

void drawHistogram () override
 Updates and redraws the histogram. More...
 

Additional Inherited Members

- Public Slots inherited from QgsHistogramWidget
void refresh ()
 Redraws the histogram. More...
 
void refreshValues ()
 Refreshes the values for the histogram by fetching them from the layer. More...
 
void setLayer (QgsVectorLayer *layer)
 Sets the vector layer associated with the histogram. More...
 
void setSourceFieldExp (const QString &fieldOrExp)
 Sets the source field or expression to use for values in the histogram. More...
 
- Protected Attributes inherited from QgsHistogramWidget
QwtPlot * mPlot = nullptr
 
QList< QwtPlotMarker *> mRangeMarkers
 
QgsRangeList mRanges
 

Detailed Description

Graphical histogram for displaying distribution of field values and editing range breaks for a QgsGraduatedSymbolRenderer renderer.

Since
QGIS 2.9

Definition at line 36 of file qgsgraduatedhistogramwidget.h.

Constructor & Destructor Documentation

◆ QgsGraduatedHistogramWidget()

QgsGraduatedHistogramWidget::QgsGraduatedHistogramWidget ( QWidget *  parent = nullptr)

QgsGraduatedHistogramWidget constructor.

Parameters
parentparent widget

Definition at line 43 of file qgsgraduatedhistogramwidget.cpp.

Member Function Documentation

◆ drawHistogram()

void QgsGraduatedHistogramWidget::drawHistogram ( )
overrideprotectedvirtual

Updates and redraws the histogram.

Reimplemented from QgsHistogramWidget.

Definition at line 65 of file qgsgraduatedhistogramwidget.cpp.

◆ rangesModified

void QgsGraduatedHistogramWidget::rangesModified ( bool  rangesAdded)
signal

Emitted when the user modifies the graduated ranges using the histogram widget.

Parameters
rangesAddedtrue if the user has added ranges, false if the user has just modified existing range breaks

◆ setRenderer()

void QgsGraduatedHistogramWidget::setRenderer ( QgsGraduatedSymbolRenderer renderer)

Sets the QgsGraduatedSymbolRenderer renderer associated with the histogram.

The histogram will fetch the ranges from the renderer before every refresh.

Parameters
rendererassociated QgsGraduatedSymbolRenderer

Definition at line 60 of file qgsgraduatedhistogramwidget.cpp.


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