Search for usage in LXR

#include <KIO/ThumbSequenceCreator>

Inheritance diagram for ThumbSequenceCreator:

Public Member Functions

float sequenceIndex () const
float sequenceIndexWraparoundPoint () const
void setSequenceIndex (float index)
- Public Member Functions inherited from ThumbCreator
virtual ~ThumbCreator ()
virtual bool create (const QString &path, int width, int height, QImage &img)=0
virtual QWidgetcreateConfigurationWidget ()
virtual Flags flags () const
virtual void writeConfiguration (const QWidget *configurationWidget)

Protected Member Functions

void setSequenceIndexWraparoundPoint (float wraparoundPoint)

Additional Inherited Members

- Public Types inherited from ThumbCreator
enum  Flags { None = 0, DrawFrame, BlendIcon = 2 }

Detailed Description

See also

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


Definition at line 37 of file thumbsequencecreator.h.

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 17 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.


Definition at line 27 of file thumbsequencecreator.cpp.

◆ setSequenceIndex()

void ThumbSequenceCreator::setSequenceIndex ( float  index)

Sets the sequence-index for this thumb creator.

See also

Definition at line 22 of file thumbsequencecreator.cpp.

◆ setSequenceIndexWraparoundPoint()

void ThumbSequenceCreator::setSequenceIndexWraparoundPoint ( float  wraparoundPoint)

Sets the point at which this thumb-creator's sequence indices will wrap around.

See also

Definition at line 32 of file thumbsequencecreator.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 03:56:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.