QGIS/python/gui/symbology-ng/qgsgraduatedhistogramwidget.sip
Nyall Dawson 183286a006 [FEATURE] Add a graphical histogram for the graduated renderer
This adds a new histogram tab to the graduated renderer, which
shows an interactive histogram of the values from the assigned
field or expression. Class breaks can be moved or added using
the histogram widget.

A base class, QgsHistogramWidget, has been created to display
histograms for a field or expression. In future this could be
used to show a histogram within a "selection statistics" panel.

Sponsored by ADUGA (http://www.aduga.org)
2015-05-19 02:21:15 +10:00

43 lines
1.2 KiB
Plaintext

/** \ingroup gui
* \class QgsGraduatedHistogramWidget
* \brief Graphical histogram for displaying distribution of field values and
* editing range breaks for a QgsGraduatedSymbolRendererV2 renderer.
*
* \note Added in version 2.9
*/
class QgsGraduatedHistogramWidget : QWidget
{
%TypeHeaderCode
#include <qgsgraduatedhistogramwidget.h>
%End
public:
/** QgsGraduatedHistogramWidget constructor
* @param parent parent widget
*/
QgsGraduatedHistogramWidget( QWidget *parent /TransferThis/ = 0 );
~QgsGraduatedHistogramWidget();
/** Sets the QgsGraduatedSymbolRendererV2 renderer associated with the histogram.
* The histogram will fetch the ranges from the renderer before every refresh.
* @param renderer associated QgsGraduatedSymbolRendererV2
*/
void setRenderer( QgsGraduatedSymbolRendererV2* renderer );
signals:
/** Emitted when the user modifies the graduated ranges using the histogram widget.
* @param rangesAdded true if the user has added ranges, false if the user has just
* modified existing range breaks
*/
void rangesModified( bool rangesAdded );
protected:
virtual void drawHistogram();
};