![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Slots | |
void | cancel () |
If the catcher is waiting in waitForThumbnails() in a different thread, cancels the waiting. | |
void | setActive (bool active) |
The catcher is active per default after construction. | |
Public Member Functions | |
ThumbnailImageCatcher (QObject *const parent=nullptr) | |
Use this class to get a thumbnail synchronously. | |
ThumbnailImageCatcher (ThumbnailLoadThread *const thread, QObject *const parent=nullptr) | |
int | enqueue () |
After requesting a thumbnail from the thread, call enqueue() each time. | |
void | setThumbnailLoadThread (ThumbnailLoadThread *const thread) |
ThumbnailLoadThread * | thread () const |
QList< QImage > | waitForThumbnails () |
Protected Slots | |
void | slotThumbnailLoaded (const LoadingDescription &, const QImage &) |
|
explicit |
Note: Not meant for loading QPixmap thumbnails.
|
slot |
The results will be returned as received so far.
int Digikam::ThumbnailImageCatcher::enqueue | ( | ) |
Enqueue records the requested loading operation in an internal list. A loading operation can result in the return of more than one thumbnail, so enqueue() returns the number of expected results. Then call waitForThumbnails. The returned list is the sum of previous calls to enqueue, one entry per expected result, in order. If stopped prematurely or loading failed, the respective entries will be null.
|
slot |
Deactivate it if you use the catcher as a longer-lived object and do not use it for some time, then activate it before you request a thumbnail from the thread again.