Class QAccelPlot::SeriesInspection¶
ClassList > QAccelPlot > SeriesInspection
Data queries for one series: nearest data points, brackets, region statistics, and index pages. More...
#include <SeriesInspection.hpp>
Inherits the following classes: QObject
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1SeriesInspection["QAccelPlot::SeriesInspection"]
external_base_classQAccelPlot_1_1SeriesInspection_1["QObject"]
external_base_classQAccelPlot_1_1SeriesInspection_1 --> classQAccelPlot_1_1SeriesInspection
Public Properties¶
| Type | Name |
|---|---|
| property QML_ANONYMOUSInspectionNS::Status | status Readiness for data point queries: Ready ,Idle ,Preparing ,Unsupported , orUnavailable . |
Public Signals¶
| Type | Name |
|---|---|
| signal void | statusChanged Emitted when the readiness may have changed: after a data change, and when an index is ready. |
Public Functions¶
| Type | Name |
|---|---|
| Q_INVOKABLE InspectionBracket | bracketByX (qreal pixelX) Returns the valid data points on either side of pixelX and the point between them. |
| Q_INVOKABLE InspectionBracket | bracketByY (qreal pixelY) Returns the valid data points whose Y is on either side of pixelY and the point between them. |
| Q_INVOKABLE InspectionDataPoint | dataPointAt (int index) const Returns the record at index ; NoMatch with its raw coordinates when the record is invalid. |
| Q_INVOKABLE InspectionDataPoint | dataPointAtPosition (const QPointF & position) const Returns the record drawn at the series-local position as a data point, such as the heatmap cell under it. |
| Q_INVOKABLE quint64 | indexBytes () const Returns the bytes held by query caches and indexes, excluding the series' own data. |
| Q_INVOKABLE InspectionPage | indices (qreal xMin, qreal xMax, qreal yMin, qreal yMax, int offset=0, int limit=4096, quint64 expectedRevision=0) Returns up to limit source indices inside the region, skipping the first__offset matches. |
| Q_INVOKABLE InspectionDataPoint | nearest (const QPointF & position, qreal radius=10) Returns the valid data point nearest to position within__radius pixels on screen. |
| Q_INVOKABLE InspectionDataPoint | nearestByX (qreal pixelX, qreal radius=std::numeric_limits< qreal >::infinity()) Returns the valid data point nearest to pixelX horizontally, within__radius pixels. |
| Q_INVOKABLE InspectionDataPoint | nearestByY (qreal pixelY, qreal radius=std::numeric_limits< qreal >::infinity()) Returns the valid data point nearest to pixelY vertically, within__radius pixels. |
| Q_INVOKABLE void | prepare () Starts building a query index when the series needs one; otherwise does nothing. |
| Q_INVOKABLE InspectionRecord | recordAt (int index) const Returns the native record at index of a bar, rectangle, or band series. |
| Q_INVOKABLE InspectionRecord | recordAtPosition (const QPointF & position) const Returns the native record drawn at the series-local position . |
| InspectionStatus | status () const Returns the readiness for data point queries. |
| Q_INVOKABLE InspectionSummary | summarize (qreal xMin, qreal xMax, qreal yMin, qreal yMax) Returns Y statistics of the valid data points inside the region. |
| Q_INVOKABLE InspectionSummary | summarizeRange (qreal xMin, qreal xMax) Returns Y statistics of the valid data points whose X lies in the interval. |
| ~SeriesInspection () override |
Detailed Description¶
Available as PlotSeries::inspection. Call it on the series' thread. Pixel arguments are series-local logical pixels; regions are inclusive data-space limits, where an infinite limit leaves that side unbounded and reversed limits are swapped.
Queries cover every stored data point, also outside the viewport, and match data points rather than the line segments between them. Invalid data points never match, and equal distances resolve to the highest index. Statistics are data-point-weighted and use the original Y values.
LineCurve and PointCloud answer every query. Series whose X or Y values are finite and non-decreasing are searched in place, need no preparation, and stay queryable while records are appended; queries along one axis, such as nearestByX(), need that order along their own axis. Other series of up to 20,000 records are scanned per query. Larger ones are indexed on a worker thread first; until then queries return Inspection.Preparing. Requesting an index copies the series' buffer once on the calling thread, the index takes about 40 MB per million valid data points, and any data change discards it. Other series types expose native records through recordAt() and recordAtPosition() only; HeatmapSeries also answers dataPointAtPosition().
See also: PlotInspector, SelectionTool
Public Properties Documentation¶
property status¶
Readiness for data point queries: Ready ,Idle ,Preparing ,Unsupported , orUnavailable .
Bar, rectangle, band, and heatmap series are Ready while available; the queries that do not apply to them return Unsupported. Unsupported only for a series that answers no query.
Public Signals Documentation¶
signal statusChanged¶
Emitted when the readiness may have changed: after a data change, and when an index is ready.
Public Functions Documentation¶
function bracketByX¶
Returns the valid data points on either side of pixelX and the point between them.
function bracketByY¶
Returns the valid data points whose Y is on either side of pixelY and the point between them.
function dataPointAt¶
Returns the record at index ;NoMatch with its raw coordinates when the record is invalid.
function dataPointAtPosition¶
Returns the record drawn at the series-local position as a data point, such as the heatmap cell under it.
Q_INVOKABLE InspectionDataPoint QAccelPlot::SeriesInspection::dataPointAtPosition (
const QPointF & position
) const
Unsupported for series that do not draw data points as areas. The data and pixel coordinates of a match are the record's center, and distance is measured from position to it.
function indexBytes¶
Returns the bytes held by query caches and indexes, excluding the series' own data.
function indices¶
Returns up to limit source indices inside the region, skipping the first__offset matches.
Q_INVOKABLE InspectionPage QAccelPlot::SeriesInspection::indices (
qreal xMin,
qreal xMax,
qreal yMin,
qreal yMax,
int offset=0,
int limit=4096,
quint64 expectedRevision=0
)
limit must be positive and is capped at 4096, the default; the page's limit reports the size used. Request the next page with offset advanced by the length of indices while hasMore is true.
A nonzero expectedRevision that differs from the series' dataRevision returns Stale, so pages of one traversal never mix indices of different data.
function nearest¶
Returns the valid data point nearest to position within__radius pixels on screen.
Q_INVOKABLE InspectionDataPoint QAccelPlot::SeriesInspection::nearest (
const QPointF & position,
qreal radius=10
)
function nearestByX¶
Returns the valid data point nearest to pixelX horizontally, within__radius pixels.
Q_INVOKABLE InspectionDataPoint QAccelPlot::SeriesInspection::nearestByX (
qreal pixelX,
qreal radius=std::numeric_limits< qreal >::infinity()
)
function nearestByY¶
Returns the valid data point nearest to pixelY vertically, within__radius pixels.
Q_INVOKABLE InspectionDataPoint QAccelPlot::SeriesInspection::nearestByY (
qreal pixelY,
qreal radius=std::numeric_limits< qreal >::infinity()
)
function prepare¶
Starts building a query index when the series needs one; otherwise does nothing.
function recordAt¶
Returns the native record at index of a bar, rectangle, or band series.
function recordAtPosition¶
Returns the native record drawn at the series-local position .
Q_INVOKABLE InspectionRecord QAccelPlot::SeriesInspection::recordAtPosition (
const QPointF & position
) const
function status¶
Returns the readiness for data point queries.
function summarize¶
Returns Y statistics of the valid data points inside the region.
Q_INVOKABLE InspectionSummary QAccelPlot::SeriesInspection::summarize (
qreal xMin,
qreal xMax,
qreal yMin,
qreal yMax
)
function summarizeRange¶
Returns Y statistics of the valid data points whose X lies in the interval.
Q_INVOKABLE InspectionSummary QAccelPlot::SeriesInspection::summarizeRange (
qreal xMin,
qreal xMax
)
function ~SeriesInspection¶
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/inspection/SeriesInspection.hpp