Class QAccelPlot::ColormappedSeries¶
ClassList > QAccelPlot > ColormappedSeries
Base class for series that color their data points by value through a Colormap .More...
#include <ColormappedSeries.hpp>
Inherits the following classes: QAccelPlot::PlotSeries
Inherited by the following classes: QAccelPlot::BarSeries, QAccelPlot::HeatmapSeries, QAccelPlot::PointCloud
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1ColormappedSeries["QAccelPlot::ColormappedSeries"]
classQAccelPlot_1_1PlotSeries["QAccelPlot::PlotSeries"]
classQAccelPlot_1_1PlotSeries --> classQAccelPlot_1_1ColormappedSeries
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
classQAccelPlot_1_1BarSeries["QAccelPlot::BarSeries"]
classQAccelPlot_1_1ColormappedSeries --> classQAccelPlot_1_1BarSeries
click classQAccelPlot_1_1BarSeries "../classQAccelPlot_1_1BarSeries/" "Open QAccelPlot::BarSeries"
classQAccelPlot_1_1HeatmapSeries["QAccelPlot::HeatmapSeries"]
classQAccelPlot_1_1ColormappedSeries --> classQAccelPlot_1_1HeatmapSeries
click classQAccelPlot_1_1HeatmapSeries "../classQAccelPlot_1_1HeatmapSeries/" "Open QAccelPlot::HeatmapSeries"
classQAccelPlot_1_1PointCloud["QAccelPlot::PointCloud"]
classQAccelPlot_1_1ColormappedSeries --> classQAccelPlot_1_1PointCloud
click classQAccelPlot_1_1PointCloud "../classQAccelPlot_1_1PointCloud/" "Open QAccelPlot::PointCloud"
Public Types inherited from QAccelPlot::PlotSeries¶
| Type | Name |
|---|---|
| enum | LegendSymbol Supported default legend symbols. |
Public Properties¶
| Type | Name |
|---|---|
| property Colormap * | colormap Maps values to colors. What a series draws without one is described by the series. |
| property qreal | dataValueMax Read-only: upper bound of the value range, taken from Colormap::max when it is set and from the data otherwise. |
| property qreal | dataValueMin Read-only: lower bound of the value range, taken from Colormap::min when it is set and from the data otherwise.ColorBar labels its ticks from this anddataValueMax . |
Public Properties inherited from 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 | colormapChanged Emitted when the colormap property changes. |
| signal void | valueRangeChanged Emitted when dataValueMin ordataValueMax changes. |
Public Signals inherited from 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 |
|---|---|
| Colormap * | colormap () const Returns the colormap, or nullptr when none is assigned. |
| qreal | dataValueMax () const Returns the resolved upper bound of the value range. |
| qreal | dataValueMin () const Returns the resolved lower bound of the value range. |
| void | setColormap (Colormap * colormap) Sets the colormap to colormap . |
Public Functions inherited from 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¶
| 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¶
| Type | Name |
|---|---|
| bool | overRenderCapacity_ = {false}Whether the record count of the last updateRenderCapacity() exceededrenderCapacity_ . |
| int | renderCapacity_ = {std::numeric\_limits<int>::max()}Records the GPU buffers hold, as of the last updateRenderCapacity() ; the largestint before the first. |
Protected Functions¶
| Type | Name |
|---|---|
| ColormappedSeries (DataPointStore::Layout layout, DataPointWording wording, QQuickItem * parent) Creates a series whose data points have layout _;_wording names them in warnings. |
|
| const std::vector< GradientStopData > & | colorStops () const Returns the ramp stops of the colormap, empty without one. |
| virtual std::optional< ValueSpan > | scanValueRange () const Returns the span of the finite values, or std::nullopt when there is none. Default: none. |
| void | updateValueRange () Resolves the value range again. Call after every change of the values. |
Protected Functions inherited from 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¶
Owns the colormap assignment and resolves the value range it maps: Colormap::min and Colormap::max where they are set, and the smallest and largest finite value of the series otherwise. ColorBar shows the colormap and the resolved range of any such series.
See also: PointCloud, HeatmapSeries, BarSeries, ColorBar, Colormap
Public Properties Documentation¶
property colormap¶
Maps values to colors. What a series draws without one is described by the series.
property dataValueMax¶
Read-only: upper bound of the value range, taken from Colormap::max when it is set and from the data otherwise.
property dataValueMin¶
Read-only: lower bound of the value range, taken from Colormap::min when it is set and from the data otherwise.ColorBar labels its ticks from this anddataValueMax .
Public Signals Documentation¶
signal colormapChanged¶
Emitted when the colormap property changes.
signal valueRangeChanged¶
Emitted when dataValueMin ordataValueMax changes.
Public Functions Documentation¶
function colormap¶
Returns the colormap, or nullptr when none is assigned.
function dataValueMax¶
Returns the resolved upper bound of the value range.
function dataValueMin¶
Returns the resolved lower bound of the value range.
function setColormap¶
Sets the colormap to colormap .
Protected Functions Documentation¶
function ColormappedSeries¶
Creates a series whose data points have layout _;_wording names them in warnings.
QAccelPlot::ColormappedSeries::ColormappedSeries (
DataPointStore::Layout layout,
DataPointWording wording,
QQuickItem * parent
)
function colorStops¶
Returns the ramp stops of the colormap, empty without one.
function scanValueRange¶
Returns the span of the finite values, or std::nullopt when there is none. Default: none.
Called by updateValueRange() only when the colormap leaves a bound unset.
function updateValueRange¶
Resolves the value range again. Call after every change of the values.
Emits valueRangeChanged() and schedules a repaint when the range changed.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/series/ColormappedSeries.hpp