QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Graphical histogram for displaying distribution of field values and editing range breaks for a QgsGraduatedSymbolRenderer renderer. More...
#include <qgsgraduatedhistogramwidget.h>
Signals | |
void | rangesModified (bool rangesAdded) |
Emitted when the user modifies the graduated ranges using the histogram widget. | |
Public Member Functions | |
QgsGraduatedHistogramWidget (QWidget *parent=nullptr) | |
QgsGraduatedHistogramWidget constructor. | |
void | setRenderer (QgsGraduatedSymbolRenderer *renderer) |
Sets the QgsGraduatedSymbolRenderer renderer associated with the histogram. | |
Public Member Functions inherited from QgsHistogramWidget | |
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. | |
Protected Member Functions | |
void | drawHistogram () override |
Updates and redraws the histogram. | |
Additional Inherited Members | |
Public Slots inherited from QgsHistogramWidget | |
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. | |
Protected Attributes inherited from QgsHistogramWidget | |
QwtPlot * | mPlot = nullptr |
QList< QwtPlotMarker * > | mRangeMarkers |
QgsRangeList | mRanges |
Graphical histogram for displaying distribution of field values and editing range breaks for a QgsGraduatedSymbolRenderer renderer.
Definition at line 35 of file qgsgraduatedhistogramwidget.h.
QgsGraduatedHistogramWidget::QgsGraduatedHistogramWidget | ( | QWidget * | parent = nullptr | ) |
QgsGraduatedHistogramWidget constructor.
parent | parent widget |
Definition at line 45 of file qgsgraduatedhistogramwidget.cpp.
|
overrideprotectedvirtual |
Updates and redraws the histogram.
Reimplemented from QgsHistogramWidget.
Definition at line 67 of file qgsgraduatedhistogramwidget.cpp.
|
signal |
Emitted when the user modifies the graduated ranges using the histogram widget.
rangesAdded | true if the user has added ranges, false if the user has just modified existing range breaks |
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.
renderer | associated QgsGraduatedSymbolRenderer |
Definition at line 62 of file qgsgraduatedhistogramwidget.cpp.