digiKam
Digikam::SimilarityDbAccess Class Reference

Public Member Functions

SimilarityDbBackendbackend () const
 
SimilarityDbdb () const
 
QString lastError () const
 
void setLastError (const QString &error)
 
 SimilarityDbAccess ()
 
 ~SimilarityDbAccess ()
 

Static Public Member Functions

static bool checkReadyForUse (InitializationObserver *const observer)
 
static void cleanUpDatabase ()
 
static void initDbEngineErrorHandler (DbEngineErrorHandler *const errorhandler)
 
static bool isInitialized ()
 
static DbEngineParameters parameters ()
 
static void setParameters (const DbEngineParameters &parameters)
 

Constructor & Destructor Documentation

◆ SimilarityDbAccess()

Digikam::SimilarityDbAccess::SimilarityDbAccess ( )
explicit

This class is written in analogy to CoreDbAccess (some features stripped off). For documentation, see coredbaccess.h

◆ ~SimilarityDbAccess()

Digikam::SimilarityDbAccess::~SimilarityDbAccess ( )

Member Function Documentation

◆ backend()

◆ checkReadyForUse()

bool Digikam::SimilarityDbAccess::checkReadyForUse ( InitializationObserver *const  observer)
static

This static method checks if the similarity db is ready for use.

Parameters
observerthe observer.
Returns
true, if the database is ready for use.

References Digikam::DbEngineAccess::checkReadyForUse(), setLastError(), and Digikam::SimilarityDbSchemaUpdater::setObserver().

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

◆ cleanUpDatabase()

void Digikam::SimilarityDbAccess::cleanUpDatabase ( )
static

This static method removes the connection to the similarity database.

◆ db()

◆ initDbEngineErrorHandler()

void Digikam::SimilarityDbAccess::initDbEngineErrorHandler ( DbEngineErrorHandler *const  errorhandler)
static

This static method initialises the error handler for the similarity db.

Parameters
errorhandlerThe error handler.

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

◆ isInitialized()

bool Digikam::SimilarityDbAccess::isInitialized ( )
static

This static method returns if the similarity db is initialised.

Returns
true, if the similarityDb is initialised.

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

◆ lastError()

QString Digikam::SimilarityDbAccess::lastError ( ) const

◆ parameters()

DbEngineParameters Digikam::SimilarityDbAccess::parameters ( )
static

This static method returns the current db parameters.

Returns
the current db parameters.

Referenced by Digikam::AlbumManager::setDatabase(), and setParameters().

◆ setLastError()

void Digikam::SimilarityDbAccess::setLastError ( const QString &  error)

Set the "last error" message. This method is not for public use.

Referenced by checkReadyForUse().

◆ setParameters()

void Digikam::SimilarityDbAccess::setParameters ( const DbEngineParameters parameters)
static

This static method sets the database parameters that are needed to initialise the db connection.

Parameters
parametersThe db parameters.

References parameters().

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


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