[][src]Struct qt_charts::QPieSeries

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

C++ class: QtCharts::QPieSeries.

Methods

impl QPieSeries[src]

pub fn clicked(&self) -> Signal<(*mut QPieSlice,)>[src]

This signal is emitted when the slice specified by slice is clicked.

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

C++ documentation:

This signal is emitted when the slice specified by slice is clicked.

See also QPieSlice::clicked().

pub fn hovered(&self) -> Signal<(*mut QPieSlice, bool)>[src]

This signal is emitted when a mouse is hovered over the slice specified by slice. When the mouse moves over the slice, state turns true, and when the mouse moves away again, it turns false.

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

C++ documentation:

This signal is emitted when a mouse is hovered over the slice specified by slice. When the mouse moves over the slice, state turns true, and when the mouse moves away again, it turns false.

See also QPieSlice::hovered().

pub fn pressed(&self) -> Signal<(*mut QPieSlice,)>[src]

This signal is emitted when the user clicks the slice specified by slice and holds down the mouse button.

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

C++ documentation:

This signal is emitted when the user clicks the slice specified by slice and holds down the mouse button.

See also QPieSlice::pressed().

pub fn released(&self) -> Signal<(*mut QPieSlice,)>[src]

This signal is emitted when the user releases the mouse press on the slice specified by slice.

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

C++ documentation:

This signal is emitted when the user releases the mouse press on the slice specified by slice.

See also QPieSlice::released().

pub fn double_clicked(&self) -> Signal<(*mut QPieSlice,)>[src]

This signal is emitted when the slice specified by slice is double-clicked.

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

C++ documentation:

This signal is emitted when the slice specified by slice is double-clicked.

See also QPieSlice::doubleClicked().

pub fn count_changed(&self) -> Signal<()>[src]

This signal is emitted when the slice count changes.

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

C++ documentation:

This signal is emitted when the slice count changes.

Note: Notifier signal for property count.

See also count.

pub fn sum_changed(&self) -> Signal<()>[src]

This signal is emitted when the sum of all slices changes.

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

C++ documentation:

This signal is emitted when the sum of all slices changes.

Note: Notifier signal for property sum.

See also sum.

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

This signal is emitted when the slices specified by slices are added to the series.

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

C++ documentation:

This signal is emitted when the slices specified by slices are added to the series.

See also append() and insert().

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

This signal is emitted when the slices specified by slices are removed from the series.

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

C++ documentation:

This signal is emitted when the slices specified by slices are removed from the series.

See also remove().

pub unsafe fn append_q_pie_slice(
    &self,
    slice: impl CastInto<Ptr<QPieSlice>>
) -> bool
[src]

Appends the slice specified by slice to the series. Slice ownership is passed to the series.

Calls C++ function: bool QtCharts::QPieSeries::append(QtCharts::QPieSlice* slice).

C++ documentation:

Appends the slice specified by slice to the series. Slice ownership is passed to the series.

Returns true if appending succeeds.

pub unsafe fn append_q_list_of_q_pie_slice(
    &self,
    slices: impl CastInto<Ref<QListOfQPieSlice>>
) -> bool
[src]

Appends the array of slices specified by slices to the series. Slice ownership is passed to the series.

Calls C++ function: bool QtCharts::QPieSeries::append(QList<QtCharts::QPieSlice*> slices).

C++ documentation:

Appends the array of slices specified by slices to the series. Slice ownership is passed to the series.

Returns true if appending succeeds.

pub unsafe fn append_q_string_double(
    &self,
    label: impl CastInto<Ref<QString>>,
    value: c_double
) -> QPtr<QPieSlice>
[src]

Appends a single slice with the specified value and label to the series. Slice ownership is passed to the series. Returns null if value is NaN, Inf, or -Inf and adds nothing to the series.

Calls C++ function: QtCharts::QPieSlice* QtCharts::QPieSeries::append(QString label, double value).

C++ documentation:

Appends a single slice with the specified value and label to the series. Slice ownership is passed to the series. Returns null if value is NaN, Inf, or -Inf and adds nothing to the series.

pub unsafe fn clear(&self)[src]

Clears all slices from the series.

Calls C++ function: void QtCharts::QPieSeries::clear().

C++ documentation:

Clears all slices from the series.

pub unsafe fn count(&self) -> c_int[src]

This property holds the number of slices in the series.

Calls C++ function: int QtCharts::QPieSeries::count() const.

