- class QLegendMarker#
The
QLegendMarker
class is an abstract object that can be used to access markers within a legend. More…Inherited by:
QXYLegendMarker
,QPieLegendMarker
,QCandlestickLegendMarker
,QBoxPlotLegendMarker
,QBarLegendMarker
,QAreaLegendMarker
Synopsis#
Properties#
Methods#
def
brush()
def
font()
def
isVisible()
def
label()
def
labelBrush()
def
pen()
def
setBrush()
def
setFont()
def
setLabel()
def
setLabelBrush()
def
setPen()
def
setShape()
def
setVisible()
def
shape()
Virtual methods#
def
type()
Signals#
def
brushChanged()
def
clicked()
def
fontChanged()
def
hovered()
def
labelChanged()
def
penChanged()
def
shapeChanged()
def
visibleChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
A legend marker consists of an icon and a label. The icon color corresponds to the color used to draw a series and the label displays the name of the series (or the label of the slice for a pie series or bar set for a bar series). A legend marker is always related to one series, slice, or bar set.
See also
- class LegendMarkerType#
The type of the legend marker object.
Constant
Description
QLegendMarker.LegendMarkerTypeArea
A legend marker for an area series.
QLegendMarker.LegendMarkerTypeBar
A legend marker for a bar set.
QLegendMarker.LegendMarkerTypePie
A legend marker for a pie slice.
QLegendMarker.LegendMarkerTypeXY
A legend marker for a line, spline, or scatter series.
QLegendMarker.LegendMarkerTypeBoxPlot
A legend marker for a box plot series.
QLegendMarker.LegendMarkerTypeCandlestick
A legend marker for a candlestick series.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.This property holds The brush used to fill the icon..
- Access functions:
Signal
brushChanged()
This property holds The font of the label..
- Access functions:
Signal
fontChanged()
- property labelᅟ: str#
This property holds The text shown in the legend for a legend marker..
- Access functions:
Signal
labelChanged()
This property holds The brush of the label..
- Access functions:
This property holds The pen used to draw the outline of the icon..
- Access functions:
Signal
penChanged()
- property shapeᅟ: QLegend.MarkerShape#
The shape of the legend marker. Defaults to
MarkerShapeDefault
, which indicates the shape is determined bymarkerShape
property.- Access functions:
Signal
shapeChanged()
- property visibleᅟ: bool#
This property holds The visibility of the legend marker..
The visibility affects both the legend marker label and the icon.
- Access functions:
Returns the brush used to fill the icon.
See also
Getter of property
brushᅟ
.- brushChanged()#
This signal is emitted when the brush of the legend marker has changed.
Notification signal of property
brushᅟ
.- clicked()#
This signal is emitted when the legend marker is clicked.
Retuns the font of the label.
See also
Getter of property
fontᅟ
.- fontChanged()#
This signal is emitted when the (label) font of the legend marker has changed.
Notification signal of property
fontᅟ
.- hovered(status)#
- Parameters:
status – bool
This signal is emitted when a mouse is hovered over the legend marker. When the mouse moves over the marker,
status
turnstrue
, and when the mouse moves away again, it turnsfalse
.- isVisible()#
- Return type:
bool
Returns the visibility of the marker.
Getter of property
visibleᅟ
.- label()#
- Return type:
str
Returns the label of the marker.
See also
Getter of property
labelᅟ
.Returns the brush that is used to draw the label.
See also
Getter of property
labelBrushᅟ
.- labelBrushChanged()#
This signal is emitted when the label brush of the legend marker has changed.
Notification signal of property
labelBrushᅟ
.- labelChanged()#
This signal is emitted when the label of the legend marker has changed.
Notification signal of property
labelᅟ
.Returns the pen used to draw the outline of the icon.
See also
Getter of property
penᅟ
.- penChanged()#
This signal is emitted when the pen of the legend marker has changed.
Notification signal of property
penᅟ
.Sets the brush used to fill the icon to
brush
.Setter of property
brushᅟ
.Sets the font of the label to
font
.See also
Setter of property
fontᅟ
.- setLabel(label)#
- Parameters:
label – str
Sets the label of the marker to
label
.Setter of property
labelᅟ
.Sets the the brush used to draw to label to
brush
.See also
Setter of property
labelBrushᅟ
.Sets the
pen
used to draw the outline of the icon topen
.See also
Setter of property
penᅟ
.- setShape(shape)#
- Parameters:
shape –
MarkerShape
See also
Setter of property
shapeᅟ
.- setVisible(visible)#
- Parameters:
visible – bool
Sets the marker’s visibility to
visible
.See also
Setter of property
visibleᅟ
.- shape()#
- Return type:
See also
Getter of property
shapeᅟ
.- shapeChanged()#
Notification signal of property
shapeᅟ
.- abstract type()#
- Return type:
Returns the type of the legend marker for the related series, pie slice, or bar set.
See also
- visibleChanged()#
This signal is emitted when the visibility of the legend marker has changed.
Notification signal of property
visibleᅟ
.