digiKam
Digikam::ThumbnailLoadThread Class Reference
+ Inheritance diagram for Digikam::ThumbnailLoadThread:

Classes

class  Private
 

Public Types

enum  AccessMode { AccessModeRead , AccessModeReadWrite }
 
enum  LoadingMode { LoadingModeNormal , LoadingModeShared }
 
enum  LoadingPolicy {
  LoadingPolicyFirstRemovePrevious , LoadingPolicyPrepend , LoadingPolicySimplePrepend , LoadingPolicyAppend ,
  LoadingPolicySimpleAppend , LoadingPolicyPreload
}
 
enum  LoadingTaskFilter { LoadingTaskFilterAll , LoadingTaskFilterPreloading }
 
enum  NotificationPolicy { NotificationPolicyDirect , NotificationPolicyTimeLimited }
 
enum  State { Inactive , Scheduled , Running , Deactivating }
 
enum  TerminationPolicy { TerminationPolicyTerminateLoading , TerminationPolicyTerminatePreloading , TerminationPolicyWait , TerminationPolicyTerminateAll }
 

Public Slots

void start ()
 
void stop ()
 
void wait ()
 

Signals

void finished ()
 
void signalImageLoaded (const LoadingDescription &loadingDescription, const DImg &img)
 
void signalImageSaved (const QString &filePath, bool success)
 
void signalImageStartedLoading (const LoadingDescription &loadingDescription)
 
void signalImageStartedSaving (const QString &filePath)
 
void signalLoadingProgress (const LoadingDescription &loadingDescription, float progress)
 
void signalMoreCompleteLoadingAvailable (const LoadingDescription &oldLoadingDescription, const LoadingDescription &newLoadingDescription)
 
void signalSavingProgress (const QString &filePath, float progress)
 
void signalThumbnailLoaded (const LoadingDescription &loadingDescription, const QImage &img)
 
void signalThumbnailLoaded (const LoadingDescription &loadingDescription, const QPixmap &pix)
 NOTE: See LoadSaveThread for a QImage-based thumbnailLoaded() signal. More...
 
void starting ()
 
void ThumbnailLoaded (const LoadingDescription &, const QImage &)
 
void thumbnailsAvailable ()
 NOTE: For internal use only. More...
 

Public Member Functions

void find (const ThumbnailIdentifier &identifier)
 
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)
 
bool find (const ThumbnailIdentifier &identifier, const QRect &rect, QPixmap &pixmap, int size)
 
void find (const ThumbnailIdentifier &identifier, int size)
 
bool find (const ThumbnailIdentifier &identifier, QPixmap &pixmap)
 
bool find (const ThumbnailIdentifier &identifier, QPixmap &pixmap, int size)
 
void findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathAndRects)
 
void findGroup (const QList< QPair< ThumbnailIdentifier, QRect > > &filePathsAndRects, int size)
 
void findGroup (QList< ThumbnailIdentifier > &identifiers)
 
void findGroup (QList< ThumbnailIdentifier > &identifiers, int size)
 
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
 
bool isFinished () const
 
bool isRunning () const
 
QList< LoadingDescriptionlastDescriptions () const
 
void load (const LoadingDescription &description)
 
void load (const LoadingDescription &description, LoadingPolicy policy)
 
LoadingPolicy loadingPolicy () const
 
void loadingProgress (const LoadingDescription &loadingDescription, float progress) override
 
void moreCompleteLoadingAvailable (const LoadingDescription &oldLoadingDescription, const LoadingDescription &newLoadingDescription) override
 
int pixmapToThumbnailSize (int size) const
 
void pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers)
 
void pregenerateGroup (const QList< ThumbnailIdentifier > &identifiers, int size)
 
void preload (const ThumbnailIdentifier &identifier)
 
void preload (const ThumbnailIdentifier &identifier, int size)
 
void preloadGroup (QList< ThumbnailIdentifier > &identifiers)
 
void preloadGroup (QList< ThumbnailIdentifier > &identifiers, int size)
 
QThread::Priority priority () const
 
virtual bool querySendNotifyEvent () const
 
void save (const DImg &image, const QString &filePath, const QString &format)
 