C++ documentation:

This property holds the number of slices in the series.

Access functions:

int count() const

Notifier signal:

void countChanged()

pub unsafe fn hole_size(&self) -> c_double[src]

This property holds the donut hole size.

Calls C++ function: double QtCharts::QPieSeries::holeSize() const.

C++ documentation:

This property holds the donut hole size.

The value is relative to the chart rectangle, so that:

  • 0.0 is the minimum size (full pie drawn without a hole).
  • 1.0 is the maximum size that can fit the chart (the donut has no width).

When setting this property, the size property is adjusted if necessary, to ensure that the hole size is not greater than the pie size.

The default value is 0.0.

Access functions:

qreal holeSize() const
void setHoleSize(qreal holeSize)

pub unsafe fn horizontal_position(&self) -> c_double[src]

This property holds the horizontal position of the pie.

Calls C++ function: double QtCharts::QPieSeries::horizontalPosition() const.

C++ documentation:

This property holds the horizontal position of the pie.

The value is relative to the chart rectangle, so that:

  • 0.0 is the absolute left.
  • 1.0 is the absolute right.

The default value is 0.5 (center).

Access functions:

qreal horizontalPosition() const
void setHorizontalPosition(qreal relativePosition)

See also verticalPosition.

pub unsafe fn insert(
    &self,
    index: c_int,
    slice: impl CastInto<Ptr<QPieSlice>>
) -> bool
[src]

Inserts the slice specified by slice to the series before the slice at the position specified by index. Slice ownership is passed to the series.

Calls C++ function: bool QtCharts::QPieSeries::insert(int index, QtCharts::QPieSlice* slice).

C++ documentation:

Inserts the slice specified by slice to the series before the slice at the position specified by index. Slice ownership is passed to the series.

Returns true if inserting succeeds.

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

Returns true if the series is empty.

Calls C++ function: bool QtCharts::QPieSeries::isEmpty() const.

C++ documentation:

Returns true if the series is empty.

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

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

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QObject>>) -> QBox<QPieSeries>[src]

Calls C++ function: [constructor] void QtCharts::QPieSeries::QPieSeries(QObject* parent = …).

pub unsafe fn new_0a() -> QBox<QPieSeries>[src]

Calls C++ function: [constructor] void QtCharts::QPieSeries::QPieSeries().

pub unsafe fn pie_end_angle(&self) -> c_double[src]

Returns the end angle of the pie.

Calls C++ function: double QtCharts::QPieSeries::pieEndAngle() const.

C++ documentation:

Returns the end angle of the pie.

A full pie is 360 degrees, where 0 degrees is at 12 a'clock.

Note: Getter function for property endAngle.

See also setPieEndAngle(), pieStartAngle(), and setPieStartAngle().

pub unsafe fn pie_size(&self) -> c_double[src]

This property holds the pie size.

Calls C++ function: double QtCharts::QPieSeries::pieSize() const.

C++ documentation:

This property holds the pie size.

The value is relative to the chart rectangle, so that:

  • 0.0 is the minimum size (pie not drawn).
  • 1.0 is the maximum size that can fit the chart.

When setting this property, the holeSize property is adjusted if necessary, to ensure that the hole size is not greater than the pie size.

The default value is 0.7.

Access functions:

qreal pieSize() const
void setPieSize(qreal relativeSize)

pub unsafe fn pie_start_angle(&self) -> c_double[src]

This property holds the starting angle of the pie.

Calls C++ function: double QtCharts::QPieSeries::pieStartAngle() const.

C++ documentation:

This property holds the starting angle of the pie.

A full pie is 360 degrees, where 0 degrees is at 12 a'clock.

The default value is 0.

Access functions:

qreal pieStartAngle() const
void setPieStartAngle(qreal startAngle)

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::QPieSeries::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::QPieSeries::qt_metacast(const char* arg1).

pub unsafe fn remove(&self, slice: impl CastInto<Ptr<QPieSlice>>) -> bool[src]

Removes a single slice, specified by slice, from the series and deletes it permanently.

Calls C++ function: bool QtCharts::QPieSeries::remove(QtCharts::QPieSlice* slice).

C++ documentation:

Removes a single slice, specified by slice, from the series and deletes it permanently.

The pointer cannot be referenced after this call.

Returns true if the removal succeeds.

pub unsafe fn set_hole_size(&self, hole_size: c_double)[src]

