Working with Embedded Wizard: Using timers and animation effects
The Mosaic framework provides two below described kinds of objects you can use wherever your GUI component expects an animated transition or delayed operation to perform.
Timers
The Timer object provides very simple functionality to perform an operation with delay or to perform it periodically. You connect the Timer with a slot method and within it you implement the desired operation. Every time the Timer expires, the slot method is executed. The timing behavior can be configured precisely.
Animation Effects
With Animation Effects the Mosaic framework provides objects to simply animate the views existing within a GUI component. When using an Effect object you configure a transition between two key values and you determine the property of a view to be controlled. At the runtime, the Effect object modifies the property with values resulting from the interpolation between the specified key values. Additionally you can precisely configure the timing behavior of the animation, in particular its duration, the number of repetitions, the course of the easing curve, and much more.
Every Animation Effect is optimized to handle with its particular data type. When you select an Effect object, you do it primarily depending on the type of the property you intend to animate. For example, if you want to animate a color property, select the Pulse color Effect. The table below provides an overview of the available versions of Animation Effects.
If you don't intend to connect the Effect with a property, you can connect it with a slot method and implementing it control the views within your GUI component more flexibly. In such case you select the right version of the Effect depending on the type of the values you want to animate. Using the slot method, you can additional calculate with the Effect's current value.
Icon |
Name |
Description |
---|---|---|
This Animation Effect is optimized to interpolate between two int32 values. |
||
This Animation Effect is optimized to interpolate between two float values. |
||
This Animation Effect is optimized to interpolate between two color values. |
||
This Animation Effect is optimized to interpolate between two point values. |
||
This Animation Effect is optimized to interpolate between two rect values. |
||
This Animation Effect is optimized to operate with bool values. Since a bool can assume the discrete false or true values only, this version of the Animation Effect limits to toggle between the specified key values instead of interpolating between them. |