void save (DImg &image, const QString &filePath, const QString &format)
 
void savingProgress (const QString &filePath, float progress) override
 
void setEmitSignals (bool emitThem)
 
void setHighlightPixmap (bool highlight)
 
void setLoadingPolicy (LoadingPolicy policy)
 
void setNotificationPolicy (NotificationPolicy notificationPolicy)
 
void setPixmapRequested (bool wantPixmap)
 
void setPriority (QThread::Priority priority)
 
void setSendSurrogatePixmap (bool send)
 
void setTerminationPolicy (TerminationPolicy terminationPolicy)
 
void setThumbnailSize (int size, bool forFace=false)
 
State state () const
 
void stopAllTasks ()
 
void stopLoading (const LoadingDescription &desc, LoadingTaskFilter filter=LoadingTaskFilterAll)
 
void stopLoading (const QString &filePath=QString(), LoadingTaskFilter filter=LoadingTaskFilterAll)
 
void stopSaving (const QString &filePath=QString())
 
void storeDetailThumbnail (const QString &filePath, const QRect &detailRect, const QImage &image, bool isFace=false)
 
int storedSize () const
 
virtual void taskHasFinished ()
 
TerminationPolicy terminationPolicy () const
 
ThumbnailCreatorthumbnailCreator () const
 NOTE: For internal use - may only be used from the thread. More...
 
 ThumbnailLoadThread (QObject *const parent=nullptr)
 
int thumbnailToPixmapSize (int size) const
 
 ~ThumbnailLoadThread () override
 

Static Public Member Functions

static void cleanUp ()
 
static ThumbnailLoadThreaddefaultIconViewThread ()
 
static ThumbnailLoadThreaddefaultThread ()
 
static void deleteThumbnail (const QString &filePath)
 
static int exifOrientation (const QString &filePath, const DMetadata &metadata, bool isRaw, bool fromRawEmbeddedPreview)
 
static LoadSaveFileInfoProviderinfoProvider ()
 
static void initializeThumbnailDatabase (const DbEngineParameters &params, ThumbnailInfoProvider *const provider=nullptr)
 
static int maximumThumbnailPixmapSize (bool withHighlighting)
 
static int maximumThumbnailSize ()
 
static void setDisplayingWidget (QWidget *const widget)
 
static void setInfoProvider (LoadSaveFileInfoProvider *const infoProvider)
 
static int thumbnailToPixmapSize (bool withHighlight, int size)
 

Protected Member Functions

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 notificationReceived ()
 
void preloadThumbnail (const LoadingDescription &description)
 
void preloadThumbnailGroup (const QList< LoadingDescription > &descriptions)
 
void prependThumbnailGroup (const QList< LoadingDescription > &descriptions)
 
void run () override
 
bool runningFlag () const volatile
 
void shutDown ()
 
void start (QMutexLocker &locker)
 
void stop (QMutexLocker &locker)
 
QMutex * threadMutex () const
 
void thumbnailLoaded (const LoadingDescription &loadingDescription, const QImage &img) override
 
void wait (QMutexLocker &locker)
 

Protected Attributes

LoadSaveTaskm_currentTask
 
LoadingPolicy m_loadingPolicy
 
QMutex m_mutex
 
NotificationPolicy m_notificationPolicy
 
TerminationPolicy m_terminationPolicy
 
QList< LoadSaveTask * > m_todo
 

Member Enumeration Documentation

◆ AccessMode

used by SharedLoadSaveThread only

Enumerator
AccessModeRead 

image will only be used for reading

AccessModeReadWrite 

image data will possibly be changed

◆ LoadingMode

used by SharedLoadSaveThread only

Enumerator
LoadingModeNormal 

no sharing of loading process, no caching of image

LoadingModeShared 

loading process is shared, image is cached

◆ LoadingPolicy

Enumerator
LoadingPolicyFirstRemovePrevious 

Load image immediately, remove and stop all previous loading tasks.

LoadingPolicyPrepend 

Prepend loading in front of all other tasks, but wait for the current task to finish. No other tasks will be removed, preloading tasks will be stopped and postponed.

