Skip to content

Class QAccelPlot::RectangleSeries

ClassList > QAccelPlot > RectangleSeries

A hardware-accelerated QML item that renders a large list of axis-aligned rectangles. More...

  • #include <RectangleSeries.hpp>

Inherits the following classes: QAccelPlot::PlotSeries

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1RectangleSeries["QAccelPlot::RectangleSeries"]

  classQAccelPlot_1_1PlotSeries["QAccelPlot::PlotSeries"]
  classQAccelPlot_1_1PlotSeries --> classQAccelPlot_1_1RectangleSeries
  click classQAccelPlot_1_1PlotSeries "../classQAccelPlot_1_1PlotSeries/" "Open QAccelPlot::PlotSeries"

  external_base_classQAccelPlot_1_1PlotSeries_1["QQuickItem"]
  external_base_classQAccelPlot_1_1PlotSeries_1 --> classQAccelPlot_1_1PlotSeries

Public Types inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
enum LegendSymbol
Supported default legend symbols.

Public Properties

Type Name
property Border * border
Outline inside each rectangle's edges, e.g. border.width: 1 . Default: black, width 0.
property QQmlListProperty< Category > categories
The rectangles' categories. Default: empty.
property QColor color
Fill color of rectangles without a category color. Default: Colors.dark.seriesPrimary with alpha 50.
property QColor hoverColor
Fill color of the rectangle under the cursor. Default: an invalid color, no highlight.
property int hoveredIndex
Read-only: index of the rectangle under the cursor, or -1 when none.
property qreal minimumHeight
Minimum drawn height in pixels, like minimumWidth . Default: 1.
property qreal minimumWidth
Minimum drawn width in pixels, so narrow rectangles stay visible when zoomed out. Default: 1.

Public Properties inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
property int count
Read-only: number of records stored, including invalid ones.
property quint64 dataRevision
Revision incremented by every accepted change of the series' records.
property bool hoverEnabled
Whether the series reacts to the mouse cursor. Default: true .
property bool hovered
Read-only: true while the mouse cursor is over the series.
property SeriesInspection * inspection
Read-only constant: data queries for this series.
property LegendSymbol legendSymbol
Symbol style requested from the default legend.
property QString name
Identifying name used by the default legend.
property QRectF plotRect
Plot area in parent-item coordinates, assigned by PlotView .
property Axis * xAxis
Horizontal axis used for data-to-pixel coordinate mapping.
property Axis * yAxis
Vertical axis used for data-to-pixel coordinate mapping.

Public Signals

Type Name
signal void categoriesChanged
Emitted when a category is added, removed, or edited.
signal void colorChanged
Emitted when the color property changes.
signal void hoverColorChanged
Emitted when the hoverColor property changes.
signal void hoveredIndexChanged
Emitted when the hovered rectangle index changes.
signal void minimumHeightChanged
Emitted when the minimumHeight property changes.
signal void minimumWidthChanged
Emitted when the minimumWidth property changes.

Public Signals inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
signal void countChanged
Emitted when the number of records changes.
signal void dataRevisionChanged
Emitted when the dataRevision property changes.
signal void hoverEnabledChanged
Emitted when the hoverEnabled property changes.
signal void hoveredChanged
Emitted when the hovered property changes.
signal void legendEntryChanged
Emitted when the result of legendEntry() orlegendEntries() changes.
signal void legendSymbolChanged
signal void nameChanged
signal void plotRectChanged
signal void xAxisChanged
signal void yAxisChanged

Public Functions

