IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAbstractSeries Class

The QAbstractSeries class is a base class for all Qt Graphs for 2D series.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAbstractSeries Class

Detailed Description

Usually, the series type specific inherited classes are used instead of the base class.

See Also

Member Type Documentation

 

enum QAbstractSeries::SeriesType

This enum describes the type of the series.

Constant

Value

Description

QAbstractSeries::SeriesTypeLine

0

A line chart.

QAbstractSeries::SeriesTypeBar

1

A vertical bar chart.

QAbstractSeries::SeriesTypeScatter

2

A scatter chart.

Property Documentation

 

hoverable : bool

Controls if the series is hoverable.

Controls if the series can be hovered with mouse/touch. By default, hoverable is set to false.

Access functions:

  • bool hoverable() const

  • void setHoverable(bool newHoverable)

Notifier signal:

name : QString

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:

  • name() const

  • void setName(const &name)

Notifier signal:

opacity : qreal

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:

  • opacity() const

  • void setOpacity( opacity)

Notifier signal:

selectable : bool

Controls if the series is selectable.

Controls if the series can be selected with mouse/touch. By default, selectable is set to false.

Access functions:

  • bool selectable() const

  • void setSelectable(bool selectable)

Notifier signal:

theme : QSeriesTheme*

This property holds the theme of the series.

The theme used for this series.

Access functions:

  • *theme() const

  • void setTheme( *newTheme)

Notifier signal:

[read-only] type : const SeriesType

This property holds the type of the series.

Access functions:

  • virtual type() const = 0

valuesMultiplier : qreal

Controls the series values effective visible value.

This variable can be used for animating the series values so they scale from 0 to actual value size. By default, the valuesMultiplier is 1.0. The valid values range from 0.0 (height 0) to 1.0 (full value).

Access functions:

  • valuesMultiplier() const

  • void setValuesMultiplier( valuesMultiplier)

Notifier signal:

visible : bool

Visibility of the series.

The visibility used for this series. By default, visible is set to true.

Access functions:

  • bool isVisible() const

  • void setVisible(bool visible = true)

Notifier signal:

Member Function Documentation

 

[virtual] QAbstractSeries::~QAbstractSeries()

Virtual destructor for the graph series.

bool QAbstractSeries::attachAxis(QAbstractAxis *axis)

Attaches the axis specified by axis to the series.

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

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

QList<QAbstractAxis *> QAbstractSeries::attachedAxes()

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

See also attachAxis(), detachAxis()

bool QAbstractSeries::detachAxis(QAbstractAxis *axis)

Detaches the axis specified by axis from the series.

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

QGraphsView *QAbstractSeries::graph() const

Returns the graph that the series belongs to.

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

void QAbstractSeries::hide()

Sets the visibility of the series to false.

See Also

See also setVisible(), isVisible()

void QAbstractSeries::hover(QString seriesName, QPointF position, QPointF value)

This signal is emitted when the series hovering changes. The name of the series is in seriesName, the mouse/touch position in position, and the series value in value.

This signal is only emitted when hoverable is set to true.

void QAbstractSeries::hoverEnter(QString seriesName, QPointF position, QPointF value)

This signal is emitted when the series hovering starts. The name of the series is in seriesName, the mouse/touch position in position, and the series value in value.

This signal is only emitted when hoverable is set to true.

void QAbstractSeries::hoverExit(QString seriesName, QPointF position)

This signal is emitted when the series hovering ends. The name of the series is in seriesName, and the mouse/touch position in position.

This signal is only emitted when hoverable is set to true.

void QAbstractSeries::hoverableChanged()

This signal is emitted when the series hoverable changes.

Notifier signal for property hoverable.

void QAbstractSeries::nameChanged()

This signal is emitted when the series name changes.

Notifier signal for property name.

void QAbstractSeries::opacityChanged()

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

Notifier signal for property opacity.

void QAbstractSeries::selectableChanged()

This signal is emitted when the series selectable changes.

Notifier signal for property selectable.

void QAbstractSeries::show()

Sets the visibility of the series to true.

See Also

See also setVisible(), isVisible()

void QAbstractSeries::themeChanged()

This signal is emitted when the series theme changes.

Notifier signal for property theme.

void QAbstractSeries::valuesMultiplierChanged()

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

Notifier signal for property valuesMultiplier.

void QAbstractSeries::visibleChanged()

This signal is emitted when the series visibility changes.

Notifier signal for property visible.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+