LoadingPolicySimplePrepend 

Prepend in front of all other tasks (not touching the current task). Do not check for duplicate tasks, do not check for preloading tasks.

LoadingPolicyAppend 

Append loading task to the end of the list, but in front of all preloading tasks. No other tasks will be removed, preloading tasks will be stopped and postponed. This is similar to the simple load() operation from LoadSaveThread, except for the special care taken for preloading.

LoadingPolicySimpleAppend 

Append to the lists of tasks. Do not check for duplicate tasks, do not check for preloading tasks.

LoadingPolicyPreload 

Preload image, i.e. load it with low priority when no other tasks are scheduled. All other tasks will take precedence, and preloading tasks will be stopped and postponed when another task is added. No progress info will be sent for preloaded images

◆ LoadingTaskFilter

Enumerator
LoadingTaskFilterAll 

filter all loading tasks

LoadingTaskFilterPreloading 

filter only tasks with preloading policy

◆ NotificationPolicy

Enumerator
NotificationPolicyDirect 

Always send notification, unless the last event is still in the event queue

NotificationPolicyTimeLimited 

Always wait for a certain amount of time after the last event sent. In particular, the first event will be sent only after waiting for this time span. (Or no event will be sent, when the loading has finished before) This is the default.

◆ State

Enumerator
Inactive 
Scheduled 
Running 
Deactivating 

◆ TerminationPolicy

Enumerator
TerminationPolicyTerminateLoading 

Wait for saving tasks, stop and remove loading tasks This is the default.

TerminationPolicyTerminatePreloading 

Wait for loading and saving tasks, stop and remove preloading tasks

TerminationPolicyWait 

Wait for all pending tasks

TerminationPolicyTerminateAll 

Stop all pending tasks

Constructor & Destructor Documentation

◆ ThumbnailLoadThread()

◆ ~ThumbnailLoadThread()

Digikam::ThumbnailLoadThread::~ThumbnailLoadThread ( )
override

Member Function Documentation

◆ cleanUp()

◆ defaultIconViewThread()

◆ defaultThread()

ThumbnailLoadThread * Digikam::ThumbnailLoadThread::defaultThread ( )
static

Return application-wide default thumbnail threads. It is perfectly all right to create an extra object of the class, but it is useful to have default object

Referenced by cleanUp(), Digikam::DeleteItemList::DeleteItemList(), Digikam::FindDuplicatesAlbum::FindDuplicatesAlbum(), Digikam::FuzzySearchView::FuzzySearchView(), and Digikam::ImageDialogPreview::ImageDialogPreview().

◆ deleteThumbnail()

void Digikam::ThumbnailLoadThread::deleteThumbnail ( const QString &  filePath)
static

This is a tool to force regeneration of thumbnails. All thumbnail files for the given file will be removed from disk, and the cached instances will be removed as well. Use this method if you know that the contents of the file has changed. This method works independently from the multithreaded thumbnail loading.

References Digikam::LoadingCache::cache(), Digikam::ThumbnailCreator::deleteThumbnailsFromDisk(), Digikam::LoadingDescription::possibleThumbnailCacheKeys(), Digikam::LoadingCache::removeThumbnail(), and Digikam::ThumbnailCreator::setThumbnailInfoProvider().

Referenced by Digikam::EditorWindow::moveFile(), Digikam::EditorWindow::movingSaveFileFinished(), Digikam::ItemViewUtilities::notifyFileContentChanged(), and Digikam::FileActionMngr::Private::slotImageDataChanged().

◆ exifOrientation()

int Digikam::LoadSaveThread::exifOrientation ( const QString &  filePath,
const DMetadata metadata,
bool  isRaw,
bool  fromRawEmbeddedPreview 
)
staticinherited

◆ find() [1/8]

void Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier)

Find a thumbnail. This method sends the signals and does not return values like the method above. If you certainly need asynchronous return, connect with Qt::QueuedConnection to the signals. If you connect directly, the signals may be sent from within the method call.

References find(), and Digikam::ThumbnailLoadThread::Private::size.

◆ find() [2/8]

void Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
const QRect &  rect 
)

