KIO::ThumbnailResult
#include <thumbnailcreator.h>
Public Member Functions | |
ThumbnailResult (const ThumbnailResult &) | |
QImage | image () const |
bool | isValid () const |
ThumbnailResult & | operator= (const ThumbnailResult &) |
float | sequenceIndexWraparoundPoint () const |
void | setSequenceIndexWraparoundPoint (float wraparoundPoint) |
Static Public Member Functions | |
static ThumbnailResult | fail () |
static ThumbnailResult | pass (const QImage &image) |
Detailed Description
Encapsulates the output of a thumbnail request.
It contains information on whether the request was successful and, if successful, the requested thumbnail
To create a result use KIO::ThumbnailResult::pass(image) or KIO::ThumbnailResult::fail()
- Since
- 5.100
Definition at line 113 of file thumbnailcreator.h.
Constructor & Destructor Documentation
◆ ThumbnailResult()
KIO::ThumbnailResult::ThumbnailResult | ( | const ThumbnailResult & | other | ) |
Definition at line 89 of file thumbnailcreator.cpp.
Member Function Documentation
◆ fail()
|
static |
Create an error result, i.e.
the thumbnail creation failed
Definition at line 109 of file thumbnailcreator.cpp.
◆ image()
QImage KIO::ThumbnailResult::image | ( | ) | const |
The requested thumbnail.
If the request failed the image is null
Definition at line 125 of file thumbnailcreator.cpp.
◆ isValid()
bool KIO::ThumbnailResult::isValid | ( | ) | const |
Whether the request was successful.
Definition at line 130 of file thumbnailcreator.cpp.
◆ operator=()
ThumbnailResult & KIO::ThumbnailResult::operator= | ( | const ThumbnailResult & | other | ) |
Definition at line 94 of file thumbnailcreator.cpp.
◆ pass()
|
static |
Create a successful result with a given image.
Definition at line 101 of file thumbnailcreator.cpp.
◆ sequenceIndexWraparoundPoint()
float KIO::ThumbnailResult::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 115 of file thumbnailcreator.cpp.
◆ setSequenceIndexWraparoundPoint()
void KIO::ThumbnailResult::setSequenceIndexWraparoundPoint | ( | float | wraparoundPoint | ) |
Sets the point at which this thumb-creator's sequence indices will wrap around.
- See also
- sequenceIndexWraparoundPoint()
Definition at line 120 of file thumbnailcreator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.