[][src]Struct qt_charts::QLegend

#[repr(C)]pub struct QLegend { /* fields omitted */ }

C++ class: QtCharts::QLegend.

Methods

impl QLegend[src]

pub fn background_visible_changed(&self) -> Signal<(bool,)>[src]

This signal is emitted when the visibility of the legend background changes to visible.

Returns a built-in Qt signal QtCharts::QLegend::backgroundVisibleChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the visibility of the legend background changes to visible.

Note: Notifier signal for property backgroundVisible.

pub fn color_changed(&self) -> Signal<(*const QColor,)>[src]

This signal is emitted when the color of the legend background changes to color.

Returns a built-in Qt signal QtCharts::QLegend::colorChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the color of the legend background changes to color.

Note: Notifier signal for property color.

pub fn border_color_changed(&self) -> Signal<(*const QColor,)>[src]

This signal is emitted when the border color of the legend background changes to color.

Returns a built-in Qt signal QtCharts::QLegend::borderColorChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the border color of the legend background changes to color.

Note: Notifier signal for property borderColor.

pub fn font_changed(&self) -> Signal<(*const QFont,)>[src]

This signal is emitted when the font of the markers of the legend changes to font.

Returns a built-in Qt signal QtCharts::QLegend::fontChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the font of the markers of the legend changes to font.

Note: Notifier signal for property font.

pub fn label_color_changed(&self) -> Signal<(*const QColor,)>[src]

This signal is emitted when the color of the brush used to draw the legend labels changes to color.

Returns a built-in Qt signal QtCharts::QLegend::labelColorChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the color of the brush used to draw the legend labels changes to color.

Note: Notifier signal for property labelColor.

pub fn reverse_markers_changed(&self) -> Signal<(bool,)>[src]

This signal is emitted when the use of reverse order for the markers in the legend is changed to reverseMarkers.

Returns a built-in Qt signal QtCharts::QLegend::reverseMarkersChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the use of reverse order for the markers in the legend is changed to reverseMarkers.

Note: Notifier signal for property reverseMarkers.

pub fn show_tool_tips_changed(&self) -> Signal<(bool,)>[src]

This signal is emitted when the visibility of tooltips is changed to showToolTips.

Returns a built-in Qt signal QtCharts::QLegend::showToolTipsChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the visibility of tooltips is changed to showToolTips.

Note: Notifier signal for property showToolTips.

pub fn marker_shape_changed(&self) -> Signal<(MarkerShape,)>[src]

The default shape of the legend markers. The default value is MarkerShapeRectangle.

Returns a built-in Qt signal QtCharts::QLegend::markerShapeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

The default shape of the legend markers. The default value is MarkerShapeRectangle.

This property was introduced in Qt 5.9.

Access functions:

QLegend::MarkerShape markerShape() const
void setMarkerShape(QLegend::MarkerShape shape)

Notifier signal:

void markerShapeChanged(QLegend::MarkerShape shape)

pub unsafe fn alignment(&self) -> QFlags<AlignmentFlag>[src]

How the legend is aligned with the chart.

Calls C++ function: QFlags<Qt::AlignmentFlag> QtCharts::QLegend::alignment() const.

C++ documentation:

How the legend is aligned with the chart.

Can be Qt::AlignTop, Qt::AlignBottom, Qt::AlignLeft, Qt::AlignRight. If you set more than one flag, the result is undefined.

Access functions:

Qt::Alignment alignment() const
void setAlignment(Qt::Alignment alignment)

pub unsafe fn attach_to_chart(&self)[src]

Attaches the legend to a chart. The chart may adjust the layout of the legend.

Calls C++ function: void QtCharts::QLegend::attachToChart().

C++ documentation:

Attaches the legend to a chart. The chart may adjust the layout of the legend.

pub unsafe fn border_color(&self) -> CppBox<QColor>[src]

This property holds the line color of the legend.

Calls C++ function: QColor QtCharts::QLegend::borderColor().

C++ documentation:

This property holds the line color of the legend.

Access functions:

QColor borderColor()
void setBorderColor(QColor color)