◆ find() [3/8]

void Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
const QRect &  rect,
int  size 
)

References find().

◆ find() [4/8]

bool Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
const QRect &  rect,
QPixmap &  pixmap 
)

All tastes of find() methods, for loading the thumbnail of a detail

References find(), and Digikam::ThumbnailLoadThread::Private::size.

◆ find() [5/8]

bool Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
const QRect &  rect,
QPixmap &  pixmap,
int  size 
)

References find().

◆ find() [6/8]

void Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
int  size 
)

Same as above, but does not use the global size, but an extra specified size.

References find().

◆ find() [7/8]

bool Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
QPixmap &  pixmap 
)

Find a thumbnail. If the pixmap is found in the cache, returns true and sets pixmap to the found QPixmap. If the pixmap is not found in the cache, load() is called to start the loading process, false is returned and pixmap is not touched.

References Digikam::ThumbnailLoadThread::Private::size.

Referenced by find(), Digikam::FaceItemRetriever::getThumbnails(), and Digikam::TableViewTreeView::pixmapForDrag().

◆ find() [8/8]

bool Digikam::ThumbnailLoadThread::find ( const ThumbnailIdentifier identifier,
QPixmap &  pixmap,
int  size 
)

Same as above, but does not use the global size, but an extra specified size.

References find().

◆ findGroup() [1/4]

void Digikam::ThumbnailLoadThread::findGroup ( const QList< QPair< ThumbnailIdentifier, QRect > > &  filePathAndRects)

◆ findGroup() [2/4]

void Digikam::ThumbnailLoadThread::findGroup ( const QList< QPair< ThumbnailIdentifier, QRect > > &  filePathsAndRects,
int  size 
)

◆ findGroup() [3/4]

void Digikam::ThumbnailLoadThread::findGroup ( QList< ThumbnailIdentifier > &  identifiers)

Find a group of thumbnails. The items will be loaded in order and signals will be sent. Can be used to ensure that thumbnails are loaded in a particular order

References Digikam::ThumbnailLoadThread::Private::size.

Referenced by findGroup().

◆ findGroup() [4/4]

void Digikam::ThumbnailLoadThread::findGroup ( QList< ThumbnailIdentifier > &  identifiers,
int  size 
)

◆ finished

◆ imageLoaded()

void Digikam::LoadSaveThread::imageLoaded ( const LoadingDescription loadingDescription,
const DImg img 
)
overridevirtualinherited

◆ imageSaved()

void Digikam::LoadSaveThread::imageSaved ( const QString &  filePath,
bool  success 
)
overridevirtualinherited

◆ imageStartedLoading()

void Digikam::LoadSaveThread::imageStartedLoading ( const LoadingDescription loadingDescription)
overridevirtualinherited

◆ imageStartedSaving()

void Digikam::LoadSaveThread::imageStartedSaving ( const QString &  filePath)
overridevirtualinherited

◆ infoProvider()

LoadSaveFileInfoProvider * Digikam::LoadSaveThread::infoProvider ( )
staticinherited

◆ initializeThumbnailDatabase()

void Digikam::ThumbnailLoadThread::initializeThumbnailDatabase ( const DbEngineParameters params,
ThumbnailInfoProvider *const  provider = nullptr 
)
static

Enable loading of thumbnails from a thumbnail database. This shall be called once at application startup. This need not be called, then the FreeDesktop standard is used. You can optionally provide a thumbnail info provider.

References Digikam::ThumbsDbAccess::checkReadyForUse(), Digikam::ThumbsDbAccess::setParameters(), and Digikam::ThumbnailCreator::ThumbnailDatabase.

Referenced by Digikam::AlbumManager::setDatabase().

◆ isFinished()

bool Digikam::DynamicThread::isFinished ( ) const
inherited

◆ isRunning()

◆ lastDescriptions()

QList< LoadingDescription > Digikam::ThumbnailLoadThread::lastDescriptions ( ) const

Returns the descriptions used by the last call to any of the above methods. After calling single-thumbnail methods (find, preload) the list will have size 1, after the group methods (findGroup, preloadGroup, pregenerateGroup) the list can be larger than 1. There is no information if the description was ever scheduled in the thread, already processed, skipped or canceled.