This property holds the donut hole size.

Calls C++ function: void QtCharts::QPieSeries::setHoleSize(double holeSize).

C++ documentation:

This property holds the donut hole size.

The value is relative to the chart rectangle, so that:

  • 0.0 is the minimum size (full pie drawn without a hole).
  • 1.0 is the maximum size that can fit the chart (the donut has no width).

When setting this property, the size property is adjusted if necessary, to ensure that the hole size is not greater than the pie size.

The default value is 0.0.

Access functions:

qreal holeSize() const
void setHoleSize(qreal holeSize)

pub unsafe fn set_horizontal_position(&self, relative_position: c_double)[src]

This property holds the horizontal position of the pie.

Calls C++ function: void QtCharts::QPieSeries::setHorizontalPosition(double relativePosition).

C++ documentation:

This property holds the horizontal position of the pie.

The value is relative to the chart rectangle, so that:

  • 0.0 is the absolute left.
  • 1.0 is the absolute right.

The default value is 0.5 (center).

Access functions:

qreal horizontalPosition() const
void setHorizontalPosition(qreal relativePosition)

See also verticalPosition.

pub unsafe fn set_labels_position(&self, position: LabelPosition)[src]

Sets the position of all the slice labels to position.

Calls C++ function: void QtCharts::QPieSeries::setLabelsPosition(QtCharts::QPieSlice::LabelPosition position).

C++ documentation:

Sets the position of all the slice labels to position.

Note: This function affects only the current slices in the series. If a new slice is added, the default label position is QPieSlice::LabelOutside.

See also QPieSlice::labelPosition() and QPieSlice::setLabelPosition().

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

Sets the visibility of all slice labels to visible.

Calls C++ function: void QtCharts::QPieSeries::setLabelsVisible(bool visible = …).

C++ documentation:

Sets the visibility of all slice labels to visible.

Note: This function affects only the current slices in the series. If a new slice is added, the default label visibility is false.

See also QPieSlice::isLabelVisible() and QPieSlice::setLabelVisible().

pub unsafe fn set_labels_visible_0a(&self)[src]

Sets the visibility of all slice labels to visible.

Calls C++ function: void QtCharts::QPieSeries::setLabelsVisible().

C++ documentation:

Sets the visibility of all slice labels to visible.

Note: This function affects only the current slices in the series. If a new slice is added, the default label visibility is false.

See also QPieSlice::isLabelVisible() and QPieSlice::setLabelVisible().

pub unsafe fn set_pie_end_angle(&self, end_angle: c_double)[src]

Sets the end angle of the pie.

Calls C++ function: void QtCharts::QPieSeries::setPieEndAngle(double endAngle).

C++ documentation:

Sets the end angle of the pie.

A full pie is 360 degrees, where 0 degrees is at 12 a'clock.

angle must be greater than the start angle.

Note: Setter function for property endAngle.

See also pieEndAngle(), pieStartAngle(), and setPieStartAngle().

pub unsafe fn set_pie_size(&self, relative_size: c_double)[src]

This property holds the pie size.

Calls C++ function: void QtCharts::QPieSeries::setPieSize(double relativeSize).

C++ documentation:

This property holds the pie size.

The value is relative to the chart rectangle, so that:

  • 0.0 is the minimum size (pie not drawn).
  • 1.0 is the maximum size that can fit the chart.

When setting this property, the holeSize property is adjusted if necessary, to ensure that the hole size is not greater than the pie size.

The default value is 0.7.

Access functions:

qreal pieSize() const
void setPieSize(qreal relativeSize)

pub unsafe fn set_pie_start_angle(&self, start_angle: c_double)[src]

This property holds the starting angle of the pie.

Calls C++ function: void QtCharts::QPieSeries::setPieStartAngle(double startAngle).

C++ documentation:

This property holds the starting angle of the pie.

A full pie is 360 degrees, where 0 degrees is at 12 a'clock.

The default value is 0.

Access functions:

qreal pieStartAngle() const
void setPieStartAngle(qreal startAngle)

pub unsafe fn set_vertical_position(&self, relative_position: c_double)[src]

This property holds the vertical position of the pie.

Calls C++ function: void QtCharts::QPieSeries::setVerticalPosition(double relativePosition).

C++ documentation:

This property holds the vertical position of the pie.

The value is relative to the chart rectangle, so that:

  • 0.0 is the absolute top.
  • 1.0 is the absolute bottom.

