Subgroup: other
Class: QgsHistogramWidget¶
-
class
qgis.gui.
QgsHistogramWidget
(parent: QWidget = None, layer: QgsVectorLayer = None, fieldOrExp: str = '')¶ Bases:
PyQt5.QtWidgets.QWidget
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
Graphical histogram for displaying distributions of field values.
New in version 2.9: Methods
actionEvent
brush
Returns the brush used when drawing histogram bars. changeEvent
childEvent
closeEvent
connectNotify
contextMenuEvent
create
customEvent
destroy
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
drawHistogram
Updates and redraws the histogram. dropEvent
enterEvent
event
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPreviousChild
graduatedRanges
Returns the graduated ranges associated with the histogram. hideEvent
initPainter
inputMethodEvent
isSignalConnected
keyPressEvent
keyReleaseEvent
layer
Returns the layer currently associated with the widget. leaveEvent
metric
mouseDoubleClickEvent
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
moveEvent
nativeEvent
paintEvent
pen
Returns the pen used when drawing histogram bars. receivers
refresh
Redraws the histogram. refreshValues
Refreshes the values for the histogram by fetching them from the layer. resizeEvent
sender
senderSignalIndex
setBrush
Sets the brush used for drawing histogram bars. setGraduatedRanges
Sets the graduated ranges associated with the histogram. setLayer
Sets the vector layer associated with the histogram. setPen
Sets the pen to use when drawing histogram bars. setSourceFieldExp
Sets the source field or expression to use for values in the histogram. setXAxisTitle
Sets the title for the histogram’s x-axis. setYAxisTitle
Sets the title for the histogram’s y-axis. sharedPainter
showEvent
sourceFieldExp
Returns the source field name or expression used to calculate values displayed in the histogram. tabletEvent
timerEvent
updateMicroFocus
wheelEvent
xAxisTitle
Returns the title for the histogram’s x-axis. yAxisTitle
Returns the title for the histogram’s y-axis. Signals
Attributes
-
actionEvent
()¶
-
brush
(self) → QBrush¶ Returns the brush used when drawing histogram bars.
See also
See also
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
drawHistogram
(self)¶ Updates and redraws the histogram.
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
graduatedRanges
(self) → object¶ 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
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layer
(self) → QgsVectorLayer¶ Returns the layer currently associated with the widget.
See also
See also
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
pen
(self) → QPen¶ Returns the pen used when drawing histogram bars.
See also
See also
-
receivers
()¶
-
refresh
(self)¶ Redraws the histogram. Calling this slot does not update the values for the histogram, use refreshValues() to do this.
-
refreshValues
(self)¶ Refreshes the values for the histogram by fetching them from the layer.
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setBrush
(self, brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient])¶ Sets the brush used for drawing histogram bars. If ranges have been set using setGraduatedRanges() then the pen and brush will have no effect.
Parameters: brush – histogram brush See also
See also
-
setGraduatedRanges
(self, ranges: object)¶ 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
-
setLayer
(self, layer: QgsVectorLayer)¶ Sets the vector layer associated with the histogram.
Parameters: layer – source vector layer See also
-
setPen
(self, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient])¶ 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: pen – histogram pen See also
See also
-
setSourceFieldExp
(self, fieldOrExp: str)¶ Sets the source field or expression to use for values in the histogram.
Parameters: fieldOrExp – field name or expression string See also
-
setXAxisTitle
(self, title: str)¶ Sets the title for the histogram’s x-axis.
Parameters: title – x-axis title, or empty string to remove title See also
See also
-
setYAxisTitle
(self, title: str)¶ Sets the title for the histogram’s y-axis.
Parameters: title – y-axis title, or empty string to remove title See also
See also
-
showEvent
()¶
-
sourceFieldExp
(self) → str¶ Returns the source field name or expression used to calculate values displayed in the histogram.
See also
See also
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
xAxisTitle
(self) → str¶ Returns the title for the histogram’s x-axis.
See also
See also
-
yAxisTitle
(self) → str¶ Returns the title for the histogram’s y-axis.
See also
See also