References Digikam::ThumbnailLoadThread::Private::lastDescriptions.

Referenced by Digikam::ThumbnailImageCatcher::enqueue(), and Digikam::ThumbnailLoadThread::Private::makeDescriptions().

◆ load() [1/4]

void Digikam::ThumbnailLoadThread::load ( const LoadingDescription description)

Load a thumbnail. You do not need to use this method directly, it will not access the pixmap cache. Use find(). The LoadingDescription shall be constructed with the constructor for preview/thumbnail jobs. (in the description constructor, you need to specify file path, thumbnail size and Exif rotation)

Referenced by preload().

◆ load() [2/4]

void Digikam::ManagedLoadSaveThread::load ( const LoadingDescription description,
LoadingMode  loadingMode,
AccessMode  mode = AccessModeReadWrite 
)
protectedinherited

◆ load() [3/4]

◆ load() [4/4]

void Digikam::ManagedLoadSaveThread::load ( const LoadingDescription description,
LoadingPolicy  policy 
)
inherited

◆ loadingPolicy()

ManagedLoadSaveThread::LoadingPolicy Digikam::ManagedLoadSaveThread::loadingPolicy ( ) const
inherited

◆ loadingProgress()

void Digikam::LoadSaveThread::loadingProgress ( const LoadingDescription loadingDescription,
float  progress 
)
overridevirtualinherited

◆ loadPreview()

void Digikam::ManagedLoadSaveThread::loadPreview ( const LoadingDescription description,
LoadingPolicy  policy 
)
protectedinherited

◆ loadThumbnail()

◆ maximumThumbnailPixmapSize()

int Digikam::ThumbnailLoadThread::maximumThumbnailPixmapSize ( bool  withHighlighting)
static

◆ maximumThumbnailSize()

int Digikam::ThumbnailLoadThread::maximumThumbnailSize ( )
static

Returns the maximum possible size of a thumbnail. If you request a larger size, the thumbnail will not load. The size of the pixmap can slightly differ, especially when highlighting.

References Digikam::ThumbnailSize::maxThumbsSize().

Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), and Digikam::ThumbsTask::ThumbsTask().

◆ moreCompleteLoadingAvailable()

void Digikam::LoadSaveThread::moreCompleteLoadingAvailable ( const LoadingDescription oldLoadingDescription,
const LoadingDescription newLoadingDescription 
)
overridevirtualinherited

◆ notificationReceived()

◆ pixmapToThumbnailSize()

int Digikam::ThumbnailLoadThread::pixmapToThumbnailSize ( int  size) const

Computes the thumbnail size for the give pixmap size.

References Digikam::ThumbnailLoadThread::Private::thumbnailSizeForPixmapSize().

◆ pregenerateGroup() [1/2]

void Digikam::ThumbnailLoadThread::pregenerateGroup ( const QList< ThumbnailIdentifier > &  identifiers)

Pregenerate the thumbnail group. No signals will be emitted when these are loaded.

References Digikam::ThumbnailLoadThread::Private::size.

◆ pregenerateGroup() [2/2]

◆ preload() [1/2]

void Digikam::ThumbnailLoadThread::preload ( const ThumbnailIdentifier identifier)

Preload the thumbnail or thumbnail group. This is essentially the same as loading, but with a lower priority.

References Digikam::ThumbnailLoadThread::Private::size.

◆ preload() [2/2]

void Digikam::ThumbnailLoadThread::preload ( const ThumbnailIdentifier identifier,
int  size 
)

◆ preloadGroup() [1/2]

void Digikam::ThumbnailLoadThread::preloadGroup ( QList< ThumbnailIdentifier > &  identifiers)

◆ preloadGroup() [2/2]

void Digikam::ThumbnailLoadThread::preloadGroup ( QList< ThumbnailIdentifier > &  identifiers,
int  size 
)

◆ preloadThumbnail()

◆ preloadThumbnailGroup()

◆ prependThumbnailGroup()

void Digikam::ManagedLoadSaveThread::prependThumbnailGroup ( const QList< LoadingDescription > &  descriptions)
protectedinherited