The default value is 0.5 (center).

Access functions:

qreal verticalPosition() const
void setVerticalPosition(qreal relativePosition)

See also horizontalPosition.

pub unsafe fn slices(&self) -> CppBox<QListOfQPieSlice>[src]

Returns a list of slices that belong to this series.

Calls C++ function: QList<QtCharts::QPieSlice*> QtCharts::QPieSeries::slices() const.

C++ documentation:

Returns a list of slices that belong to this series.

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

Returns a reference to the staticMetaObject field.

pub unsafe fn sum(&self) -> c_double[src]

This property holds the sum of all slices.

Calls C++ function: double QtCharts::QPieSeries::sum() const.

C++ documentation:

This property holds the sum of all slices.

The series keeps track of the sum of all the slices it holds.

Access functions:

qreal sum() const

Notifier signal:

void sumChanged()

pub unsafe fn take(&self, slice: impl CastInto<Ptr<QPieSlice>>) -> bool[src]

Takes a single slice, specified by slice, from the series. Does not delete the slice object.

Calls C++ function: bool QtCharts::QPieSeries::take(QtCharts::QPieSlice* slice).

C++ documentation:

Takes a single slice, specified by slice, from the series. Does not delete the slice object.

Note: The series remains the slice's parent object. You must set the parent object to take full ownership.

Returns true if the take operation was successful.

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

Calls C++ function: static QString QtCharts::QPieSeries::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::QPieSeries::trUtf8(const char* s, const char* c, int n).

pub unsafe fn type_(&self) -> SeriesType[src]

Reimplements: QAbstractSeries::type() const.

Calls C++ function: virtual QtCharts::QAbstractSeries::SeriesType QtCharts::QPieSeries::type() const.

C++ documentation:

Reimplements: QAbstractSeries::type() const.

Returns the type of the series.

pub unsafe fn vertical_position(&self) -> c_double[src]

This property holds the vertical position of the pie.

Calls C++ function: double QtCharts::QPieSeries::verticalPosition() const.

C++ documentation:

This property holds the vertical position of the pie.

The value is relative to the chart rectangle, so that:

  • 0.0 is the absolute top.
  • 1.0 is the absolute bottom.

The default value is 0.5 (center).

Access functions:

qreal verticalPosition() const
void setVerticalPosition(qreal relativePosition)

See also horizontalPosition.

Methods from Deref<Target = QAbstractSeries>

pub fn name_changed(&self) -> Signal<()>[src]

This signal is emitted when the series name changes.

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

C++ documentation:

This signal is emitted when the series name changes.

Note: Notifier signal for property name.

pub fn visible_changed(&self) -> Signal<()>[src]

This signal is emitted when the series visibility changes.

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

C++ documentation:

This signal is emitted when the series visibility changes.

Note: Notifier signal for property visible.

pub fn opacity_changed(&self) -> Signal<()>[src]

This signal is emitted when the opacity of the series changes.

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

C++ documentation:

This signal is emitted when the opacity of the series changes.

Note: Notifier signal for property opacity.

pub fn use_opengl_changed(&self) -> Signal<()>[src]

This signal is emitted when accelerating the drawing of the series by using OpenGL is enabled or disabled.

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

C++ documentation:

This signal is emitted when accelerating the drawing of the series by using OpenGL is enabled or disabled.

Note: Notifier signal for property useOpenGL.

pub unsafe fn attach_axis(
    &self,
    axis: impl CastInto<Ptr<QAbstractAxis>>
) -> bool
[src]

Attaches the axis specified by axis to the series.

Calls C++ function: bool QtCharts::QAbstractSeries::attachAxis(QtCharts::QAbstractAxis* axis).

C++ documentation:

Attaches the axis specified by axis to the series.

Returns true if the axis was attached successfully, false otherwise.

Note: If multiple axes of the same orientation are attached to the same series, they will have the same minimum and maximum values.

See also QChart::addAxis() and QChart::createDefaultAxes().

pub unsafe fn attached_axes(&self) -> CppBox<QListOfQAbstractAxis>[src]

Returns the list of axes attached to the series. Usually, an x-axis and a y-axis are attached to a series, except for QPieSeries, which does not have any axes attached.

Calls C++ function: QList<QtCharts::QAbstractAxis*> QtCharts::QAbstractSeries::attachedAxes().

C++ documentation:

Returns the list of axes attached to the series. Usually, an x-axis and a y-axis are attached to a series, except for QPieSeries, which does not have any axes attached.

See also attachAxis() and detachAxis().

pub unsafe fn chart(&self) -> QPtr<QChart>[src]

Returns the chart that the series belongs to.

Calls C++ function: QtCharts::QChart* QtCharts::QAbstractSeries::chart() const.

C++ documentation:

Returns the chart that the series belongs to.

Set automatically when the series is added to the chart, and unset when the series is removed from the chart.

pub unsafe fn detach_axis(
    &self,
    axis: impl CastInto<Ptr<QAbstractAxis>>
) -> bool
[src]

Detaches the axis specified by axis from the series.

Calls C++ function: bool QtCharts::QAbstractSeries::detachAxis(QtCharts::QAbstractAxis* axis).

C++ documentation:

Detaches the axis specified by axis from the series.

Returns true if the axis was detached successfully, false otherwise.

See also QChart::removeAxis().

pub unsafe fn hide(&self)[src]

Sets the visibility of the series to false.

Calls C++ function: void QtCharts::QAbstractSeries::hide().

C++ documentation:

Sets the visibility of the series to false.

See also setVisible() and isVisible().

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

This property holds whether the series is visible or not.

Calls C++ function: bool QtCharts::QAbstractSeries::isVisible() const.

C++ documentation:

This property holds whether the series is visible or not.

By default, true.

Access functions:

bool isVisible() const
void setVisible(bool visible = true)

Notifier signal:

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

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

pub unsafe fn name(&self) -> CppBox<QString>[src]

This property holds the name of the series.

Calls C++ function: QString QtCharts::QAbstractSeries::name() const.

C++ documentation:

This property holds the name of the series.

The name is displayed in the legend for the series and it supports HTML formatting.

Access functions:

QString name() const
void setName(const QString &name)

Notifier signal:

void nameChanged()

pub unsafe fn opacity(&self) -> c_double[src]

This property holds the opacity of the series.

Calls C++ function: double QtCharts::QAbstractSeries::opacity() const.

C++ documentation:

This property holds the opacity of the series.

By default, the opacity is 1.0. The valid values range from 0.0 (transparent) to 1.0 (opaque).

Access functions:

qreal opacity() const
void setOpacity(qreal opacity)

Notifier signal:

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::QAbstractSeries::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::QAbstractSeries::qt_metacast(const char* arg1).

pub unsafe fn set_name(&self, name: impl CastInto<Ref<QString>>)[src]

This property holds the name of the series.

Calls C++ function: void QtCharts::QAbstractSeries::setName(const QString& name).

C++ documentation:

This property holds the name of the series.

The name is displayed in the legend for the series and it supports HTML formatting.

Access functions:

QString name() const
void setName(const QString &name)

Notifier signal:

void nameChanged()

pub unsafe fn set_opacity(&self, opacity: c_double)[src]

This property holds the opacity of the series.

Calls C++ function: void QtCharts::QAbstractSeries::setOpacity(double opacity).

C++ documentation:

This property holds the opacity of the series.

By default, the opacity is 1.0. The valid values range from 0.0 (transparent) to 1.0 (opaque).

Access functions:

qreal opacity() const
void setOpacity(qreal opacity)

Notifier signal:

pub unsafe fn set_use_opengl_1a(&self, enable: bool)[src]

Specifies whether or not drawing the series is accelerated by using OpenGL.

Calls C++ function: void QtCharts::QAbstractSeries::setUseOpenGL(bool enable = …).

C++ documentation:

Specifies whether or not drawing the series is accelerated by using OpenGL.

Acceleration using OpenGL is supported only for QLineSeries and QScatterSeries. A line series used as an edge series for QAreaSeries cannot use OpenGL acceleration. When a chart contains any series that are drawn with OpenGL, a transparent QOpenGLWidget is created on top of the chart plot area. The accelerated series are not drawn on the underlying QGraphicsView, but are instead drawn on the created QOpenGLWidget.

Performance gained from using OpenGL to accelerate series drawing depends on the underlying hardware, but in most cases it is significant. For example, on a standard desktop computer, enabling OpenGL acceleration for a series typically allows rendering at least a hundred times more points without reduction on the frame rate. Chart size also has less effect on the frame rate.

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

  • Series animations are not supported for accelerated series.
  • Point labels are not supported for accelerated series.
  • Pen styles and marker shapes are ignored for accelerated series. Only solid lines and plain scatter dots are supported. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
  • Polar charts do not support accelerated series.
  • Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.