Type Name
RectangleSeries (QQuickItem * parent=nullptr)
Constructs a RectangleSeries with the given__parent .
Border * border () const
Returns the grouped outline settings. The object is owned by the series.
QQmlListProperty< Category > categories ()
Returns the categories as a QML list.
virtual Q_INVOKABLE void clearData () override
Removes all rectangles.
QColor color () const
Returns the rectangle fill color.
bool contains (const QPointF & point) override const
Returns true when a rectangle lies under item position__point .
QColor hoverColor () const
Returns the fill color of the hovered rectangle.
int hoveredIndex () const
Returns the index of the hovered rectangle, or -1 if none.
virtual QList< LegendEntry > legendEntries () override const
Returns one legend entry per category, or the legendEntry() when there are no categories.
virtual std::optional< LegendEntry > legendEntry () override const
Returns the legend entry: the symbol and color of the rectangles.
qreal minimumHeight () const
Returns the minimum drawn height in pixels.
qreal minimumWidth () const
Returns the minimum drawn width in pixels.
void postData (std::vector< double > && data, std::vector< int > && categories, int rectCount)
Thread-safe: queues setData _(_data _,_categories _,_rectCount ) to the item's thread.
void postData (std::vector< float > && data, std::vector< int > && categories, int rectCount)
Thread-safe: queues setDataF _(_data _,_categories _,_rectCount ) to the item's thread.
void postData (std::vector< double > && data, int count)
Queues a moved double buffer for assignment on the series' thread.
void postData (std::vector< float > && data, int count)
Queues a moved float buffer for assignment on the series' thread.
Q_INVOKABLE QVariantMap rectangleAt (int index) const
Returns rectangle index as an object withx1 ,y1 ,x2 ,y2 properties.
int rectangleIndexAt (const QPointF & position) const
Returns the index of the topmost rectangle under item position position , or -1.
void setCategories (const QList< Category * > & categories)
Replaces the categories with categories . The series does not take ownership.
void setColor (const QColor & color)
Sets the fill color to color .
Q_INVOKABLE void setData (const QVariantList & rects)
Loads rectangles from rects , a QML list of objects withx1 ,y1 ,x2 ,y2 properties.
void setData (std::vector< double > && data, std::vector< int > && categories, int rectCount)
Moves data and per-rectangle category values__categories (empty, or exactly__rectCount ) into the series.
void setData (const double * data, int count)
Replaces the series data with count data points copied from an interleaved double array.
void setData (std::vector< double > && data, int count)
Replaces the series data by moving an interleaved double buffer.
void setData (const double * data, int count, const DataBounds & bounds)
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setData (std::vector< double > && data, int count, const DataBounds & bounds)
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setDataF (std::vector< float > && data, std::vector< int > && categories, int rectCount)
Like setDataF _(_data _,_rectCount ) and also moves per-rectangle category values__categories (empty, or exactly__rectCount ) into the series.
void setDataF (const float * data, int count)
Replaces the series data with count data points copied from an interleaved float array.
void setDataF (std::vector< float > && data, int count)
Replaces the series data by moving an interleaved float buffer.
void setDataF (const float * data, int count, const DataBounds & bounds)
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setDataF (std::vector< float > && data, int count, const DataBounds & bounds)
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
Q_INVOKABLE void setDataPointCategories (const QVariantList & categories)
Sets one category per rectangle, each a category value orname .
void setHoverColor (const QColor & color)
Sets the fill color of the hovered rectangle to color . An invalid color disables the highlight.
void setMinimumHeight (qreal height)
Sets the minimum drawn height to height pixels. Negative values are clamped to 0.
void setMinimumWidth (qreal width)
Sets the minimum drawn width to width pixels. Negative values are clamped to 0.
~RectangleSeries () override
Destroys the rectangle series.