Notifier signal:

void borderColorChanged(QColor color)

pub unsafe fn brush(&self) -> CppBox<QBrush>[src]

Returns the brush used by the legend.

Calls C++ function: QBrush QtCharts::QLegend::brush() const.

C++ documentation:

Returns the brush used by the legend.

See also setBrush().

pub unsafe fn color(&self) -> CppBox<QColor>[src]

This property holds the background (brush) color of the legend.

Calls C++ function: QColor QtCharts::QLegend::color().

C++ documentation:

This property holds the background (brush) color of the legend.

If you change the color of the legend, the style of the legend brush is set to Qt::SolidPattern.

Access functions:

QColor color()
void setColor(QColor color)

Notifier signal:

void colorChanged(QColor color)

pub unsafe fn detach_from_chart(&self)[src]

Detaches the legend from the chart. The chart will no longer adjust the layout of the legend.

Calls C++ function: void QtCharts::QLegend::detachFromChart().

C++ documentation:

Detaches the legend from the chart. The chart will no longer adjust the layout of the legend.

pub unsafe fn font(&self) -> CppBox<QFont>[src]

This property holds the font of the markers used by the legend.

Calls C++ function: QFont QtCharts::QLegend::font() const.

C++ documentation:

This property holds the font of the markers used by the legend.

Access functions:

QFont font() const
void setFont(const QFont &font)

Notifier signal:

void fontChanged(QFont font)

pub unsafe fn is_attached_to_chart(&self) -> bool[src]

Returns true, if the legend is attached to a chart.

Calls C++ function: bool QtCharts::QLegend::isAttachedToChart().

C++ documentation:

Returns true, if the legend is attached to a chart.

pub unsafe fn is_background_visible(&self) -> bool[src]

Returns the visibility of the legend background.

Calls C++ function: bool QtCharts::QLegend::isBackgroundVisible() const.

C++ documentation:

Returns the visibility of the legend background.

Note: Getter function for property backgroundVisible.

pub unsafe fn label_brush(&self) -> CppBox<QBrush>[src]

Returns the brush used to draw labels.

Calls C++ function: QBrush QtCharts::QLegend::labelBrush() const.

C++ documentation:

Returns the brush used to draw labels.

See also setLabelBrush().

pub unsafe fn label_color(&self) -> CppBox<QColor>[src]

This property holds the color of the brush used to draw labels.

Calls C++ function: QColor QtCharts::QLegend::labelColor() const.

C++ documentation:

This property holds the color of the brush used to draw labels.

Access functions:

QColor labelColor() const
void setLabelColor(QColor color)

Notifier signal:

void labelColorChanged(QColor color)

pub unsafe fn marker_shape(&self) -> MarkerShape[src]

The default shape of the legend markers. The default value is MarkerShapeRectangle.

Calls C++ function: QtCharts::QLegend::MarkerShape QtCharts::QLegend::markerShape() const.

C++ documentation:

The default shape of the legend markers. The default value is MarkerShapeRectangle.

This property was introduced in Qt 5.9.

Access functions:

QLegend::MarkerShape markerShape() const
void setMarkerShape(QLegend::MarkerShape shape)

Notifier signal:

void markerShapeChanged(QLegend::MarkerShape shape)

pub unsafe fn markers_1a(
    &self,
    series: impl CastInto<Ptr<QAbstractSeries>>
) -> CppBox<QListOfQLegendMarker>
[src]

Returns the list of markers in the legend. The list can be filtered by specifying the series for which the markers are returned.

Calls C++ function: QList<QtCharts::QLegendMarker*> QtCharts::QLegend::markers(QtCharts::QAbstractSeries* series = …) const.

C++ documentation:

Returns the list of markers in the legend. The list can be filtered by specifying the series for which the markers are returned.

pub unsafe fn markers_0a(&self) -> CppBox<QListOfQLegendMarker>[src]

Returns the list of markers in the legend. The list can be filtered by specifying the series for which the markers are returned.

Calls C++ function: QList<QtCharts::QLegendMarker*> QtCharts::QLegend::markers() const.

C++ documentation:

Returns the list of markers in the legend. The list can be filtered by specifying the series for which the markers are returned.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QtCharts::QLegend::metaObject() const.

pub unsafe fn paint_3a(
    &self,
    painter: impl CastInto<Ptr<QPainter>>,
    option: impl CastInto<Ptr<QStyleOptionGraphicsItem>>,
    widget: impl CastInto<Ptr<QWidget>>
)
[src]

Calls C++ function: virtual void QtCharts::QLegend::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = …).

pub unsafe fn paint_2a(
    &self,
    painter: impl CastInto<Ptr<QPainter>>,
    option: impl CastInto<Ptr<QStyleOptionGraphicsItem>>
)
[src]

Calls C++ function: virtual void QtCharts::QLegend::paint(QPainter* painter, const QStyleOptionGraphicsItem* option).

pub unsafe fn pen(&self) -> CppBox<QPen>[src]

Returns the pen used by the legend.

Calls C++ function: QPen QtCharts::QLegend::pen() const.

C++ documentation:

Returns the pen used by the legend.

See also setPen().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QtCharts::QLegend::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QtCharts::QLegend::qt_metacast(const char* arg1).

pub unsafe fn reverse_markers(&self) -> bool[src]

This property holds whether reverse order is used for the markers in the legend.

Calls C++ function: bool QtCharts::QLegend::reverseMarkers().

C++ documentation:

This property holds whether reverse order is used for the markers in the legend.

This property is false by default.

Access functions:

bool reverseMarkers()
void setReverseMarkers(bool reverseMarkers = true)

Notifier signal:

void reverseMarkersChanged(bool reverseMarkers)

pub unsafe fn set_alignment(&self, alignment: QFlags<AlignmentFlag>)[src]

How the legend is aligned with the chart.

Calls C++ function: void QtCharts::QLegend::setAlignment(QFlags<Qt::AlignmentFlag> alignment).

C++ documentation:

How the legend is aligned with the chart.

Can be Qt::AlignTop, Qt::AlignBottom, Qt::AlignLeft, Qt::AlignRight. If you set more than one flag, the result is undefined.

Access functions:

Qt::Alignment alignment() const
void setAlignment(Qt::Alignment alignment)

pub unsafe fn set_background_visible_1a(&self, visible: bool)[src]

Sets the visibility of the legend background to visible.

Calls C++ function: void QtCharts::QLegend::setBackgroundVisible(bool visible = …).

C++ documentation:

Sets the visibility of the legend background to visible.

Note: Setter function for property backgroundVisible.

See also isBackgroundVisible().

pub unsafe fn set_background_visible_0a(&self)[src]

Sets the visibility of the legend background to visible.

Calls C++ function: void QtCharts::QLegend::setBackgroundVisible().

C++ documentation:

Sets the visibility of the legend background to visible.

Note: Setter function for property backgroundVisible.

See also isBackgroundVisible().

pub unsafe fn set_border_color(&self, color: impl CastInto<Ref<QColor>>)[src]

This property holds the line color of the legend.

Calls C++ function: void QtCharts::QLegend::setBorderColor(QColor color).

C++ documentation:

This property holds the line color of the legend.

Access functions:

QColor borderColor()
void setBorderColor(QColor color)

Notifier signal:

void borderColorChanged(QColor color)

pub unsafe fn set_brush(&self, brush: impl CastInto<Ref<QBrush>>)[src]

Sets the brush that is used to draw the background of the legend.

Calls C++ function: void QtCharts::QLegend::setBrush(const QBrush& brush).

C++ documentation:

Sets the brush that is used to draw the background of the legend.

See also brush().

pub unsafe fn set_color(&self, color: impl CastInto<Ref<QColor>>)[src]

This property holds the background (brush) color of the legend.

Calls C++ function: void QtCharts::QLegend::setColor(QColor color).

C++ documentation:

This property holds the background (brush) color of the legend.

If you change the color of the legend, the style of the legend brush is set to Qt::SolidPattern.

Access functions:

QColor color()
void setColor(QColor color)

Notifier signal:

void colorChanged(QColor color)

