[KXAnim Index] [KXAnim Hierarchy] [Headers]
A xanim wrapper to allow video playing on your apps. More...
#include <kxanim.h>
Inherits: QWidget
Widget class for video playing
This widget is a xanim wrapper to easily allow the video playing on your applications.
[public]
Constructor. The parent argumet is NOT optional.
[public]
Use this method to tell the player the name of the file to play. The file will not start to play until you call the play() slot. You need to call stop() before you can set a new filename.
After call this method, you should wait for an stopped signal. Just then, the information about the file will be available.
Also check for KXAnim::getErrorNumber and getErrorString to know if there was some error.
[public]
If val==true, the widget will resize by himself after the setFile() to fit to the size of the video. If val==false, the video size will be adjusted to fit to the widget size.
The size of the widget is automatically updated by setFile and play But if you need to know the effective size of the widget *before* you call play, you need to call updateSize manually.
Default is true
[public]
Returns the auto-resize state (see setAutoResize ).
[public]
Updates the widget size to fit video size (taking care of the scale factors that applies). See setAutoResize .
[public]
If val==true, the video will loop forever.
Default is true
[public]
Returns the loop state ( see setLoop ).
[public]
Returns the current video file name (or an empty string, if there's no video yet).
[public]
Returns the video height (in pixels).
[public]
Returns the video height (in pixels).
[public]
Returns the video playback speed (in frames per second).
[public]
Returns the number of frames in the video.
[public]
Returns the string that describes the video codec.
[public]
Returns the the error code number. You should check this number after a setFile . If the code is zero, the there were no errors. To get a string containing a description see getErrorCode .
[public]
Returns the string that describes the error during setFile .
[public]
Returns true is the video is in play mode. Otherwise it reurns false.
[public]
Returns true is the video is active. Otherwise it reurns false. The widget is NOT Active only when it's stopped. Therefore, you can use this method to check if the video is REALLY stopped.
[public]
This method reset all the configuration parameters to their default values.
[public]
If val==true, enables sound output.
Default is true
[public]
If val==true, allows xanim skip video frames for audio sync.
Default is true
[public]
Sets the initial audio volume.
Default is 40
[public]
See setColorMapping .
[public]
Tells KXAnim wich type of color mappint to use for non truecolor displays.
If val==KXAnim::static322, xanim will convert truecolor anims to static 322.
If val==KXAnim::lookupTable, xanim will sample the color of truecolor animations ahead of time and forms a color lookup table.
If val==KXAnim::grayScale, xanim will convert TrueColor animations to gray scale.
Those three option are ignored for TrueColor and DirectColor displays.
if val==KXAnim::none, xanim will use the default color mapping.
Default is KXAnim::none
[public]
This sets the number of frames ahead to use for the look up table when using KXAnim::lookupTable in setColorMapping .
Default is 5
[public]
Set gamma of display. Gamma's greater than 1.0 typically brighten the animation.
Default is 1.0
[public]
If val==true, the video size can be changed "on the fly".
Default is true
[public]
Scale the size of anim by "val" before displaying.
Default is 1.0 (no scaling)
[public]
Scale the horizontal size of anim by "val" before displaying.
Default is 1.0 (no scaling)
[public]
Scale the vertical size of anim by "val" before displaying.
Default is 1.0 (no scaling)
[public]
Scale the animation to have width "val" before displaying.
Default is 0 (no scaling)
[public]
Scale the animation to have height "val" before displaying.
Default is 0 (no scaling)
[public]
Copy display scaling factors to buffering scaling factors.
Default is false.
[public]
Scale the size of anim by "val" before buffering it.
Default is 1.0 (no scaling)
[public]
Scale the horizontal size of anim by "val" before buffering it.
Default is 1.0 (no scaling)
[public]
Scale the vertical size of anim by "val" before buffering it.
Default is 1.0 (no scaling)
[public]
Scale the animation to have width "val" before buffering it.
Default is 0 (no scaling)
[public]
Scale the animation to have height "val" before buffering it.
Default is 0 (no scaling)
[public]
Copy buffering scaling factors to display scaling factors.
Default is false.
[public]
0: KXAnim will load the entire video into memory.
1: KXAnim will load and decompress the animation entirely into memory before displaying.
2: KXAnim will read each sector only when needed
Default is 2.
[public]
If val==true, KXAnim will use X11 shared memory (this is mutually exclusive with setPreload .
Default is false.
[public]
If val==true, KXAnim will use X11 Buffering (if present) to smooth animations by double-buffering.
Default is true.
[public]
If val==true, KXAnim will use Pixmap instead of Image in X11shared. This option has no effect if the animation is buffered.
Default is false.
[public]
Select the best "X11 Visual of Class..." when displaying the animation. val can be anyone of the following strings and is case insensitive:
default staticgray grayscale staticcolor pseudocolor truecolor directcolor
Default is "default".
[public]
This will pause XAnim at frame "val". val=-1 disables this option.
Default is -1 (no pause).
[public]
Use this method to pass any extra parametrs you want to xanim (separated by spaces).
[public]
Use this method to set the executable name for xanim. Dafault is "xanim", but you can change it, for instance, if you don't have xanim in the path.
[public slot]
Start playing the video.
[public slot]
Pauses the video playing (xanim is still runnig).
[public slot]
Stops the video and exit xanim (don't worry about it, it's transparent for the class user).
Note: calling this slot doesn't mean that the video will stop inmediatly. Use the stopped signal to know exactly when the player is set to the inactive mode (see isActive ).
[public slot]
Single step forward one frame. Pauses the video playing.
[public slot]
Single step back one frame. Pauses the video playing.
[public slot]
Single step forward one frame staying with anim. Pauses the video playing.
[public slot]
Single step back one frame staying with anim. Pauses the video playing.
[public slot]
Toggle sound between ON/OFF.
[public slot]
Increment volume by 1.
[public slot]
Decrement volume by 1.
[public slot]
Setup volume where v is a number from 0 to 100.
[public slot]
Increase animation playback speed.
[public slot]
Decrease animation playback speed.
[public slot]
Reset animation playback speed to original values.
[protected]
Don't use it!. This is internally used for the communication with xanim.
[signal]
This signal is emitted after a call to the stop() slot, and means that the player has REALLY stop the playing (it is: that xanim is inactive) (see stop ).
[signal]
This signal is emitted when the user clicks into the widget.
| Kdoc |