Public Functions inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
PlotSeries (QQuickItem * parent=nullptr)
virtual void clearData ()
Removes all data points from the series.
virtual int count () const
Returns the number of records stored. The default is the number of stored data points.
quint64 dataRevision () const
Returns the current data revision.
bool hoverEnabled () const
Returns whether the series reacts to the mouse cursor.
bool hovered () const
Returns whether the mouse cursor is over the series.
SeriesInspection * inspection () const
Returns the data queries for this series; created on first use and owned by the series.
virtual QList< LegendEntry > legendEntries () const
Returns the legend rows of the series. Default: the legendEntry() , if any.
virtual std::optional< LegendEntry > legendEntry () const
Returns how a legend draws the series, or std::nullopt for no legend entry. Default: no entry.
LegendSymbol legendSymbol () const
QString name () const
QRectF plotRect () const
void postData (std::vector< double > && data, int count)
Queues a moved double buffer for assignment on the series' thread.
void postData (std::vector< float > && data, int count)
Queues a moved float buffer for assignment on the series' thread.
void setData (const double * data, int count)
Replaces the series data with count data points copied from an interleaved double array.
void setData (std::vector< double > && data, int count)
Replaces the series data by moving an interleaved double buffer.
void setData (const double * data, int count, const DataBounds & bounds)
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setData (std::vector< double > && data, int count, const DataBounds & bounds)
Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setDataF (const float * data, int count)
Replaces the series data with count data points copied from an interleaved float array.
void setDataF (std::vector< float > && data, int count)
Replaces the series data by moving an interleaved float buffer.
void setDataF (const float * data, int count, const DataBounds & bounds)
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setDataF (std::vector< float > && data, int count, const DataBounds & bounds)
Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.
void setHoverEnabled (bool enabled)
Sets whether the series reacts to the mouse cursor to enabled .
void setLegendSymbol (LegendSymbol symbol)
void setName (const QString & name)
void setPlotRect (const QRectF & rect)
Updates the series geometry to exactly cover rect .
void setXAxis (Axis * axis)
void setYAxis (Axis * axis)
Axis * xAxis () const
std::optional< DataExtent > xDataRange () const
Returns the extent this series reports to its horizontal axis, or std::nullopt when it has none.
Axis * yAxis () const
std::optional< DataExtent > yDataRange () const
Returns the extent this series reports to its vertical axis, or std::nullopt when it has none.
~PlotSeries () override

Protected Types inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
enum CapacityOverflow
What a series draws when its records outgrow its GPU capacity.
enum DataChange
How the records changed in a data update.

Protected Attributes inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
bool overRenderCapacity_ = {false}
Whether the record count of the last updateRenderCapacity() exceededrenderCapacity_ .
int renderCapacity_ = {std::numeric\_limits&lt;int&gt;::max()}
Records the GPU buffers hold, as of the last updateRenderCapacity() ; the largestint before the first.

Protected Functions

Type Name
void hoverEnterEvent (QHoverEvent * event) override
void hoverLeaveEvent (QHoverEvent * event) override
void hoverMoveEvent (QHoverEvent * event) override
virtual InspectionRecord inspectionRecord (int index) override const
Returns the rectangle at index with its edges and category.
virtual InspectionRecord inspectionRecordAt (const QPointF & position) override const
Returns the rectangle drawn at the series-local position .
virtual void onAxisScaleChanged () override
Repaints with the coordinates mapped for the new scale.
virtual void onDataPointsChanged (DataChange change, int previousCount) override
Refreshes the vertices, the hover index, and the count after the rectangles changed.
virtual bool recordInspectionSupported () override const
Returns true: rectangles are inspected as records.
QSGNode * updatePaintNode (QSGNode * oldNode, UpdatePaintNodeData *) override

Protected Functions inherited from QAccelPlot::PlotSeries

See QAccelPlot::PlotSeries