pub unsafe fn set_font(&self, font: impl CastInto<Ref<QFont>>)[src]

This property holds the font of the markers used by the legend.

Calls C++ function: void QtCharts::QLegend::setFont(const QFont& font).

C++ documentation:

This property holds the font of the markers used by the legend.

Access functions:

QFont font() const
void setFont(const QFont &font)

Notifier signal:

void fontChanged(QFont font)

pub unsafe fn set_label_brush(&self, brush: impl CastInto<Ref<QBrush>>)[src]

Sets the brush used to draw the legend labels to brush.

Calls C++ function: void QtCharts::QLegend::setLabelBrush(const QBrush& brush).

C++ documentation:

Sets the brush used to draw the legend labels to brush.

See also labelBrush().

pub unsafe fn set_label_color(&self, color: impl CastInto<Ref<QColor>>)[src]

This property holds the color of the brush used to draw labels.

Calls C++ function: void QtCharts::QLegend::setLabelColor(QColor color).

C++ documentation:

This property holds the color of the brush used to draw labels.

Access functions:

QColor labelColor() const
void setLabelColor(QColor color)

Notifier signal:

void labelColorChanged(QColor color)

pub unsafe fn set_marker_shape(&self, shape: MarkerShape)[src]

The default shape of the legend markers. The default value is MarkerShapeRectangle.

Calls C++ function: void QtCharts::QLegend::setMarkerShape(QtCharts::QLegend::MarkerShape shape).

C++ documentation:

The default shape of the legend markers. The default value is MarkerShapeRectangle.

This property was introduced in Qt 5.9.

Access functions:

QLegend::MarkerShape markerShape() const
void setMarkerShape(QLegend::MarkerShape shape)

Notifier signal:

void markerShapeChanged(QLegend::MarkerShape shape)

pub unsafe fn set_pen(&self, pen: impl CastInto<Ref<QPen>>)[src]

Sets the pen that is used to draw the legend borders.

Calls C++ function: void QtCharts::QLegend::setPen(const QPen& pen).

C++ documentation:

Sets the pen that is used to draw the legend borders.

See also pen().

pub unsafe fn set_reverse_markers_1a(&self, reverse_markers: bool)[src]

This property holds whether reverse order is used for the markers in the legend.

Calls C++ function: void QtCharts::QLegend::setReverseMarkers(bool reverseMarkers = …).

C++ documentation:

This property holds whether reverse order is used for the markers in the legend.

This property is false by default.

Access functions:

bool reverseMarkers()
void setReverseMarkers(bool reverseMarkers = true)

Notifier signal:

void reverseMarkersChanged(bool reverseMarkers)

pub unsafe fn set_reverse_markers_0a(&self)[src]

This property holds whether reverse order is used for the markers in the legend.

Calls C++ function: void QtCharts::QLegend::setReverseMarkers().

C++ documentation:

This property holds whether reverse order is used for the markers in the legend.

This property is false by default.

Access functions:

bool reverseMarkers()
void setReverseMarkers(bool reverseMarkers = true)

Notifier signal:

void reverseMarkersChanged(bool reverseMarkers)

pub unsafe fn set_show_tool_tips(&self, show: bool)[src]

When show is true, the legend labels will show a tooltip when the mouse hovers over them if the label itself is shown elided. This is false by default.

Calls C++ function: void QtCharts::QLegend::setShowToolTips(bool show).

C++ documentation:

When show is true, the legend labels will show a tooltip when the mouse hovers over them if the label itself is shown elided. This is false by default.

Note: Setter function for property showToolTips.

See also showToolTips().

pub unsafe fn show_tool_tips(&self) -> bool[src]

This property holds whether tooltips are shown when the text is truncated.

Calls C++ function: bool QtCharts::QLegend::showToolTips() const.

C++ documentation:

This property holds whether tooltips are shown when the text is truncated.

This property is false by default.

Access functions:

bool showToolTips() const
void setShowToolTips(bool show)

Notifier signal:

void showToolTipsChanged(bool showToolTips)

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QtCharts::QLegend::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QtCharts::QLegend::trUtf8(const char* s, const char* c, int n).

