Namespace QAccelPlot::Internal¶
Namespace List > QAccelPlot > Internal
Namespaces¶
| Type | Name |
|---|---|
| namespace | InspectionScan Inspection queries that scan every record; used for small series that are not ordered along the queried axis. |
Classes¶
| Type | Name |
|---|---|
| class | CategoryList The categories list of a series: theCategory objects and a lookup table that follows their edits. |
| class | CategoryTable A snapshot of the categories of a series, looked up by value or name. |
| struct | DataTextureUploadTotals How many data textures were uploaded since the last reset, and how many bytes they held. |
| struct | GrabSize Sizes of one item grab. |
| struct | HeatmapGridDimension One dimension of a heatmap grid: count cells between the edgesfrom andto . |
| struct | HeatmapShaderMapping How heatmap.frag maps an item-local pixel position p to a fractional cell coordinate along one dimension. |
| class | HoverIndexBudget Decides when queried data is worth a hover index. |
| struct | InspectionBounds Inclusive data-space region; infinite limits leave a dimension unbounded. |
| class | InspectionCache Builds an InspectionIndex on a worker thread from a snapshot of a series' records. |
| struct | InspectionHit Nearest-data-point result: source index and pixel distance, or index -1. |
| class | InspectionIndex Immutable k-d tree over the valid data points of a series, with their order along each axis. |
| struct | InspectionMetric Pixel mapping of a series' plot area, used to measure on-screen distances. |
| struct | InspectionNeighbors Source indices of the valid data points on either side of an X value, or -1. |
| struct | InspectionSource Read-only view over the XY records a series exposes to inspection queries. |
| class | OutlinedRectangle Item that fills its bounds and outlines them inside its edges. |
| class | OverlayChildren Objects declared inside an inspection tool in QML. |
| class | PointerTracker Tracks the pointer over a plot from the plot's mouse and hover events. |
| struct | RectUbo Mirrors the std140 uniform block of rect.vert. |
| class | RectVertexCache Vertices of a series that draws each rectangle as a quad positioned from a data texture. |
| class | RectangleZoomOverlay |
| class | ScopedPaintedItemTextures Rasterizes the painted items under a root item at a capture scale until destroyed. |
| class | SelectionRectangle Draws the gesture or the selected region of a SelectionTool , clipped to the plot area. |
| class | SourceInspection Inspection queries that read a series' own buffer whose records are ordered along one axis. |
| struct | SummaryAccumulator Running data-point-weighted Y statistics that can be merged across disjoint data point sets. |
| struct | ValueRange Bounds of an axis viewport or a colormap value range. |
Public Types¶
| Type | Name |
|---|---|
| enum | InspectionAxis Data dimension a query measures along, or along which a series' records are ordered. |
| enum | InspectionMatching How PlotInspector andSelectionTool match a series' data points to a position. |
Public Attributes¶
| Type | Name |
|---|---|
| constexpr int | kDataTextureWidth = {8192}Number of floats stored per data texture row, one float per RGBA8 texel. |
Public Functions¶
| Type | Name |
|---|---|
| qreal | clampAntialiasingFeather (qreal feather) Returns feather clamped to the [0, 10] pixel range of the series' antialiasingFeather properties. |
| constexpr int | dataTextureHeight (const int floatCount) Returns the number of data texture rows needed to store floatCount floats. |
| constexpr qint64 | dataTextureItemCapacity (const int maxHeight, const int floatsPerItem) Returns how many items of floatsPerItem floats fit in a data texture at most__maxHeight rows tall. |
| DataTextureUploadTotals | dataTextureUploadTotals () Returns the totals since the last reset. Thread-safe. |
| double | distanceToInterval (double position, double a, double b) noexcept Returns the signed distance from position to the closed interval between__a and__b . |
| qreal | edgePixel (double value, const Axis & axis, qreal length) Maps rectangle edge value on__axis to item pixels along an item side__length pixels long. |
| GrabSize | grabSizeFor (const QSize & pixels, qreal devicePixelRatio) Returns the grab whose image is closest to pixels in a window at__devicePixelRatio . |
| bool | hoverEnabled () Returns whether series accept hover events: false only whenQACCELPLOT_HOVER_ENABLED is 0. |
| QByteArray | imageFormatForPath (const QString & path) Returns the lowercase QImageWriter format for__path's suffix, or an empty array when none can write it. |
| std::optional< QPointF > | linePathPoint (const CurveDataView & data, int pointCount, int index, int corner, StepMode mode, bool logScaleX, bool logScaleY) Returns path point corner of data point__index on the drawn line of__pointCount data points. |
| QString | localFilePath (const QString & pathOrUrl) Returns pathOrUrl as a local file path; a file: URL, as a QML file dialog returns, is converted. |
| int | maxTextureSize (QQuickWindow * window) Returns the largest texture width and height, in pixels, that window's GPU supports. |
| ValueRange | pannedRange (const ValueRange & range, qreal fraction, bool logarithmic) Returns range shifted by__fraction of its extent; a positive__fraction raises both bounds. |
| std::vector< GradientStopData > | readEffectStops (const Colormap * colormap, QObject * gradient) Returns the color stops of a gradient effect: the colormap ramp when set, otherwise the stops of the QML Gradient __gradient . |
| std::vector< GradientStopData > | readGradientStopList (const QVariantList & stopObjects) Reads a list of stop objects, each exposing position andcolor , into position order. |
| int | recordCapacity (QQuickWindow * window, int floatsPerRecord, int vertexBytesPerRecord) Returns how many records a series draws that reads them from the data texture by a float vertex id. |
| void | recordDataTextureUpload (std::int64_t bytes) Adds one upload of bytes to the totals. Thread-safe. |
| void | resetDataTextureUploadTotals () Sets the totals back to zero. Thread-safe. |
| void | resolveGradientValueRange (Payload & payload, const qreal dataMin, const qreal dataMax) Fills each unset gradient value bound of payload _from [_dataMin _,_dataMax ]. |
| void | setImageResolution (QImage & image, qreal dpi) Sets the resolution stored with image to__dpi dots per inch. |
| std::optional< QPointF > | stepCorner (const CurveDataView & data, int from, int to, int corner, StepMode mode, bool logScaleX, bool logScaleY) Returns corner corner of the step from data point__from to data point__to , in data space. |
| int | stepCornerCount (StepMode mode) noexcept Returns the number of line path points per data point for mode: the data point and the step corners after it. |
| bool | supportsCustomShaderRendering (const QQuickWindow * window) Returns true when__window renders through a hardware scene graph backend that runs custom shaders. |
| float | unboundedGradientCoordinate (const Qt::Orientation direction, const qreal value, const qreal minimum, const qreal maximum) Returns an unbounded palette coordinate for a data-space value . |
| void | uploadDataTexture (std::unique_ptr< QSGTexture > & texture, QQuickWindow * window, const QImage & image) Uploads an image to the live-data texture using the configured Qt API path. |
| qreal | wheelZoomFactor (qreal zoomScaleFactor, bool zoomingIn, qreal steps=1.0) Returns the extent multiplier for mouse-wheel zoom with a zoomScaleFactor in (0, 1). |
| std::pair< qreal, qreal > | widenedSpan (qreal a, qreal b, qreal minimumSize) Returns the pixel span between edges a and__b , widened around its center to at least__minimumSize . |
| QString | writeImageFile (const QImage & image, const QString & path, const QByteArray & format, int quality) Writes image to__path in__format and returns an error message, or an empty string on success. |
| void | writeRectUniforms (RectUbo & ubo, const QSGMaterialShader::RenderState & state, const RectMaterial & material) Fills ubo from__material and the matrix and opacity of the render__state . |
| ValueRange | zoomedRange (const ValueRange & range, qreal factor, qreal anchorRatio, bool logarithmic) Returns range with its extent multiplied by__factor , keeping the value at__anchorRatio in place. |
Public Types Documentation¶
enum InspectionAxis¶
Data dimension a query measures along, or along which a series' records are ordered.
enum InspectionMatching¶
How PlotInspector andSelectionTool match a series' data points to a position.
Public Attributes Documentation¶
variable kDataTextureWidth¶
Number of floats stored per data texture row, one float per RGBA8 texel.
data_texture.glsl reads the width from the bound texture, so this is the only definition.
Public Functions Documentation¶
function clampAntialiasingFeather¶
Returns feather clamped to the [0, 10] pixel range of the series'antialiasingFeather properties.
function dataTextureHeight¶
Returns the number of data texture rows needed to store floatCount floats.
function dataTextureItemCapacity¶
Returns how many items of floatsPerItem floats fit in a data texture at most__maxHeight rows tall.
constexpr qint64 QAccelPlot::Internal::dataTextureItemCapacity (
const int maxHeight,
const int floatsPerItem
)
function dataTextureUploadTotals¶
Returns the totals since the last reset. Thread-safe.
function distanceToInterval¶
Returns the signed distance from position to the closed interval between__a and__b .
function edgePixel¶
Maps rectangle edge value on__axis to item pixels along an item side__length pixels long.
Infinite edges, and non-positive edges on a log axis, map to infinity on the matching side, as rect_geometry.glsl extends them past the plot edge.
function grabSizeFor¶
Returns the grab whose image is closest to pixels in a window at__devicePixelRatio .
Qt 6.2 renders the target size in pixels. Later versions multiply it by the device pixel ratio and round, so some pixel counts cannot be rendered and the image can differ from pixels by a pixel; a tie picks the smaller image.
function hoverEnabled¶
Returns whether series accept hover events: false only whenQACCELPLOT_HOVER_ENABLED is 0.
function imageFormatForPath¶
Returns the lowercase QImageWriter format for__path's suffix, or an empty array when none can write it.
function linePathPoint¶
Returns path point corner of data point__index on the drawn line of__pointCount data points.
std::optional< QPointF > QAccelPlot::Internal::linePathPoint (
const CurveDataView & data,
int pointCount,
int index,
int corner,
StepMode mode,
bool logScaleX,
bool logScaleY
)
The last data point has no step after it, so its corners repeat it. Matches the vertices of the line shader.
function localFilePath¶
Returns pathOrUrl as a local file path; afile: URL, as a QML file dialog returns, is converted.
function maxTextureSize¶
Returns the largest texture width and height, in pixels, that window's GPU supports.
Falls back to 8192, supported by every target GPU, when the RHI cannot be queried (Qt older than 6.6, or a build without the private Qt API). QACCELPLOT_MAX_TEXTURE_SIZE lowers the result, for example to exercise capacity limits in tests.
function pannedRange¶
Returns range shifted by__fraction of its extent; a positive__fraction raises both bounds.
ValueRange QAccelPlot::Internal::pannedRange (
const ValueRange & range,
qreal fraction,
bool logarithmic
)
With logarithmic set, the shift is applied in log10 space, so both bounds are scaled by the same ratio. A range that is not positive is shifted linearly instead. Returns range unchanged when a bound would leave the range of a double.
function readEffectStops¶
Returns the color stops of a gradient effect: the colormap ramp when set, otherwise the stops of the QMLGradient __gradient .
std::vector< GradientStopData > QAccelPlot::Internal::readEffectStops (
const Colormap * colormap,
QObject * gradient
)
gradient stops are read from its stops list property, falling back to child objects, and normalized like readGradientStopList(). Returns an empty vector when both are null.
See also: GradientFill, GradientStroke
function readGradientStopList¶
Reads a list of stop objects, each exposing position andcolor , into position order.
std::vector< GradientStopData > QAccelPlot::Internal::readGradientStopList (
const QVariantList & stopObjects
)
A single stop is duplicated, and the first and last colors are extended to positions 0 and 1. Entries that are not stop-like are skipped.
See also: Colormap
function recordCapacity¶
Returns how many records a series draws that reads them from the data texture by a float vertex id.
int QAccelPlot::Internal::recordCapacity (
QQuickWindow * window,
int floatsPerRecord,
int vertexBytesPerRecord
)
A record takes floatsPerRecord floats of the data texture and vertexBytesPerRecord bytes of vertices. The count is limited by the texture size of window's GPU, by the 2^24 ids a float holds exactly, and by QSGGeometry, which sizes its vertex buffer in int bytes.
function recordDataTextureUpload¶
Adds one upload of bytes to the totals. Thread-safe.
function resetDataTextureUploadTotals¶
Sets the totals back to zero. Thread-safe.
function resolveGradientValueRange¶
Fills each unset gradient value bound of payload _from [_dataMin _,_dataMax ].
template<typename Payload>
void QAccelPlot::Internal::resolveGradientValueRange (
Payload & payload,
const qreal dataMin,
const qreal dataMax
)
Bounds resolve independently, so a Fixed bound is kept when the other bound uses DataRange.
function setImageResolution¶
Sets the resolution stored with image to__dpi dots per inch.
function stepCorner¶
Returns corner corner of the step from data point__from to data point__to , in data space.
std::optional< QPointF > QAccelPlot::Internal::stepCorner (
const CurveDataView & data,
int from,
int to,
int corner,
StepMode mode,
bool logScaleX,
bool logScaleY
)
Corner 0 is data point from. A step corner holds the Y of the data point whose flat step it ends or starts, and is drawn when that data point is valid and the X values placing the corner are usable. Returns std::nullopt for a corner that is not drawn. Matches the line shader.
function stepCornerCount¶
Returns the number of line path points per data point for mode: the data point and the step corners after it.
function supportsCustomShaderRendering¶
Returns true when__window renders through a hardware scene graph backend that runs custom shaders.
function unboundedGradientCoordinate¶
Returns an unbounded palette coordinate for a data-space value .
inline float QAccelPlot::Internal::unboundedGradientCoordinate (
const Qt::Orientation direction,
const qreal value,
const qreal minimum,
const qreal maximum
)
Coordinates outside [0, 1] are intentionally preserved for interpolation. Renderers must clamp only after interpolation, immediately before sampling the gradient, so values beyond the configured range retain endpoint colors.
function uploadDataTexture¶
Uploads an image to the live-data texture using the configured Qt API path.
void QAccelPlot::Internal::uploadDataTexture (
std::unique_ptr< QSGTexture > & texture,
QQuickWindow * window,
const QImage & image
)
function wheelZoomFactor¶
Returns the extent multiplier for mouse-wheel zoom with a zoomScaleFactor in (0, 1).
qreal QAccelPlot::Internal::wheelZoomFactor (
qreal zoomScaleFactor,
bool zoomingIn,
qreal steps=1.0
)
Zooming in multiplies the extent by the factor and zooming out by its reciprocal. A factor of 0 or below counts as 0.01 and a factor of 1 or above as 0.99, so a step always zooms and never collapses the range. Fractional step counts scale partial wheel notches proportionally.
function widenedSpan¶
Returns the pixel span between edges a and__b , widened around its center to at least__minimumSize .
Matches widenedSpan() in rect_geometry.glsl, so hit tests use the drawn size.
function writeImageFile¶
Writes image to__path in__format and returns an error message, or an empty string on success.
QString QAccelPlot::Internal::writeImageFile (
const QImage & image,
const QString & path,
const QByteArray & format,
int quality
)
quality is passed to QImageWriter::setQuality(). Formats without an alpha channel get the image composited over white. The file is replaced atomically, so a failed write leaves an existing file intact. Safe to call from a worker thread.
function writeRectUniforms¶
Fills ubo from__material and the matrix and opacity of the render__state .
void QAccelPlot::Internal::writeRectUniforms (
RectUbo & ubo,
const QSGMaterialShader::RenderState & state,
const RectMaterial & material
)
function zoomedRange¶
Returns range with its extent multiplied by__factor , keeping the value at__anchorRatio in place.
ValueRange QAccelPlot::Internal::zoomedRange (
const ValueRange & range,
qreal factor,
qreal anchorRatio,
bool logarithmic
)
anchorRatio is a position inside the range: 0 at min and 1 at max. With logarithmic set, the extent is measured in log10 space. A range that is not positive is zoomed linearly instead. Returns range unchanged when a bound would leave the range of a double: it would not be finite, or in log10 space it would reach zero.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/axis/internal/RangeGesture.hpp