Type Name
PlotSeries (DataPointStore::Layout layout, DataPointWording wording, QQuickItem * parent)
Creates a series whose data points have layout _;_wording names them in warnings.
void appendDataPoint (const double * coordinates)
Appends one double data point and widens the data ranges by its valid coordinates.
virtual void applyDataPoints (DataPointInput && input)
Applies data points passed to setData() orsetDataF() .
virtual DataRanges computeDataRanges () const
Scans the records for their extents. The default implementation scans the data points.
virtual int dataPointValueCount () const
Returns the number of values per data point that setData() andsetDataF() take.
DataPointStore & dataPoints ()
Returns the data points of the series.
const DataPointStore & dataPoints () const
Returns the data points of the series.
bool event (QEvent * event) override
Withholds hover events from a series beneath another series under the cursor.
void extendXDataRange (qreal x)
Widens the X extent to include x and notifies the bound axes.
void extendYDataRange (qreal y)
Widens the Y extent to include y . A non-finite__y leaves the extent unchanged.
virtual bool inspectionAvailable () const
Returns false while the records are ambiguous, such as during a data transition. Default: true.
void inspectionDataChanged (DataChange change=DataChange::Replaced)
Advances the data revision and refreshes the data queries. Call after every accepted record change.
virtual InspectionDataPoint inspectionDataPointAt (const QPointF & position) const
Returns the record drawn at the series-local position as a data point. Default: unsupported.
virtual InspectionRecord inspectionRecord (int index) const
Returns the native record at index for series that are not plain XY series. Default: unsupported.
virtual InspectionRecord inspectionRecordAt (const QPointF & position) const
Returns the native record drawn at the series-local position . Default: unsupported.
virtual Internal::InspectionSource inspectionSource () const
Returns a view of the XY records that data point queries search. The default has none.
void invalidateDataRanges ()
Discards the cached extents and notifies the bound axes.
void invalidateInspection ()
Refreshes the data queries after record validity changed without a data change, such as an axis scale switch.
bool logScaleX () const
Returns whether the horizontal axis is logarithmic; false without an axis.
bool logScaleY () const
Returns whether the vertical axis is logarithmic; false without an axis.
void notifyDataPointsChanged (DataChange change, int previousCount)
Finishes a change of the data points: data ranges, onDataPointsChanged() ,countChanged() , data queries, and a repaint.
virtual void onAxisRangeChanged ()
Called when the viewport of a bound axis changes. The default implementation schedules a repaint.
virtual void onAxisScaleChanged ()
Called when a bound axis switches between linear and logarithmic scale, or a different axis is bound.
virtual void onDataPointsChanged (DataChange change, int previousCount)
Called after the data points changed, before the data queries are refreshed. The default does nothing.
virtual bool positionInspectionSupported () const
Returns whether inspectionDataPointAt() matches records drawn as areas, such as heatmap cells. Default: false.
virtual bool recordInspectionSupported () const
Returns whether inspectionRecord() andinspectionRecordAt() answer for this series. Default: false.
QRectF resolvePlotRect () const
Returns the plot area to render into: plotRect when set, otherwise the item's current size.
void setHovered (bool hovered)
Sets the hovered property to hovered . Called by the hover handling of a series.
void storeDataPoints (DataPointInput && input)
Stores input as the data points and finishes the change.
void supportHover ()
Makes the series accept hover events while hoverEnabled istrue .
void updateRenderCapacity (int capacity, int recordCount, CapacityOverflow overflow=CapacityOverflow::DropsExcess)
Stores capacity , the number of records the GPU buffers hold, and warns when__recordCount newly exceeds it.
bool validateDataSize (std::size_t valueCount, int count, bool floatData, int valuesPerDataPoint=0) const
Returns whether valueCount values hold__count data points; warns otherwise.
bool validateRawDataArguments (const void * data, int count) const
Returns whether data and__count are valid arguments for copying data points; warns otherwise.

Detailed Description

Rectangles are stored as interleaved (x1, y1, x2, y2) values and uploaded to the GPU as a float data texture, making it suitable for millions of rectangles. The setData() overloads keep doubles and upload them relative to an origin near the data, so large coordinates such as epoch timestamps stay precise. The setDataF() overloads store floats and upload them without conversion. Hover detection uses an internal SpatialGrid; rectangles spanning more than 64 grid cells are tested linearly.

An infinite edge extends the rectangle to the plot edge, e.g. y1 = -Infinity and y2 = +Infinity for a full-height span. Infinite edges don't affect the axes' data ranges. Rectangles with a NaN edge are not drawn or hovered.

Each rectangle can carry a category. List the categories in categories as Category objects, each with a value and an optional name and color:

QAccelPlot.RectangleSeries {
    categories: [
        QAccelPlot.Category { value: 0; name: "Running"; color: "seagreen" },
        QAccelPlot.Category { value: 1; name: "Alarm"; color: "firebrick" }
    ]
    Component.onCompleted: setData([{ x1: 0, x2: 40, category: "Running" }])
}

A rectangle is filled with the color of the category whose value equals its category. Rectangles without a category, or whose category has no color or is not listed, use color. The legend shows one row per category.

Set antialiasing to smooth edges that fall between pixels. It is off by default because rectangles that touch then show faint seams.

** **

Up to 16,777,216 (2^24) rectangles are drawn correctly. The shader indexes rectangles in single precision, and at that count the data texture reaches 8192 rows, the size every GPU supports.

See also: LineCurve, Axis

Public Properties Documentation

property border

Outline inside each rectangle's edges, e.g. border.width: 1 . Default: black, width 0.

Border* QAccelPlot::RectangleSeries::border;

On rectangles too small for two outlines, the outline narrows so at least 1 px of fill stays visible.


property categories

The rectangles' categories. Default: empty.

QQmlListProperty<Category> QAccelPlot::RectangleSeries::categories;

The first of categories that share a value or a name wins, and the others log a warning. Edits to a listed Category apply at once.


property color

Fill color of rectangles without a category color. Default: Colors.dark.seriesPrimary with alpha 50.

QColor QAccelPlot::RectangleSeries::color;


property hoverColor

Fill color of the rectangle under the cursor. Default: an invalid color, no highlight.

QColor QAccelPlot::RectangleSeries::hoverColor;


property hoveredIndex

Read-only: index of the rectangle under the cursor, or -1 when none.

int QAccelPlot::RectangleSeries::hoveredIndex;


property minimumHeight

Minimum drawn height in pixels, like minimumWidth . Default: 1.

qreal QAccelPlot::RectangleSeries::minimumHeight;


property minimumWidth

Minimum drawn width in pixels, so narrow rectangles stay visible when zoomed out. Default: 1.

qreal QAccelPlot::RectangleSeries::minimumWidth;

Narrower rectangles are widened around their center. Hover uses the widened size. Clamped to at least 0.


Public Signals Documentation

signal categoriesChanged

Emitted when a category is added, removed, or edited.

void QAccelPlot::RectangleSeries::categoriesChanged;


signal colorChanged

Emitted when the color property changes.

void QAccelPlot::RectangleSeries::colorChanged;


signal hoverColorChanged

Emitted when the hoverColor property changes.

void QAccelPlot::RectangleSeries::hoverColorChanged;


signal hoveredIndexChanged

Emitted when the hovered rectangle index changes.

void QAccelPlot::RectangleSeries::hoveredIndexChanged;


signal minimumHeightChanged

Emitted when the minimumHeight property changes.

void QAccelPlot::RectangleSeries::minimumHeightChanged;


signal minimumWidthChanged

Emitted when the minimumWidth property changes.

void QAccelPlot::RectangleSeries::minimumWidthChanged;


Public Functions Documentation

function RectangleSeries

Constructs a RectangleSeries with the given__parent .

explicit QAccelPlot::RectangleSeries::RectangleSeries (
    QQuickItem * parent=nullptr
) 


function border

Returns the grouped outline settings. The object is owned by the series.

Border * QAccelPlot::RectangleSeries::border () const


function categories

Returns the categories as a QML list.

QQmlListProperty< Category > QAccelPlot::RectangleSeries::categories () 


function clearData

Removes all rectangles.

virtual Q_INVOKABLE void QAccelPlot::RectangleSeries::clearData () override

Implements QAccelPlot::PlotSeries::clearData


function color

Returns the rectangle fill color.

QColor QAccelPlot::RectangleSeries::color () const


function contains

Returns true when a rectangle lies under item position__point .

bool QAccelPlot::RectangleSeries::contains (
    const QPointF & point
) override const

Hover delivery uses this test, so stacked series underneath still receive hover events outside this series rectangles.


function hoverColor

Returns the fill color of the hovered rectangle.

