| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Digikam::DbKeysCollection Class Referenceabstract

A class for managing / grouping database keys. More...

Inheritance diagram for Digikam::DbKeysCollection:

## Public Member Functions
| DbKeysCollection (const QString &n)
| Default constructor.
QString | collectionName () const
| Get the name of the DbKeysCollection.
QString | getValue (const QString &key, ParseSettings &settings)
| Get a value from the database.
DbKeyIdsMap | ids () const
| Get all IDs associated with this key collection.

## Protected Member Functions
void | addId (const QString &id, const QString &description)
| Add an ID to the key collection.
virtual QString | getDbValue (const QString &key, ParseSettings &settings)=0
| Abstract method for retrieving the value from the database for the given key.

## Detailed Description

This class manages database keys and provides methods to get the appropriate value from the database.

## Constructor & Destructor Documentation

## ◆ DbKeysCollection()

Digikam::DbKeysCollection::DbKeysCollection | ( | const QString & | n | ) |
| explicit

Parameters

  n | collection name

## Member Function Documentation

## ◆ addId()

void Digikam::DbKeysCollection::addId | ( | const QString & | id,
|  | const QString & | description
| ) |  |
| protected

Parameters

  id | the id of the database key
  description | a short description of the database key

## ◆ collectionName()

QString Digikam::DbKeysCollection::collectionName | ( |  | ) | const

Returns
  the name of the collection

## ◆ getDbValue()

virtual QString Digikam::DbKeysCollection::getDbValue | ( | const QString & | key,
|  | ParseSettings & | settings
| ) |  |
| protected pure virtual

This method has to be implemented by all child classes. It is called by the getValue() method.

Parameters

  key | the key representing the value in the database
  settings | the ParseSettings object holding all relevant information about the image.

Returns
  the value of the given database key

See also
  DbKeysCollection::getValue()

Implemented in Digikam::CommonKeys, Digikam::MetadataKeys, and Digikam::PositionKeys.

## ◆ getValue()

QString Digikam::DbKeysCollection::getValue | ( | const QString & | key,
|  | ParseSettings & | settings
| ) |  |

Parameters

  key | the key representing the value in the database
  settings | the ParseSettings object holding all relevant information about the image.

Returns
  the value of the given database key

## ◆ ids()

DbKeyIdsMap Digikam::DbKeysCollection::ids | ( |  | ) | const

Returns
  a map of all associated ids and their description