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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Digikam::CollectionImageChangeset Class Reference

## Public Types
enum | Operation { Unknown , Added , Removed , RemovedAll , Deleted , RemovedDeleted , Moved , Copied }

## Public Member Functions
| CollectionImageChangeset ()=default
| An CollectionImageChangeset covers adding and removing an image to/from the collection.
| CollectionImageChangeset (const QList< qlonglong > &ids, const QList< int > &albums, Operation operation)
| CollectionImageChangeset (const QList< qlonglong > &ids, int album, Operation operation)
| CollectionImageChangeset (qlonglong id, int album, Operation operation)
QList< int > | albums () const
bool | containsAlbum (int id) const
bool | containsImage (qlonglong id) const
QList< qlonglong > | ids () const
| Specification of this changeset.
Operation | operation () const
CollectionImageChangeset & | operator<< (const CollectionImageChangeset &other)
| Combines two CollectionImageChangesets.
CollectionImageChangeset & | operator<< (const QDBusArgument &argument)
const CollectionImageChangeset & | operator>> (QDBusArgument &argument) const

## Member Enumeration Documentation

## ◆ Operation

enum Digikam::CollectionImageChangeset::Operation

Enumerator
Added | "Added" indicates that images have been added to albums.
Removed | "Removed" indicates that an image has been removed from the given album, and has possibly set a status of Removed and a null Album (though this can already have changed to valid values), but the image-specific tables have not been removed.
RemovedAll | "RemovedAll" indicates that for all entries in the specified album, the "Removed" operation has been carried out. This is equivalent to a "Removed" changesets with all image ids in the list, but for RemovedAll, the list may not be explicitly given (may be empty).
Deleted | "Deleted" indicates that the image-specific tables have been removed from the database. While "Removed" means all data is still there, though possibly not accessible from an album, this means all data has been irreversibly deleted.
RemovedDeleted | Special combination: Images which has the "Removed" status have now been "Delete"d. A changeset with Removed or RemovedAll is guaranteed to have been sent anytime before. Image ids nor albums ids may or may be not available in any combination.
Moved | Images have been moved. This is extra information; a Removed and then an Added changeset are guaranteed to be sent subsequently. Album is the source album.
Copied | Images have been copied. This is extra information; an Added changeset is guaranteed to be sent subsequently. Album is the source album.

## Constructor & Destructor Documentation

## ◆ CollectionImageChangeset()

Digikam::CollectionImageChangeset::CollectionImageChangeset | ( |  | ) |
| default

It is described by a list of affected image ids, a list of affected albums, and an operation. Special Case "RemovedAll": If all images have been removed from an album, operation is RemovedAll, the album list contains the (now empty) albums, ids() is empty, but containsImage() always returns true. Special Case "RemovedDeleted": Images with the "Removed" status are now irreversibly deleted. ids() and/or albums() may be empty (this means information is not available).

## Member Function Documentation

## ◆ ids()

QList< qlonglong > Digikam::CollectionImageChangeset::ids | ( |  | ) | const

All special cases where the returned list may be empty are noted above. The lists are valid unless such a case is explicitly mentioned.

## ◆ operator<<()

CollectionImageChangeset & Digikam::CollectionImageChangeset::operator<< | ( | const CollectionImageChangeset & | other | ) |

The operations shall not differ between the two sets; the operation is set to Unknown if it differs. This is especially not suitable for RemovedAll changesets.