Class QAccelPlot::MorphTransition¶
ClassList > QAccelPlot > MorphTransition
An animation transition that smoothly interpolates point positions between two datasets. More...
#include <MorphTransition.hpp>
Inherits the following classes: QAccelPlot::DataTransition
Inheritance diagram¶
flowchart TB
classQAccelPlot_1_1MorphTransition["QAccelPlot::MorphTransition"]
classQAccelPlot_1_1DataTransition["QAccelPlot::DataTransition"]
classQAccelPlot_1_1DataTransition --> classQAccelPlot_1_1MorphTransition
click classQAccelPlot_1_1DataTransition "../classQAccelPlot_1_1DataTransition/" "Open QAccelPlot::DataTransition"
external_base_classQAccelPlot_1_1DataTransition_1["QObject"]
external_base_classQAccelPlot_1_1DataTransition_1 --> classQAccelPlot_1_1DataTransition
Public Properties inherited from QAccelPlot::DataTransition¶
See QAccelPlot::DataTransition
| Type | Name |
|---|---|
| property QML_ANONYMOUSint | duration Duration of the transition in milliseconds. Default: 300. |
| property QEasingCurve | easing Easing curve applied to the animation progress. Default: QEasingCurve::Linear . |
| property bool | enabled Whether the transition is active. When false , data updates are applied instantly. |
| property bool | running Read-only: true while the transition is playing on at least one element. |
Public Signals inherited from QAccelPlot::DataTransition¶
See QAccelPlot::DataTransition
| Type | Name |
|---|---|
| signal void | durationChanged Emitted when the duration property changes. |
| signal void | easingChanged Emitted when the easing property changes. |
| signal void | enabledChanged Emitted when the enabled property changes. |
| signal void | runningChanged Emitted when the running property changes. |
Public Functions¶
| Type | Name |
|---|---|
| MorphTransition (QObject * parent=nullptr) Constructs a MorphTransition with the given__parent . |
Public Functions inherited from QAccelPlot::DataTransition¶
See QAccelPlot::DataTransition
| Type | Name |
|---|---|
| DataTransition (QObject * parent=nullptr) Constructs an DataTransition with the given__parent . |
|
| bool | advance (Run & run, std::vector< double > & outData, int & outPointCount) Advances run by one frame, writing the interpolated data into__outData . |
| void | cancel () Ends every active run immediately. |
| int | duration () const Returns the animation duration in milliseconds. |
| QEasingCurve | easing () const Returns the easing curve. |
| bool | enabled () const Returns true if the transition is enabled. |
| bool | running () const Returns true while at least one run is active. |
| void | setDuration (int duration) Sets the animation duration to duration milliseconds. |
| void | setEasing (const QEasingCurve & easing) Sets the easing curve to easing . |
| void | setEnabled (bool enabled) Sets the enabled state to enabled . |
| void | start (Run & run, const std::vector< double > & currentData, int currentPointCount, std::vector< double > && newData, int newPointCount, int stride=2) Starts run from__currentData to__newData , restarting it if it is already active. |
| ~DataTransition () override Destroys the transition. Its runs stay pending, so their hosts can still show the target data. |
Public Static Functions¶
| Type | Name |
|---|---|
| double | interpolateCoordinate (double from, double to, double easedProgress) Returns the coordinate between from and__to at__easedProgress , honoring the invalid-data-point contract. |
Protected Functions¶
| Type | Name |
|---|---|
| virtual void | interpolate (double easedProgress, const Dataset & from, const Dataset & to, Dataset & out) override Interpolates every value of every point between from and__to at__easedProgress . |
Protected Functions inherited from QAccelPlot::DataTransition¶
See QAccelPlot::DataTransition
| Type | Name |
|---|---|
| virtual void | interpolate (double easedProgress, const Dataset & from, const Dataset & to, Dataset & out) = 0 Subclass entry point — writes the dataset between from and__to at__easedProgress into__out . |
Detailed Description¶
Each point is linearly blended from its old position to its new position. When the point counts differ, the extra points start from, or end on, the last point of the shorter dataset. BarSeries grows and shrinks such bars at its baseline instead, and PointCloud shows or removes such points at once. Non-finite coordinates are never interpolated: an invalid target coordinate is applied immediately, and a valid target coordinate replaces an invalid source coordinate without animation.
See also: DrawTransition, DataTransition
Public Functions Documentation¶
function MorphTransition¶
Constructs a MorphTransition with the given__parent .
Public Static Functions Documentation¶
function interpolateCoordinate¶
Returns the coordinate between from and__to at__easedProgress , honoring the invalid-data-point contract.
static double QAccelPlot::MorphTransition::interpolateCoordinate (
double from,
double to,
double easedProgress
)
Protected Functions Documentation¶
function interpolate¶
Interpolates every value of every point between from and__to at__easedProgress .
virtual void QAccelPlot::MorphTransition::interpolate (
double easedProgress,
const Dataset & from,
const Dataset & to,
Dataset & out
) override
Implements QAccelPlot::DataTransition::interpolate
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/transitions/MorphTransition.hpp