◆ priority()

QThread::Priority Digikam::DynamicThread::priority ( ) const
inherited

◆ querySendNotifyEvent()

◆ run()

◆ runningFlag()

bool Digikam::DynamicThread::runningFlag ( ) const volatile
protectedinherited

◆ save() [1/2]

void Digikam::LoadSaveThread::save ( const DImg image,
const QString &  filePath,
const QString &  format 
)
inherited

Append a task to save the image to the task list

References Digikam::LoadSaveThread::m_todo, Digikam::DynamicThread::start(), and Digikam::DynamicThread::threadMutex().

◆ save() [2/2]

◆ savingProgress()

void Digikam::LoadSaveThread::savingProgress ( const QString &  filePath,
float  progress 
)
overridevirtualinherited

◆ setDisplayingWidget()

void Digikam::ThumbnailLoadThread::setDisplayingWidget ( QWidget *const  widget)
static

For color management, this sets the widget the thumbnails will be color managed for. (currently it is only possible to set one global widget)

References Digikam::IccManager::displayProfile().

Referenced by Digikam::DigikamApp::DigikamApp().

◆ setEmitSignals()

void Digikam::DynamicThread::setEmitSignals ( bool  emitThem)
inherited

◆ setHighlightPixmap()

void Digikam::ThumbnailLoadThread::setHighlightPixmap ( bool  highlight)

If you enable this, a highlighting border will be drawn around the pixmap. This option has only an effect if pixmapRequested is true. Default value: Enabled.

References Digikam::ThumbnailLoadThread::Private::highlight.

◆ setInfoProvider()

void Digikam::LoadSaveThread::setInfoProvider ( LoadSaveFileInfoProvider *const  infoProvider)
staticinherited

◆ setLoadingPolicy()

void Digikam::ManagedLoadSaveThread::setLoadingPolicy ( LoadingPolicy  policy)
inherited

Set the loading policy. Default is LoadingPolicyAppend. You can override the default value for each operation.

References Digikam::ManagedLoadSaveThread::m_loadingPolicy.

Referenced by Digikam::FacePreviewLoader::FacePreviewLoader().

◆ setNotificationPolicy()

void Digikam::LoadSaveThread::setNotificationPolicy ( NotificationPolicy  notificationPolicy)
inherited

◆ setPixmapRequested()

void Digikam::ThumbnailLoadThread::setPixmapRequested ( bool  wantPixmap)

If you enable this, the signal thumbnailLoaded(LoadingDescription, QPixmap) will be emitted. If you do not enable this, only the QImage-based signal (see LoadSaveThread) will be emitted.

If you disable this, pay attention to the (global) setting of the LoadingCache, which per default does not cache the images !!

Default value: Enabled.

References Digikam::ThumbnailLoadThread::Private::wantPixmap.

Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), DigikamGenericMetadataEditPlugin::MetadataEditDialog::MetadataEditDialog(), and Digikam::ThumbsTask::ThumbsTask().

◆ setPriority()

void Digikam::DynamicThread::setPriority ( QThread::Priority  priority)
inherited

Sets the priority for this dynamic thread. Can be set anytime. If the thread is currently not running, the priority will be set when it is run next time. When you set QThread::InheritPriority (default), the priority is not changed but inherited from the thread pool.

References Digikam::DynamicThread::priority().

Referenced by Digikam::FacePipeline::Private::applyPriority(), and Digikam::FacePipeline::Private::createThumbnailLoadThread().

◆ setSendSurrogatePixmap()

void Digikam::ThumbnailLoadThread::setSendSurrogatePixmap ( bool  send)

If you enable this, the thread will try hard to send a pixmap if thumbnail loading failed. It will use standard system icons to replace the real thumbnail. If you disable this, a null QPixmap will be sent. This does not influence the QImage-based signal; this signal will be emitted with a null QImage regardless of this setting here, if the loading failed. Default value: Enabled.

References Digikam::ThumbnailLoadThread::Private::sendSurrogate.

Referenced by ShowFoto::Showfoto::Showfoto().

◆ setTerminationPolicy()