QColor QAccelPlot::RectangleSeries::hoverColor () const


function hoveredIndex

Returns the index of the hovered rectangle, or -1 if none.

int QAccelPlot::RectangleSeries::hoveredIndex () const


function legendEntries

Returns one legend entry per category, or the legendEntry() when there are no categories.

virtual QList< LegendEntry > QAccelPlot::RectangleSeries::legendEntries () override const

Implements QAccelPlot::PlotSeries::legendEntries


function legendEntry

Returns the legend entry: the symbol and color of the rectangles.

virtual std::optional< LegendEntry > QAccelPlot::RectangleSeries::legendEntry () override const

Implements QAccelPlot::PlotSeries::legendEntry


function minimumHeight

Returns the minimum drawn height in pixels.

qreal QAccelPlot::RectangleSeries::minimumHeight () const


function minimumWidth

Returns the minimum drawn width in pixels.

qreal QAccelPlot::RectangleSeries::minimumWidth () const


function postData

Thread-safe: queues setData _(_data _,_categories _,_rectCount ) to the item's thread.

void QAccelPlot::RectangleSeries::postData (
    std::vector< double > && data,
    std::vector< int > && categories,
    int rectCount
) 


function postData

Thread-safe: queues setDataF _(_data _,_categories _,_rectCount ) to the item's thread.

void QAccelPlot::RectangleSeries::postData (
    std::vector< float > && data,
    std::vector< int > && categories,
    int rectCount
) 


function postData

Queues a moved double buffer for assignment on the series' thread.

void QAccelPlot::RectangleSeries::postData (
    std::vector< double > && data,
    int count
) 


function postData

Queues a moved float buffer for assignment on the series' thread.

void QAccelPlot::RectangleSeries::postData (
    std::vector< float > && data,
    int count
) 


function rectangleAt

Returns rectangle index as an object withx1 ,y1 ,x2 ,y2 properties.

Q_INVOKABLE QVariantMap QAccelPlot::RectangleSeries::rectangleAt (
    int index
) const

Includes category when the rectangles have categories, and categoryName when that category has a name. Returns an empty object when index is out of range.


function rectangleIndexAt

Returns the index of the topmost rectangle under item position position , or -1.

int QAccelPlot::RectangleSeries::rectangleIndexAt (
    const QPointF & position
) const


function setCategories

Replaces the categories with categories . The series does not take ownership.

void QAccelPlot::RectangleSeries::setCategories (
    const QList< Category * > & categories
) 


function setColor

Sets the fill color to color .

void QAccelPlot::RectangleSeries::setColor (
    const QColor & color
) 


function setData

Loads rectangles from rects , a QML list of objects withx1 ,y1 ,x2 ,y2 properties.

Q_INVOKABLE void QAccelPlot::RectangleSeries::setData (
    const QVariantList & rects
) 

A missing or null x1 / y1 is -Infinity and a missing x2 / y2 is +Infinity, so { x1: 8, x2: 12 } is a full-height span. An optional category is a category value or name; names resolve against categories now. Any other category is ignored with a warning.


function setData

Moves data and per-rectangle category values__categories (empty, or exactly__rectCount ) into the series.

void QAccelPlot::RectangleSeries::setData (
    std::vector< double > && data,
    std::vector< int > && categories,
    int rectCount
) 


function setData

Replaces the series data with count data points copied from an interleaved double array.

void QAccelPlot::RectangleSeries::setData (
    const double * data,
    int count
) 

See the class description for the data point layout of each series.


function setData

Replaces the series data by moving an interleaved double buffer.

void QAccelPlot::RectangleSeries::setData (
    std::vector< double > && data,
    int count
) 


function setData

Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.

void QAccelPlot::RectangleSeries::setData (
    const double * data,
    int count,
    const DataBounds & bounds
) 


function setData

Like setData _(_data _,_count ), with the data extents given as__bounds instead of scanned for.

void QAccelPlot::RectangleSeries::setData (
    std::vector< double > && data,
    int count,
    const DataBounds & bounds
) 


