ImFusion C++ SDK 4.4.0
ImFusion::ThumbnailLoader Class Reference
Inheritance diagram for ImFusion::ThumbnailLoader:

Public Types

enum  QueueOperation { DoNotAdd , PushFront , PushBack }

Signals

void thumbnailLoaded (QString path, QString id)

Public Member Functions

 ThumbnailLoader (unsigned int cacheSizeInMB, bool remoteMode)
void setAuthProvider (std::shared_ptr< Network::AuthorizationProvider > provider)
std::optional< QImage > getThumbnail (const QString &path, const QString &id, bool isLabels, QueueOperation)
 Load the thumbnail from the given path.
std::optional< QImage > getThumbnailBlocking (const QString &path, bool isLabels)
 Load the thumbnail from the given path.
void addThumbnail (const QString &path, const QString &id, std::unique_ptr< QImage > &image)
void removeThumbnail (const QString &path, const QString &id)
void setCacheMinSize (unsigned int size)
void setCacheOverrideSize (unsigned int size)
void clearQueue ()

Member Function Documentation

◆ getThumbnail()

std::optional< QImage > ImFusion::ThumbnailLoader::getThumbnail ( const QString & path,
const QString & id,
bool isLabels,
QueueOperation  )

Load the thumbnail from the given path.

The thumbnail is directly returned if it's already cached. Otherwise, the thumbnail is loaded in the background (depending on the QueueOperation). When the thumbnail becomes ready, the thumbnailLoaded signal is emitted with the given id.

◆ getThumbnailBlocking()

std::optional< QImage > ImFusion::ThumbnailLoader::getThumbnailBlocking ( const QString & path,
bool isLabels )

Load the thumbnail from the given path.

If not in the cache and generate is true, the thumbnail is directly loaded from the path, without using the loading thread.


The documentation for this class was generated from the following file:
  • ImFusionLabels/lib/include/ImFusion/Labels/Core/ThumbnailLoader.h
Search Tab / S to search, Esc to close