ThumbSequenceCreator
#include <KIO/ThumbSequenceCreator>

Public Member Functions | |
ThumbSequenceCreator () | |
float | sequenceIndex () const |
float | sequenceIndexWraparoundPoint () const |
void | setSequenceIndex (float index) |
![]() | |
virtual | ~ThumbCreator () |
virtual bool | create (const QString &path, int width, int height, QImage &img)=0 |
virtual QWidget * | createConfigurationWidget () |
virtual Flags | flags () const |
virtual void | writeConfiguration (const QWidget *configurationWidget) |
Protected Member Functions | |
void | setSequenceIndexWraparoundPoint (float wraparoundPoint) |
Additional Inherited Members | |
![]() | |
enum | Flags { None = 0, DrawFrame, BlendIcon = 2 } |
Detailed Description
- See also
- ThumbCreator
This is an extension of ThumbCreator that allows creating a thumbnail sequence for a file. If your thumbnail plugin can create a thumbnail sequence, you should base it on ThumbSequenceCreator instead of ThumbCreator, and should use sequenceIndex() to decide what thumbnail you generate.
You also need to set the following key in the thumbcreator .desktop file
- Deprecated:
- since 5.101, use KIO::ThumbnailCreator instead
- Since
- 4.3
Definition at line 41 of file thumbsequencecreator.h.
Constructor & Destructor Documentation
◆ ThumbSequenceCreator()
ThumbSequenceCreator::ThumbSequenceCreator | ( | ) |
- Deprecated:
- since 5.101, use KIO::ThumbnailCreator instead
Definition at line 39 of file thumbsequencecreator.cpp.
Member Function Documentation
◆ sequenceIndex()
float ThumbSequenceCreator::sequenceIndex | ( | ) | const |
If this thumb-creator can create a sequence of thumbnails, it should use this to decide what sequence item to use.
If the value is zero, the standard thumbnail should be created.
This can be used for example to create thumbnails for different timeframes in videos(For example 0m, 10m, 20m, ...).
If your thumb-creator supports a high granularity, like a video, you can respect the sub-integer precision coming from the float. Else, just round the index to an integer.
If the end of your sequence is reached, the sequence should start from the beginning, or continue in some other way.
Definition at line 19 of file thumbsequencecreator.cpp.
◆ sequenceIndexWraparoundPoint()
float ThumbSequenceCreator::sequenceIndexWraparoundPoint | ( | ) | const |
Returns the point at which this thumb-creator's sequence indices will wrap around (loop).
Usually, the frontend will call setSequenceIndex() with indices that increase indefinitely with time, e.g. as long as the user keeps hovering a video file. Most thumb-creators however only want to display a finite sequence of thumbs, after which their sequence repeats.
This method can return the sequence index at which this thumb-creator's sequence starts wrapping around to the start again ("looping"). The frontend may use this to generate only thumbs up to this index, and then use cached versions for the repeating sequence instead.
Like sequenceIndex(), fractional values can be used if the wraparound does not happen at an integer position, but frontends handling only integer sequence indices may choose to round it down.
By default, this method returns a negative index, which signals the frontend that it can't rely on this fixed-length sequence.
- Since
- 5.80
Definition at line 29 of file thumbsequencecreator.cpp.
◆ setSequenceIndex()
void ThumbSequenceCreator::setSequenceIndex | ( | float | index | ) |
Sets the sequence-index for this thumb creator.
- See also
- sequenceIndex
Definition at line 24 of file thumbsequencecreator.cpp.
◆ setSequenceIndexWraparoundPoint()
|
protected |
Sets the point at which this thumb-creator's sequence indices will wrap around.
- See also
- sequenceIndexWraparoundPoint()
- Since
- 5.80
Definition at line 34 of file thumbsequencecreator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 03:50:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.