function setDataF

Like setDataF _(_data _,_rectCount ) and also moves per-rectangle category values__categories (empty, or exactly__rectCount ) into the series.

void QAccelPlot::RectangleSeries::setDataF (
    std::vector< float > && data,
    std::vector< int > && categories,
    int rectCount
) 


function setDataF

Replaces the series data with count data points copied from an interleaved float array.

void QAccelPlot::RectangleSeries::setDataF (
    const float * data,
    int count
) 


function setDataF

Replaces the series data by moving an interleaved float buffer.

void QAccelPlot::RectangleSeries::setDataF (
    std::vector< float > && data,
    int count
) 


function setDataF

Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.

void QAccelPlot::RectangleSeries::setDataF (
    const float * data,
    int count,
    const DataBounds & bounds
) 


function setDataF

Like setDataF _(_data _,_count ), with the data extents given as__bounds instead of scanned for.

void QAccelPlot::RectangleSeries::setDataF (
    std::vector< float > && data,
    int count,
    const DataBounds & bounds
) 


function setDataPointCategories

Sets one category per rectangle, each a category value orname .

Q_INVOKABLE void QAccelPlot::RectangleSeries::setDataPointCategories (
    const QVariantList & categories
) 

An empty list clears them; any other size must equal count. Other values leave their rectangle without a category and log a warning.


function setHoverColor

Sets the fill color of the hovered rectangle to color . An invalid color disables the highlight.

void QAccelPlot::RectangleSeries::setHoverColor (
    const QColor & color
) 


function setMinimumHeight

Sets the minimum drawn height to height pixels. Negative values are clamped to 0.

void QAccelPlot::RectangleSeries::setMinimumHeight (
    qreal height
) 


function setMinimumWidth

Sets the minimum drawn width to width pixels. Negative values are clamped to 0.

void QAccelPlot::RectangleSeries::setMinimumWidth (
    qreal width
) 


function ~RectangleSeries

Destroys the rectangle series.

QAccelPlot::RectangleSeries::~RectangleSeries () override


Protected Functions Documentation

function hoverEnterEvent

void QAccelPlot::RectangleSeries::hoverEnterEvent (
    QHoverEvent * event
) override

function hoverLeaveEvent

void QAccelPlot::RectangleSeries::hoverLeaveEvent (
    QHoverEvent * event
) override

function hoverMoveEvent

void QAccelPlot::RectangleSeries::hoverMoveEvent (
    QHoverEvent * event
) override

function inspectionRecord

Returns the rectangle at index with its edges and category.

virtual InspectionRecord QAccelPlot::RectangleSeries::inspectionRecord (
    int index
) override const

Implements QAccelPlot::PlotSeries::inspectionRecord


function inspectionRecordAt

Returns the rectangle drawn at the series-local position .

virtual InspectionRecord QAccelPlot::RectangleSeries::inspectionRecordAt (
    const QPointF & position
) override const

Implements QAccelPlot::PlotSeries::inspectionRecordAt


function onAxisScaleChanged

Repaints with the coordinates mapped for the new scale.

virtual void QAccelPlot::RectangleSeries::onAxisScaleChanged () override

Implements QAccelPlot::PlotSeries::onAxisScaleChanged


function onDataPointsChanged

Refreshes the vertices, the hover index, and the count after the rectangles changed.

virtual void QAccelPlot::RectangleSeries::onDataPointsChanged (
    DataChange change,
    int previousCount
) override

Implements QAccelPlot::PlotSeries::onDataPointsChanged


function recordInspectionSupported

Returns true: rectangles are inspected as records.

virtual bool QAccelPlot::RectangleSeries::recordInspectionSupported () override const

Implements QAccelPlot::PlotSeries::recordInspectionSupported


function updatePaintNode

QSGNode * QAccelPlot::RectangleSeries::updatePaintNode (
    QSGNode * oldNode,
    UpdatePaintNodeData *
) override


The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/RectangleSeries.hpp