These additional restrictions stem from the fact that the accelerated series is drawn on a separate widget on top of the chart:

  • If you draw any graphics items on top of a chart containing an accelerated series, the accelerated series is drawn over those items.
  • To enable QOpenGLWidget to be partially transparent, it needs to be stacked on top of all other widgets. This means you cannot have other widgets partially covering the chart when using accelerated series.
  • Accelerated series are not supported for use cases where the graphics scene has more than one graphics view attached to it.
  • Accelerated series are not supported for use cases where the chart has non-default geometry. For example, adding transforms to the graphics view causes the accelerated series to be drawn in an incorrect position related to the chart.

The default value is false.

Access functions:

bool useOpenGL() const
void setUseOpenGL(bool enable = true)

Notifier signal:

pub unsafe fn set_use_opengl_0a(&self)[src]

Specifies whether or not drawing the series is accelerated by using OpenGL.

Calls C++ function: void QtCharts::QAbstractSeries::setUseOpenGL().

C++ documentation:

Specifies whether or not drawing the series is accelerated by using OpenGL.

Acceleration using OpenGL is supported only for QLineSeries and QScatterSeries. A line series used as an edge series for QAreaSeries cannot use OpenGL acceleration. When a chart contains any series that are drawn with OpenGL, a transparent QOpenGLWidget is created on top of the chart plot area. The accelerated series are not drawn on the underlying QGraphicsView, but are instead drawn on the created QOpenGLWidget.

Performance gained from using OpenGL to accelerate series drawing depends on the underlying hardware, but in most cases it is significant. For example, on a standard desktop computer, enabling OpenGL acceleration for a series typically allows rendering at least a hundred times more points without reduction on the frame rate. Chart size also has less effect on the frame rate.

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

  • Series animations are not supported for accelerated series.
  • Point labels are not supported for accelerated series.
  • Pen styles and marker shapes are ignored for accelerated series. Only solid lines and plain scatter dots are supported. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
  • Polar charts do not support accelerated series.
  • Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.

These additional restrictions stem from the fact that the accelerated series is drawn on a separate widget on top of the chart:

  • If you draw any graphics items on top of a chart containing an accelerated series, the accelerated series is drawn over those items.
  • To enable QOpenGLWidget to be partially transparent, it needs to be stacked on top of all other widgets. This means you cannot have other widgets partially covering the chart when using accelerated series.
  • Accelerated series are not supported for use cases where the graphics scene has more than one graphics view attached to it.
  • Accelerated series are not supported for use cases where the chart has non-default geometry. For example, adding transforms to the graphics view causes the accelerated series to be drawn in an incorrect position related to the chart.

The default value is false.

Access functions:

bool useOpenGL() const
void setUseOpenGL(bool enable = true)

Notifier signal:

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

This property holds whether the series is visible or not.

Calls C++ function: void QtCharts::QAbstractSeries::setVisible(bool visible = …).

C++ documentation:

This property holds whether the series is visible or not.

By default, true.

Access functions:

bool isVisible() const
void setVisible(bool visible = true)

Notifier signal:

pub unsafe fn set_visible_0a(&self)[src]

This property holds whether the series is visible or not.

Calls C++ function: void QtCharts::QAbstractSeries::setVisible().

C++ documentation:

This property holds whether the series is visible or not.

By default, true.

Access functions:

bool isVisible() const
void setVisible(bool visible = true)

Notifier signal:

pub unsafe fn show(&self)[src]

Sets the visibility of the series to true.

Calls C++ function: void QtCharts::QAbstractSeries::show().

C++ documentation:

Sets the visibility of the series to true.

See also setVisible() and isVisible().

pub unsafe fn type_(&self) -> SeriesType[src]

This property holds the type of the series.

Calls C++ function: pure virtual QtCharts::QAbstractSeries::SeriesType QtCharts::QAbstractSeries::type() const.

C++ documentation:

This property holds the type of the series.

Access functions:

virtual QAbstractSeries::SeriesType type() const = 0

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

Specifies whether or not drawing the series is accelerated by using OpenGL.

Calls C++ function: bool QtCharts::QAbstractSeries::useOpenGL() const.

C++ documentation:

Specifies whether or not drawing the series is accelerated by using OpenGL.

Acceleration using OpenGL is supported only for QLineSeries and QScatterSeries. A line series used as an edge series for QAreaSeries cannot use OpenGL acceleration. When a chart contains any series that are drawn with OpenGL, a transparent QOpenGLWidget is created on top of the chart plot area. The accelerated series are not drawn on the underlying QGraphicsView, but are instead drawn on the created QOpenGLWidget.

Performance gained from using OpenGL to accelerate series drawing depends on the underlying hardware, but in most cases it is significant. For example, on a standard desktop computer, enabling OpenGL acceleration for a series typically allows rendering at least a hundred times more points without reduction on the frame rate. Chart size also has less effect on the frame rate.

The OpenGL acceleration of series drawing is meant for use cases that need fast drawing of large numbers of points. It is optimized for efficiency, and therefore the series using it lack support for many features available to non-accelerated series:

  • Series animations are not supported for accelerated series.
  • Point labels are not supported for accelerated series.
  • Pen styles and marker shapes are ignored for accelerated series. Only solid lines and plain scatter dots are supported. The scatter dots may be circular or rectangular, depending on the underlying graphics hardware and drivers.
  • Polar charts do not support accelerated series.
  • Enabling chart drop shadow or using transparent chart background color is not recommended when using accelerated series, as that can slow the frame rate down significantly.

These additional restrictions stem from the fact that the accelerated series is drawn on a separate widget on top of the chart:

  • If you draw any graphics items on top of a chart containing an accelerated series, the accelerated series is drawn over those items.
  • To enable QOpenGLWidget to be partially transparent, it needs to be stacked on top of all other widgets. This means you cannot have other widgets partially covering the chart when using accelerated series.
  • Accelerated series are not supported for use cases where the graphics scene has more than one graphics view attached to it.
  • Accelerated series are not supported for use cases where the chart has non-default geometry. For example, adding transforms to the graphics view causes the accelerated series to be drawn in an incorrect position related to the chart.

The default value is false.

Access functions:

bool useOpenGL() const
void setUseOpenGL(bool enable = true)

Notifier signal:

Trait Implementations

impl CppDeletable for QPieSeries[src]

unsafe fn delete(&self)[src]

Removes the pie series and its slices.

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

C++ documentation:

Removes the pie series and its slices.

impl Deref for QPieSeries[src]

type Target = QAbstractSeries

The resulting type after dereferencing.

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

Calls C++ function: QtCharts::QAbstractSeries* static_cast<QtCharts::QAbstractSeries*>(QtCharts::QPieSeries* ptr).

impl DynamicCast<QPieSeries> for QAbstractSeries[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractSeries>) -> Ptr<QPieSeries>[src]

Calls C++ function: QtCharts::QPieSeries* dynamic_cast<QtCharts::QPieSeries*>(QtCharts::QAbstractSeries* ptr).

impl DynamicCast<QPieSeries> for QObject[src]

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

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

impl<'_> Shl<Ptr<QPieSlice>> for &'_ QPieSeries[src]

type Output = Ref<QPieSeries>

The resulting type after applying the << operator.

fn shl(self, slice: Ptr<QPieSlice>) -> Ref<QPieSeries>[src]

Appends the slice specified by slice to the series and returns a reference to the series. Slice ownership is passed to the series.

Calls C++ function: QtCharts::QPieSeries& QtCharts::QPieSeries::operator<<(QtCharts::QPieSlice* slice).

C++ documentation:

Appends the slice specified by slice to the series and returns a reference to the series. Slice ownership is passed to the series.

impl StaticDowncast<QPieSeries> for QAbstractSeries[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractSeries>) -> Ptr<QPieSeries>[src]

Calls C++ function: QtCharts::QPieSeries* static_cast<QtCharts::QPieSeries*>(QtCharts::QAbstractSeries* ptr).

impl StaticDowncast<QPieSeries> for QObject[src]

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

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

impl StaticUpcast<QAbstractSeries> for QPieSeries[src]

unsafe fn static_upcast(ptr: Ptr<QPieSeries>) -> Ptr<QAbstractSeries>[src]

Calls C++ function: QtCharts::QAbstractSeries* static_cast<QtCharts::QAbstractSeries*>(QtCharts::QPieSeries* ptr).

impl StaticUpcast<QObject> for QPieSeries[src]

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

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

Auto Trait Implementations

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.