|
| ThumbnailLoadThread (QObject *const parent=nullptr) |
|
void | find (const ThumbnailIdentifier &identifier) |
| Find a thumbnail.
|
|
void | find (const ThumbnailIdentifier &identifier, const QRect &rect) |
|
void | find (const ThumbnailIdentifier &identifier, const QRect &rect, int size) |
|
bool | find (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap) |
| All tastes of find() methods, for loading the thumbnail of a detail.
|
|
bool | find (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap, int size, bool onlyStorage=false) |
|
void | find (const ThumbnailIdentifier &identifier, int size) |
| Same as above, but does not use the global size, but an extra specified size.
|
|
bool | find (const ThumbnailIdentifier &identifier, QPixmap &pixmap) |
| Find a thumbnail.
|
|
bool | find (const ThumbnailIdentifier &identifier, QPixmap &pixmap, int size, bool onlyStorage=false) |
| Same as above, but does not use the global size, but an extra specified size.
|
|
bool | findBuffered (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap, int size) |
| Find the thumbnail pixmap in the buffered cache to avoid flickering while loading a new thumbnail.
|
|
void | findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathAndRects) |
|
void | findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathsAndRects, int size) |
|
void | findGroup (QList< ThumbnailIdentifier > &identifiers) |
| Find a group of thumbnails.
|
|
void | findGroup (QList< ThumbnailIdentifier > &identifiers, int size) |
|
QList< LoadingDescription > | lastDescriptions () const |
| Returns the descriptions used by the last call to any of the above methods.
|
|
void | load (const LoadingDescription &description) |
| Load a thumbnail.
|
|
int | pixmapToThumbnailSize (int size) const |
| Computes the thumbnail size for the give pixmap size.
|
|
void | pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers) |
| Pregenerate the thumbnail group.
|
|
void | pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers, int size) |
|
void | preload (const ThumbnailIdentifier &identifier) |
| Preload the thumbnail or thumbnail group.
|
|
void | preload (const ThumbnailIdentifier &identifier, int size) |
|
void | preloadGroup (QList< ThumbnailIdentifier > &identifiers) |
|
void | preloadGroup (QList< ThumbnailIdentifier > &identifiers, int size) |
|
void | setHighlightPixmap (bool highlight) |
| If you enable this, a highlighting border will be drawn around the pixmap.
|
|
void | setPixmapRequested (bool wantPixmap) |
| If you enable this, the signal thumbnailLoaded(LoadingDescription, QPixmap) will be emitted.
|
|
void | setSendSurrogatePixmap (bool send) |
| If you enable this, the thread will try hard to send a pixmap if thumbnail loading failed.
|
|
void | setThumbnailSize (int size, bool forFace=false) |
| Set the requested thumbnail size.
|
|
void | storeDetailThumbnail (const QString &filePath, const QRect &detailRect, const QImage &image, bool isFace=false) |
| Stores the given detail thumbnail on disk.
|
|
int | storedSize () const |
|
ThumbnailCreator * | thumbnailCreator () const |
|
int | thumbnailToPixmapSize (int size) const |
| Computes the pixmap size for the give thumbnail size.
|
|
| ManagedLoadSaveThread (QObject *const parent=nullptr) |
| Termination is controlled by setting the TerminationPolicy Default is TerminationPolicyTerminateLoading.
|
|
void | load (const LoadingDescription &description) |
| Append a task to load the given file to the task list.
|
|
void | load (const LoadingDescription &description, LoadingPolicy policy) |
|
LoadingPolicy | loadingPolicy () const |
|
void | save (const DImg &image, const QString &filePath, const QString &format) |
| Append a task to save the image to the task list.
|
|
void | setLoadingPolicy (LoadingPolicy policy) |
| Set the loading policy.
|
|
void | setTerminationPolicy (TerminationPolicy terminationPolicy) |
|
void | stopAllTasks () |
|
void | stopLoading (const LoadingDescription &desc, LoadingTaskFilter filter=LoadingTaskFilterAll) |
| Same than previous method, but Stop and remove tasks filtered by LoadingDescription.
|
|
void | stopLoading (const QString &filePath=QString(), LoadingTaskFilter filter=LoadingTaskFilterAll) |
| Stop and remove tasks filtered by filePath and policy.
|
|
void | stopSaving (const QString &filePath=QString()) |
| Stop and remove saving tasks filtered by filePath.
|
|
TerminationPolicy | terminationPolicy () const |
|
| LoadSaveThread (QObject *const parent=nullptr) |
|
| ~LoadSaveThread () override |
| Destructor: The thread will execute all pending tasks and wait for this upon destruction.
|
|
void | imageLoaded (const LoadingDescription &loadingDescription, const DImg &img) override |
|
void | imageSaved (const QString &filePath, bool success) override |
|
void | imageStartedLoading (const LoadingDescription &loadingDescription) override |
|
void | imageStartedSaving (const QString &filePath) override |
|
void | load (const LoadingDescription &description) |
| Append a task to load the given file to the task list.
|
|
void | loadingProgress (const LoadingDescription &loadingDescription, float progress) override |
|
void | moreCompleteLoadingAvailable (const LoadingDescription &oldLoadingDescription, const LoadingDescription &newLoadingDescription) override |
|
virtual bool | querySendNotifyEvent () const |
|
void | save (const DImg &image, const QString &filePath, const QString &format) |
| Append a task to save the image to the task list.
|
|
void | savingProgress (const QString &filePath, float progress) override |
|
void | setNotificationPolicy (NotificationPolicy notificationPolicy) |
|
virtual void | taskHasFinished () |
|
| DynamicThread (QObject *const parent=nullptr) |
| This class extends QRunnable, so you have to reimplement virtual void run().
|
|
| ~DynamicThread () override |
| The destructor calls stop() and wait(), but if you, in your destructor, delete any data that is accessed by your run() method, you must call stop() and wait() before yourself.
|
|
bool | isFinished () const |
|
bool | isRunning () const |
|
QThread::Priority | priority () const |
|
void | setEmitSignals (bool emitThem) |
|
void | setPriority (QThread::Priority priority) |
| Sets the priority for this dynamic thread.
|
|
State | state () const |
|
|
void | thumbnailLoaded (const LoadingDescription &loadingDescription, const QImage &img) override |
| virtual method overridden from LoadSaveNotifier, implemented first by LoadSaveThread called by ThumbnailTask from working thread
|
|
void | load (const LoadingDescription &description, LoadingMode loadingMode, AccessMode mode=AccessModeReadWrite) |
|
void | load (const LoadingDescription &description, LoadingMode loadingMode, LoadingPolicy policy, AccessMode mode=AccessModeReadWrite) |
|
void | loadPreview (const LoadingDescription &description, LoadingPolicy policy) |
|
void | loadThumbnail (const LoadingDescription &description) |
|
void | preloadThumbnail (const LoadingDescription &description) |
|
void | preloadThumbnailGroup (const QList< LoadingDescription > &descriptions) |
|
void | prependThumbnailGroup (const QList< LoadingDescription > &descriptions) |
|
void | shutDown () |
|
void | notificationReceived () |
|
void | run () override |
| Implement this pure virtual function in your subclass.
|
|
bool | runningFlag () const volatile |
| In you run() method, you shall regularly check for runningFlag() and cleanup and return if false.
|
|
void | shutDown () |
| If you are deleting data in your destructor which is accessed from the thread, do one of the following from your destructor to guarantee a safe shutdown: 1) Call this method 2) Call stop() and wait(), knowing that nothing will call start() anymore after this 3) Be sure the thread will never be running at destruction.
|
|
void | start (QMutexLocker< QMutex > &locker) |
| Doing the same as start(), stop() and wait above, provide it with a locked QMutexLocker on mutex().
|
|
void | stop (const QMutexLocker< QMutex > &locker) |
|
QMutex * | threadMutex () const |
| This is the non-recursive mutex used to protect state variables and waiting in this class.
|
|
void | wait (QMutexLocker< QMutex > &locker) |
|