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

QXYSeries Class

The QXYSeries class is a parent class for all x & y series classes.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QXYSeries Class

Detailed Description

In QXYSeries, data points are defined as a list of QPointF, defining X and Y positions.

See Also

Property Documentation

 

axisX : QAbstractAxis*

X-axis of the series.

The x-axis used for the series. This should be QValueAxis.

Access functions:

  • *axisX() const

  • void setAxisX( *axis)

Notifier signal:

  • void axisXChanged()

axisY : QAbstractAxis*

Y-axis of the series.

The y-axis used for the series. This should be QValueAxis.

Access functions:

  • *axisY() const

  • void setAxisY( *axis)

Notifier signal:

  • void axisYChanged()

color : QColor

This property holds the main color of the series. For QLineSeries this means the line color and for QScatterSeries the color of the point.

Access functions:

  • virtual color() const

  • virtual void setColor(const &newColor)

Notifier signal:

  • void colorChanged( color)

markerSize : qreal

This property holds the size of the point marker in pixels when using a default circle as a marker. When using pointMarker, the size is defined by the pointMarker conponent.

Access functions:

  • markerSize() const

  • void setMarkerSize( size)

Notifier signal:

  • void markerSizeChanged( size)

pointMarker : QQmlComponent*

This property holds a custom QML Component used as a marker for data points.

Access functions:

  • *pointMarker() const

  • void setPointMarker( *newPointMarker)

Notifier signal:

  • void pointMarkerChanged()

selectedColor : QColor

This property holds the main color of the selected series. For QLineSeries this means the line color and for QScatterSeries the color of the point.

Access functions:

  • selectedColor() const

  • void setSelectedColor(const &color)

Notifier signal:

  • void selectedColorChanged(const &color)

Member Function Documentation

 

void QXYSeries::append(qreal x, qreal y)

Appends a point with the coordinates x and y to the series.

void QXYSeries::append(const QPointF &point)

Appends a point with the coordinates point to the series.

void QXYSeries::append(const QList<QPointF> &points)

Appends points with the coordinates points to the series.

const QPointF &QXYSeries::at(int index) const

Returns the point at the position specified by index. Returns (0, 0) if the index is not valid.

void QXYSeries::clear()

Removes all points from the series.

int QXYSeries::count() const

Returns the number of data points in a series.

void QXYSeries::deselectAllPoints()

Deselects all points in the series.

See Also

See also setPointSelected()

void QXYSeries::deselectPoint(int index)

Deselects point at given index.

See Also

See also setPointSelected()

void QXYSeries::deselectPoints(const QList<int> &indexes)

Marks multiple points passed in a indexes list as deselected.

See Also

See also setPointSelected()

void QXYSeries::insert(int index, const QPointF &point)

Inserts a point with the coordinates point to the position specified by index in the series. If the index is 0 or less than 0, the point is prepended to the list of points. If the index is equal to or greater than than the number of points in the series, the point is appended to the list of points.

bool QXYSeries::isPointSelected(int index)

Returns true if point at given index is among selected points and false otherwise.

Selected points are drawn using the selected color if it was specified.

See Also

void QXYSeries::pointReplaced(int index)

This signal is emitted when a point is replaced at the position specified by index.

See Also

See also replace()

QList<QPointF> QXYSeries::points() const

Returns the points in the series.

void QXYSeries::remove(qreal x, qreal y)

Removes the point with the coordinates x and y from the series. Does nothing if the point does not exist.

void QXYSeries::remove(const QPointF &point)

Removes the point with the coordinates point from the series. Does nothing if the point does not exist.

void QXYSeries::remove(int index)

Removes the point at the position specified by index from the series.

void QXYSeries::removePoints(int index, int count)

Removes the number of points specified by count from the series starting at the position specified by index.

void QXYSeries::replace(qreal oldX, qreal oldY, qreal newX, qreal newY)

Replaces the point with the coordinates oldX and oldY with the point with the coordinates newX and newY. Does nothing if the old point does not exist.

void QXYSeries::replace(const QPointF &oldPoint, const QPointF &newPoint)

Replaces the point with the coordinates oldPoint with the point with the coordinates newPoint. Does nothing if the old point does not exist.

void QXYSeries::replace(int index, qreal newX, qreal newY)

Replaces the point at the position specified by index with the point that has the coordinates newX and newY.

void QXYSeries::replace(int index, const QPointF &newPoint)

Replaces the point at the position specified by index with the point that has the coordinates newPoint.

void QXYSeries::replace(const QList<QPointF> &points)

Replaces the current points with the points specified by points

This is much faster than replacing data points one by one, or first clearing all data, and then appending the new data. Emits pointReplaced when the points have been replaced.

void QXYSeries::selectAllPoints()

Marks all points in the series as selected,

See Also

See also setPointSelected()

void QXYSeries::selectPoint(int index)

Marks point at index as selected.

See Also

See also setPointSelected()

void QXYSeries::selectPoints(const QList<int> &indexes)

Marks multiple points passed in a indexes list as selected.

See Also

See also setPointSelected()

QList<int> QXYSeries::selectedPoints() const

Returns a list of points indexes marked as selected. Selected points are visible regardless of points visibility.

See Also

See also setPointSelected()

void QXYSeries::setPointSelected(int index, bool selected)

Marks point at given index as either selected or deselected as specified by selected.

Selected points are drawn using the selected color if it was specified. Emits QXYSeries::selectedPointsChanged

See Also

void QXYSeries::toggleSelection(const QList<int> &indexes)

Changes selection state of points at given indexes to the opposite one.

See Also

See also setPointSelected()

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