digiKam
Digikam::ThumbsDb Class Reference

Public Member Functions

QList< int > findAll ()
 
ThumbsDbInfo findByCustomIdentifier (const QString &id)
 
ThumbsDbInfo findByFilePath (const QString &path)
 
ThumbsDbInfo findByFilePath (const QString &path, const QString &uniqueHash)
 
ThumbsDbInfo findByHash (const QString &uniqueHash, qlonglong fileSize)
 
QHash< QString, int > getFilePathsWithThumbnail ()
 
QString getLegacySetting (const QString &keyword)
 
QString getSetting (const QString &keyword)
 
BdEngineBackend::QueryState insertCustomIdentifier (const QString &id, int thumbId)
 
BdEngineBackend::QueryState insertFilePath (const QString &path, int thumbId)
 
BdEngineBackend::QueryState insertThumbnail (const ThumbsDbInfo &info, QVariant *const lastInsertId=nullptr)
 
BdEngineBackend::QueryState insertUniqueHash (const QString &uniqueHash, qlonglong fileSize, int thumbId)
 
bool integrityCheck ()
 
BdEngineBackend::QueryState remove (int thumbId)
 
BdEngineBackend::QueryState removeByCustomIdentifier (const QString &id)
 
BdEngineBackend::QueryState removeByFilePath (const QString &path)
 
BdEngineBackend::QueryState removeByUniqueHash (const QString &uniqueHash, qlonglong fileSize)
 
BdEngineBackend::QueryState renameByFilePath (const QString &oldPath, const QString &newPath)
 
BdEngineBackend::QueryState replaceThumbnail (const ThumbsDbInfo &info)
 
void replaceUniqueHash (const QString &oldUniqueHash, int oldFileSize, const QString &newUniqueHash, int newFileSize)
 
bool setSetting (const QString &keyword, const QString &value)
 
BdEngineBackend::QueryState updateModificationDate (int thumbId, const QDateTime &modificationDate)
 
void vacuum ()
 

Friends

class ThumbsDbAccess
 

Member Function Documentation

◆ findAll()

QList< int > Digikam::ThumbsDb::findAll ( )

Returns the thumbnail ids of all thumbnails in the database.

Referenced by Digikam::DatabaseTask::run().

◆ findByCustomIdentifier()

ThumbsDbInfo Digikam::ThumbsDb::findByCustomIdentifier ( const QString &  id)

◆ findByFilePath() [1/2]

ThumbsDbInfo Digikam::ThumbsDb::findByFilePath ( const QString &  path)

◆ findByFilePath() [2/2]

ThumbsDbInfo Digikam::ThumbsDb::findByFilePath ( const QString &  path,
const QString &  uniqueHash 
)

This is findByFilePath with extra security: Pass the uniqueHash which you have. If an entry is found by file path, and the entry is referenced by any uniqueHash, which is different from the given hash, a null info is returned. If uniqueHash is null, equivalent to the simple findByFilePath.

References Digikam::ThumbsDbInfo::data, and Digikam::ThumbsDbInfo::id.

◆ findByHash()

ThumbsDbInfo Digikam::ThumbsDb::findByHash ( const QString &  uniqueHash,
qlonglong  fileSize 
)

◆ getFilePathsWithThumbnail()

QHash< QString, int > Digikam::ThumbsDb::getFilePathsWithThumbnail ( )

◆ getLegacySetting()

QString Digikam::ThumbsDb::getLegacySetting ( const QString &  keyword)

◆ getSetting()

QString Digikam::ThumbsDb::getSetting ( const QString &  keyword)

◆ insertCustomIdentifier()

BdEngineBackend::QueryState Digikam::ThumbsDb::insertCustomIdentifier ( const QString &  id,
int  thumbId 
)

◆ insertFilePath()

BdEngineBackend::QueryState Digikam::ThumbsDb::insertFilePath ( const QString &  path,
int  thumbId 
)

◆ insertThumbnail()

BdEngineBackend::QueryState Digikam::ThumbsDb::insertThumbnail ( const ThumbsDbInfo info,
QVariant *const  lastInsertId = nullptr 
)

◆ insertUniqueHash()

BdEngineBackend::QueryState Digikam::ThumbsDb::insertUniqueHash ( const QString &  uniqueHash,
qlonglong  fileSize,
int  thumbId 
)

◆ integrityCheck()

bool Digikam::ThumbsDb::integrityCheck ( )

Returns true if the integrity of the database is preserved.

◆ remove()

BdEngineBackend::QueryState Digikam::ThumbsDb::remove ( int  thumbId)

◆ removeByCustomIdentifier()

BdEngineBackend::QueryState Digikam::ThumbsDb::removeByCustomIdentifier ( const QString &  id)

◆ removeByFilePath()

BdEngineBackend::QueryState Digikam::ThumbsDb::removeByFilePath ( const QString &  path)

Removes thumbnail data associated to the given file path

◆ removeByUniqueHash()

BdEngineBackend::QueryState Digikam::ThumbsDb::removeByUniqueHash ( const QString &  uniqueHash,
qlonglong  fileSize 
)

Removes thumbnail data associated to the given uniqueHash/fileSize

◆ renameByFilePath()

BdEngineBackend::QueryState Digikam::ThumbsDb::renameByFilePath ( const QString &  oldPath,
const QString &  newPath 
)

◆ replaceThumbnail()

◆ replaceUniqueHash()

void Digikam::ThumbsDb::replaceUniqueHash ( const QString &  oldUniqueHash,
int  oldFileSize,
const QString &  newUniqueHash,
int  newFileSize 
)

◆ setSetting()

bool Digikam::ThumbsDb::setSetting ( const QString &  keyword,
const QString &  value 
)

References value.

◆ updateModificationDate()

BdEngineBackend::QueryState Digikam::ThumbsDb::updateModificationDate ( int  thumbId,
const QDateTime &  modificationDate 
)

◆ vacuum()

void Digikam::ThumbsDb::vacuum ( )

Shrinks the database.

Referenced by Digikam::DatabaseTask::run().

Friends And Related Function Documentation

◆ ThumbsDbAccess

friend class ThumbsDbAccess
friend

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