void Digikam::ManagedLoadSaveThread::setTerminationPolicy ( TerminationPolicy  terminationPolicy)
inherited

◆ setThumbnailSize()

void Digikam::ThumbnailLoadThread::setThumbnailSize ( int  size,
bool  forFace = false 
)

NOTE: If the thread is currently loading thumbnails, there is no guarantee as to when the property change by one of the following methods takes effect. Set the requested thumbnail size. Default value: 128

References Digikam::ThumbnailLoadThread::Private::creator, Digikam::ThumbnailCreator::setThumbnailSize(), and Digikam::ThumbnailLoadThread::Private::size.

Referenced by Digikam::FacePipeline::Private::createThumbnailLoadThread(), DigikamGenericMetadataEditPlugin::MetadataEditDialog::MetadataEditDialog(), ShowFoto::Showfoto::Showfoto(), and Digikam::ThumbsTask::ThumbsTask().

◆ shutDown()

◆ signalImageLoaded

void Digikam::LoadSaveThread::signalImageLoaded ( const LoadingDescription loadingDescription,
const DImg img 
)
signalinherited

This signal is emitted when the loading process has finished. If the process failed, img is null.

Referenced by Digikam::FacePreviewLoader::FacePreviewLoader(), and Digikam::LoadSaveThread::imageLoaded().

◆ signalImageSaved

void Digikam::LoadSaveThread::signalImageSaved ( const QString &  filePath,
bool  success 
)
signalinherited

◆ signalImageStartedLoading

void Digikam::LoadSaveThread::signalImageStartedLoading ( const LoadingDescription loadingDescription)
signalinherited

All signals are delivered to the thread from where the LoadSaveThread object has been created. This thread must use its event loop to get the signals. You must connect to these signals with Qt::AutoConnection (default) or Qt::QueuedConnection. This signal is emitted when the loading process begins.

Referenced by Digikam::LoadSaveThread::imageStartedLoading().

◆ signalImageStartedSaving

void Digikam::LoadSaveThread::signalImageStartedSaving ( const QString &  filePath)
signalinherited

◆ signalLoadingProgress

void Digikam::LoadSaveThread::signalLoadingProgress ( const LoadingDescription loadingDescription,
float  progress 
)
signalinherited

This signal is emitted whenever new progress info is available and the notification policy allows emitting the signal. No progress info will be sent for preloaded images (ManagedLoadSaveThread).

Referenced by Digikam::LoadSaveThread::loadingProgress().

◆ signalMoreCompleteLoadingAvailable

void Digikam::LoadSaveThread::signalMoreCompleteLoadingAvailable ( const LoadingDescription oldLoadingDescription,
const LoadingDescription newLoadingDescription 
)
signalinherited

This signal is emitted if

  • you are doing shared loading (SharedLoadSaveThread)
  • you started a loading operation with a LoadingDescription for a reduced version of the image
  • another thread started a loading operation for a more complete version You may want to cancel the current operation and start with the given loadingDescription

Referenced by Digikam::LoadSaveThread::moreCompleteLoadingAvailable().

◆ signalSavingProgress

void Digikam::LoadSaveThread::signalSavingProgress ( const QString &  filePath,
float  progress 
)
signalinherited

◆ signalThumbnailLoaded [1/2]

void Digikam::LoadSaveThread::signalThumbnailLoaded ( const LoadingDescription loadingDescription,
const QImage &  img 
)
signalinherited

◆ signalThumbnailLoaded [2/2]

void Digikam::ThumbnailLoadThread::signalThumbnailLoaded ( const LoadingDescription loadingDescription,
const QPixmap &  pix 
)
signal

NOTE: See LoadSaveThread for a QImage-based thumbnailLoaded() signal.

◆ start [1/2]

◆ start() [2/2]

void Digikam::DynamicThread::start ( QMutexLocker &  locker)
protectedinherited

Doing the same as start(), stop() and wait above, provide it with a locked QMutexLocker on mutex(). Note the start() will unlock and relock for scheduling once, after state change.

References Digikam::ThreadManager::instance(), and Digikam::ThreadManager::schedule().

◆ starting