Trait Implementations

impl CppDeletable for QLegend[src]

unsafe fn delete(&self)[src]

Destroys the legend object. The legend is always owned by a QChart, so an application should never call this function.

Calls C++ function: virtual [destructor] void QtCharts::QLegend::~QLegend().

C++ documentation:

Destroys the legend object. The legend is always owned by a QChart, so an application should never call this function.

impl Deref for QLegend[src]

type Target = QGraphicsWidget

The resulting type after dereferencing.

fn deref(&self) -> &QGraphicsWidget[src]

Calls C++ function: QGraphicsWidget* static_cast<QGraphicsWidget*>(QtCharts::QLegend* ptr).

impl DynamicCast<QLegend> for QGraphicsWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsWidget>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* dynamic_cast<QtCharts::QLegend*>(QGraphicsWidget* ptr).

impl DynamicCast<QLegend> for QGraphicsObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsObject>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* dynamic_cast<QtCharts::QLegend*>(QGraphicsObject* ptr).

impl DynamicCast<QLegend> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* dynamic_cast<QtCharts::QLegend*>(QObject* ptr).

impl DynamicCast<QLegend> for QGraphicsItem[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsItem>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* dynamic_cast<QtCharts::QLegend*>(QGraphicsItem* ptr).

impl DynamicCast<QLegend> for QGraphicsLayoutItem[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsLayoutItem>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* dynamic_cast<QtCharts::QLegend*>(QGraphicsLayoutItem* ptr).

impl StaticDowncast<QLegend> for QGraphicsWidget[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsWidget>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* static_cast<QtCharts::QLegend*>(QGraphicsWidget* ptr).

impl StaticDowncast<QLegend> for QGraphicsObject[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsObject>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* static_cast<QtCharts::QLegend*>(QGraphicsObject* ptr).

impl StaticDowncast<QLegend> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* static_cast<QtCharts::QLegend*>(QObject* ptr).

impl StaticDowncast<QLegend> for QGraphicsItem[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsItem>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* static_cast<QtCharts::QLegend*>(QGraphicsItem* ptr).

impl StaticDowncast<QLegend> for QGraphicsLayoutItem[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsLayoutItem>) -> Ptr<QLegend>[src]

Calls C++ function: QtCharts::QLegend* static_cast<QtCharts::QLegend*>(QGraphicsLayoutItem* ptr).

impl StaticUpcast<QGraphicsItem> for QLegend[src]

unsafe fn static_upcast(ptr: Ptr<QLegend>) -> Ptr<QGraphicsItem>[src]

Calls C++ function: QGraphicsItem* static_cast<QGraphicsItem*>(QtCharts::QLegend* ptr).

impl StaticUpcast<QGraphicsLayoutItem> for QLegend[src]

unsafe fn static_upcast(ptr: Ptr<QLegend>) -> Ptr<QGraphicsLayoutItem>[src]

Calls C++ function: QGraphicsLayoutItem* static_cast<QGraphicsLayoutItem*>(QtCharts::QLegend* ptr).

impl StaticUpcast<QGraphicsObject> for QLegend[src]

unsafe fn static_upcast(ptr: Ptr<QLegend>) -> Ptr<QGraphicsObject>[src]

Calls C++ function: QGraphicsObject* static_cast<QGraphicsObject*>(QtCharts::QLegend* ptr).

impl StaticUpcast<QGraphicsWidget> for QLegend[src]

unsafe fn static_upcast(ptr: Ptr<QLegend>) -> Ptr<QGraphicsWidget>[src]

Calls C++ function: QGraphicsWidget* static_cast<QGraphicsWidget*>(QtCharts::QLegend* ptr).

impl StaticUpcast<QObject> for QLegend[src]

unsafe fn static_upcast(ptr: Ptr<QLegend>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QtCharts::QLegend* ptr).

Auto Trait Implementations

impl RefUnwindSafe for QLegend

impl Send for QLegend

impl Sync for QLegend

impl Unpin for QLegend

impl UnwindSafe for QLegend

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.