void Digikam::DynamicThread::starting ( )
signalinherited

Emitted if emitSignals is enabled

◆ state()

◆ stop [1/2]

◆ stop() [2/2]

void Digikam::DynamicThread::stop ( QMutexLocker &  locker)
protectedinherited

◆ stopAllTasks()

◆ stopLoading() [1/2]

void Digikam::ManagedLoadSaveThread::stopLoading ( const LoadingDescription desc,
LoadingTaskFilter  filter = LoadingTaskFilterAll 
)
inherited

Same than previous method, but Stop and remove tasks filtered by LoadingDescription.

References Digikam::DynamicThread::threadMutex().

◆ stopLoading() [2/2]

void Digikam::ManagedLoadSaveThread::stopLoading ( const QString &  filePath = QString(),
LoadingTaskFilter  filter = LoadingTaskFilterAll 
)
inherited

Stop and remove tasks filtered by filePath and policy. If filePath isNull, applies to all file paths.

References Digikam::DynamicThread::threadMutex().

Referenced by Digikam::EditorCore::load().

◆ stopSaving()

void Digikam::ManagedLoadSaveThread::stopSaving ( const QString &  filePath = QString())
inherited

◆ storeDetailThumbnail()

void Digikam::ThumbnailLoadThread::storeDetailThumbnail ( const QString &  filePath,
const QRect &  detailRect,
const QImage &  image,
bool  isFace = false 
)

Stores the given detail thumbnail on disk. Use this if possible because generation of detail thumbnails is potentially slower. The image should at least have storedSize().

References Digikam::ThumbnailLoadThread::Private::creator, and Digikam::ThumbnailCreator::storeDetailThumbnail().

Referenced by Digikam::FaceUtils::storeThumbnails().

◆ storedSize()

int Digikam::ThumbnailLoadThread::storedSize ( ) const

◆ taskHasFinished()

◆ terminationPolicy()

ManagedLoadSaveThread::TerminationPolicy Digikam::ManagedLoadSaveThread::terminationPolicy ( ) const
inherited

◆ threadMutex()

QMutex * Digikam::DynamicThread::threadMutex ( ) const
protectedinherited

◆ thumbnailCreator()

ThumbnailCreator * Digikam::ThumbnailLoadThread::thumbnailCreator ( ) const

NOTE: For internal use - may only be used from the thread.

References Digikam::ThumbnailLoadThread::Private::creator.

Referenced by Digikam::ThumbnailLoadingTask::ThumbnailLoadingTask().

◆ ThumbnailLoaded

void Digikam::ThumbnailLoadThread::ThumbnailLoaded ( const LoadingDescription ,
const QImage &   
)
signal

◆ thumbnailLoaded()

void Digikam::ThumbnailLoadThread::thumbnailLoaded ( const LoadingDescription loadingDescription,
const QImage &  img 
)
overrideprotectedvirtual

◆ thumbnailsAvailable

void Digikam::ThumbnailLoadThread::thumbnailsAvailable ( )
signal

NOTE: For internal use only.

Referenced by thumbnailLoaded(), and ThumbnailLoadThread().

◆ thumbnailToPixmapSize() [1/2]

int Digikam::ThumbnailLoadThread::thumbnailToPixmapSize ( bool  withHighlight,
int  size 
)
static

◆ thumbnailToPixmapSize() [2/2]

int Digikam::ThumbnailLoadThread::thumbnailToPixmapSize ( int  size) const

Computes the pixmap size for the give thumbnail size. These can differ when highlighting is turned on.

References Digikam::ThumbnailLoadThread::Private::pixmapSizeForThumbnailSize().

Referenced by Digikam::ItemThumbnailDelegate::updateContentWidth().

◆ wait [1/2]

◆ wait() [2/2]

void Digikam::DynamicThread::wait ( QMutexLocker &  locker)
protectedinherited

Member Data Documentation

◆ m_currentTask

◆ m_loadingPolicy

◆ m_mutex

QMutex Digikam::LoadSaveThread::m_mutex
protectedinherited

◆ m_notificationPolicy

◆ m_terminationPolicy

◆ m_todo


The documentation for this class was generated from the following files: