digiKam
|
Public Types | |
enum | CopyrightPropertyUnique { PropertyUnique , PropertyExtraValueUnique , PropertyNoConstraint } |
enum | ItemSortOrder { NoItemSorting , ByItemName , ByItemPath , ByItemDate , ByItemRating } |
Public Member Functions | |
int | addAlbum (int albumRootId, const QString &relativePath, const QString &caption, const QDate &date, const QString &collection) const |
int | addAlbumRoot (AlbumRoot::Type type, const QString &identifier, const QString &specificPath, const QString &label) const |
void | addImageMetadata (qlonglong imageID, const QVariantList &infos, DatabaseFields::ImageMetadata fields=DatabaseFields::ImageMetadataAll) |
void | addImageRelation (const ImageRelation &relation) |
void | addImageRelation (qlonglong subjectId, qlonglong objectId, DatabaseRelation::Type type) |
void | addImageRelations (const QList< qlonglong > &subjectIds, const QList< qlonglong > &objectIds, DatabaseRelation::Type type) |
void | addImageTagProperty (const ImageTagProperty &property) |
void | addImageTagProperty (qlonglong imageId, int tagId, const QString &property, const QString &value) |
qlonglong | addItem (int albumID, const QString &name, DatabaseItem::Status status, DatabaseItem::Category category, const QDateTime &modificationDate, qlonglong fileSize, const QString &uniqueHash) const |
void | addItemInformation (qlonglong imageID, const QVariantList &infos, DatabaseFields::ItemInformation fields=DatabaseFields::ItemInformationAll) |
void | addItemPosition (qlonglong imageID, const QVariantList &infos, DatabaseFields::ItemPositions fields=DatabaseFields::ItemPositionsAll) |
void | addItemTag (int albumID, const QString &name, int tagID) |
void | addItemTag (qlonglong imageID, int tagID, bool newTag=false) |
int | addSearch (DatabaseSearch::Type type, const QString &name, const QString &query) const |
int | addTag (int parentTagID, const QString &name, const QString &iconKDE, qlonglong iconID) const |
void | addTagProperty (const TagProperty &property) |
void | addTagProperty (int tagId, const QString &property, const QString &value) |
void | addTagsToItems (QList< qlonglong > imageIDs, QList< int > tagIDs) |
int | addToDownloadHistory (const QString &identifier, const QString &name, qlonglong fileSize, const QDateTime &date) const |
void | addVideoMetadata (qlonglong imageID, const QVariantList &infos, DatabaseFields::VideoMetadata fields=DatabaseFields::VideoMetadataAll) |
void | changeAlbumRootType (int rootId, AlbumRoot::Type newType) |
void | changeImageComment (int commentId, qlonglong imageID, const QVariantList &infos, DatabaseFields::ItemComments fields=DatabaseFields::ItemCommentsAll) |
void | changeImageMetadata (qlonglong imageID, const QVariantList &infos, DatabaseFields::ImageMetadata fields=DatabaseFields::ImageMetadataAll) |
void | changeItemInformation (qlonglong imageID, const QVariantList &infos, DatabaseFields::ItemInformation fields=DatabaseFields::ItemInformationAll) |
void | changeItemPosition (qlonglong imageID, const QVariantList &infos, DatabaseFields::ItemPositions fields=DatabaseFields::ItemPositionsAll) |
void | changeVideoMetadata (qlonglong imageID, const QVariantList &infos, DatabaseFields::VideoMetadata fields=DatabaseFields::VideoMetadataAll) |
void | clearMetadataFromImage (qlonglong imageID) |
bool | copyAlbumProperties (int srcAlbumID, int dstAlbumID) const |
void | copyImageAttributes (qlonglong srcId, qlonglong destId) |
void | copyImageProperties (qlonglong srcId, qlonglong dstId) |
void | copyImageTags (qlonglong srcId, qlonglong dstId) |
int | copyItem (int srcAlbumID, const QString &srcName, int dstAlbumID, const QString &dstName) |
CoreDB (CoreDbBackend *const backend) | |
QUuid | databaseUuid () |
void | deleteAlbum (int albumID) |
void | deleteAlbumRoot (int rootId) |
void | deleteItem (int albumID, const QString &file) |
void | deleteItem (qlonglong imageId) |
void | deleteObsoleteItem (qlonglong imageId) |
void | deleteRemovedItems () |
void | deleteSearch (int searchID) |
void | deleteSearches (DatabaseSearch::Type type) |
void | deleteStaleAlbums () |
void | deleteTag (int tagID) |
QList< qlonglong > | findByNameAndCreationDate (const QString &fileName, const QDateTime &creationDate) const |
qlonglong | findImageId (int albumID, const QString &name, DatabaseItem::Status status, DatabaseItem::Category category, qlonglong fileSize, const QString &uniqueHash) const |
int | findInDownloadHistory (const QString &identifier, const QString &name, qlonglong fileSize, const QDateTime &date) const |
QList< int > | getAlbumAndSubalbumsForPath (int albumRootId, const QString &relativePath) const |
QDate | getAlbumAverageDate (int albumID) const |
int | getAlbumForPath (int albumRootId, const QString &relativePath, bool create=true) const |
QDate | getAlbumHighestDate (int albumID) const |
QDate | getAlbumLowestDate (int albumID) const |
QDateTime | getAlbumModificationDate (int albumID) const |
QMap< QString, QDateTime > | getAlbumModificationMap (int albumRootId) const |
QString | getAlbumRelativePath (int albumID) const |
int | getAlbumRootId (int albumID) const |
QList< AlbumRootInfo > | getAlbumRoots () const |
QList< AlbumShortInfo > | getAlbumShortInfos () const |
QList< int > | getAlbumsOnAlbumRoot (int albumRootId) const |
QVariantList | getAllCreationDates () const |
QList< qlonglong > | getAllItems () const |
QHash< qlonglong, QPair< int, int > > | getAllItemsWithAlbum () const |
QStringList | getDirtyOrMissingFaceImageUrls () const |
void | getFilterSettings (QStringList *imageFilter, QStringList *videoFilter, QStringList *audioFilter) |
QMap< QString, int > | getFormatStatistics () const |
QMap< QString, int > | getFormatStatistics (DatabaseItem::Category category) const |
QList< ItemScanInfo > | getIdenticalFiles (const QString &uniqueHash, qlonglong fileSize, qlonglong sourceId=-1) const |
QList< ItemScanInfo > | getIdenticalFiles (qlonglong id) const |
void | getIgnoreDirectoryFilterSettings (QStringList *ignoreDirectoryFilter) |
qlonglong | getImageId (int albumID, const QString &name) const |
QList< qlonglong > | getImageIds (DatabaseItem::Status status) const |
QList< qlonglong > | getImageIds (DatabaseItem::Status status, DatabaseItem::Category category) const |
QList< qlonglong > | getImageIds (int albumID, const QString &name, DatabaseItem::Status status) const |
QList< QVariant > | getImageIdsFromArea (qreal lat1, qreal lat2, qreal lng1, qreal lng2, int sortMode, const QString &sortBy) const |
QVariantList | getImageMetadata (qlonglong imageID, DatabaseFields::ImageMetadata metadataFields=DatabaseFields::ImageMetadataAll) const |
QString | getImageProperty (qlonglong imageID, const QString &property) const |
QVariantList | getImagesFields (qlonglong imageID, DatabaseFields::Images imagesFields) const |
QVector< QList< qlonglong > > | getImagesRelatedFrom (const QList< qlonglong > &subjectIds, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
QList< qlonglong > | getImagesRelatedFrom (qlonglong subjectId, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
QVector< QList< qlonglong > > | getImagesRelatingTo (const QList< qlonglong > &objectIds, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
QList< qlonglong > | getImagesRelatingTo (qlonglong objectId, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
QList< qlonglong > | getImagesWithImageTagProperty (int tagId, const QString &property) const |
QList< qlonglong > | getImagesWithProperty (const QString &property) const |
QList< ImageTagProperty > | getImageTagProperties (qlonglong imageId, int tagId=-1) const |
QString | getImageUuid (qlonglong imageId) const |
int | getItemAlbum (qlonglong imageID) const |
QList< CommentInfo > | getItemComments (qlonglong imageID) const |
QList< int > | getItemCommonTagIDs (const QList< qlonglong > &imageIDList) const |
QList< CopyrightInfo > | getItemCopyright (qlonglong imageID, const QString &property=QString()) const |
qlonglong | getItemFromAlbum (int albumID, const QString &fileName) const |
ImageHistoryEntry | getItemHistory (qlonglong imageId) const |
QMap< qlonglong, QString > | getItemIDsAndURLsInAlbum (int albumID) const |
QList< qlonglong > | getItemIDsInAlbum (int albumID) const |
QList< qlonglong > | getItemIDsInTag (int tagID, bool recursive=false) const |
QVariantList | getItemInformation (qlonglong imageID, DatabaseFields::ItemInformation infoFields=DatabaseFields::ItemInformationAll) const |
QString | getItemName (qlonglong imageID) const |
QStringList | getItemNamesInAlbum (int albumID, bool recursive=false) const |
QVariantList | getItemPosition (qlonglong imageID, DatabaseFields::ItemPositions positionFields=DatabaseFields::ItemPositionsAll) const |
QVariantList | getItemPositions (QList< qlonglong > imageIDs, DatabaseFields::ItemPositions fields) const |
ItemScanInfo | getItemScanInfo (qlonglong imageID) const |
QList< ItemScanInfo > | getItemScanInfos (int albumID) const |
QList< qlonglong > | getItemsForUuid (const QString &uuid) const |
ItemShortInfo | getItemShortInfo (int albumRootId, const QString &relativePath, const QString &name) const |
ItemShortInfo | getItemShortInfo (qlonglong imageID) const |
QVector< QList< int > > | getItemsTagIDs (const QList< qlonglong > &imageIds) const |
QStringList | getItemsURLsWithTag (int tagId) const |
QList< int > | getItemTagIDs (qlonglong imageID) const |
QStringList | getItemTagNames (qlonglong imageID) const |
QStringList | getItemURLsInAlbum (int albumID, ItemSortOrder order=NoItemSorting) const |
QStringList | getItemURLsInTag (int tagID, bool recursive=false) const |
QStringList | getListFromImageMetadata (DatabaseFields::ImageMetadata field) const |
QPair< int, int > | getNumberOfAllItemsAndAlbums (int albumID) const |
QMap< int, int > | getNumberOfImagesInAlbums () const |
QMap< int, int > | getNumberOfImagesInTagProperties (const QString &property) const |
int | getNumberOfImagesInTagProperties (int tagId, const QString &property) const |
QMap< int, int > | getNumberOfImagesInTags () const |
int | getNumberOfItemsInAlbum (int albumID) const |
QList< qlonglong > | getObsoleteItemIds () const |
QList< qlonglong > | getOneRelatedImageEach (const QList< qlonglong > &ids, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
QList< int > | getRecentlyAssignedTags () const |
QList< qlonglong > | getRelatedImagesToByType (DatabaseRelation::Type type) const |
QList< QPair< qlonglong, qlonglong > > | getRelationCloud (qlonglong imageId, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
SearchInfo | getSearchInfo (int searchId) const |
QString | getSearchQuery (int searchId) const |
QString | getSetting (const QString &keyword) const |
QList< int > | getTagIdsWithProperties (qlonglong imageId) const |
TagInfo | getTagInfo (int tagId) const |
QList< TagProperty > | getTagProperties () const |
QList< TagProperty > | getTagProperties (const QString &property) const |
QList< TagProperty > | getTagProperties (int tagID) const |
QList< TagShortInfo > | getTagShortInfos () const |
QList< int > | getTagsWithProperty (const QString &property) const |
int | getUniqueHashVersion () const |
void | getUserFilterSettings (QString *imageFilterString, QString *videoFilterString, QString *audioFilterString) |
void | getUserIgnoreDirectoryFilterSettings (QString *ignoreDirectoryFilterString) |
QVariantList | getVideoMetadata (qlonglong imageID, DatabaseFields::VideoMetadata metadataFields=DatabaseFields::VideoMetadataAll) const |
bool | hasImageHistory (qlonglong imageId) const |
bool | hasImagesRelatedFrom (qlonglong subjectId, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
bool | hasImagesRelatingTo (qlonglong objectId, DatabaseRelation::Type type=DatabaseRelation::UndefinedType) const |
bool | hasTags (const QList< qlonglong > &imageIDList) const |
bool | integrityCheck () const |
bool | isUniqueHashV2 () const |
void | makeStaleAlbum (int albumID) |
void | migrateAlbumRoot (int rootId, const QString &identifier) |
void | moveItem (int srcAlbumID, const QString &srcName, int dstAlbumID, const QString &dstName) |
QList< qlonglong > | removeAllImageRelationsFrom (qlonglong subjectId, DatabaseRelation::Type type) const |
QList< qlonglong > | removeAllImageRelationsTo (qlonglong objectId, DatabaseRelation::Type type) const |
void | removeImageComment (int commentId, qlonglong imageid) |
void | removeImageProperty (qlonglong imageID, const QString &property) |
void | removeImagePropertyByName (const QString &property) |
void | removeImageRelation (const ImageRelation &relation) |
void | removeImageRelation (qlonglong subjectId, qlonglong objectId, DatabaseRelation::Type type) |
void | removeImageTagProperties (qlonglong imageId, int tagId=-1, const QString &property=QString(), const QString &value=QString()) |
void | removeItemAllTags (qlonglong imageID, const QList< int > ¤tTagIds) |
void | removeItemCopyrightProperties (qlonglong imageID, const QString &property=QString(), const QString &extraValue=QString(), const QString &value=QString()) |
void | removeItemPosition (qlonglong imageid) |
void | removeItemPositionAltitude (qlonglong imageid) |
void | removeItems (QList< qlonglong > itemIDs, const QList< int > &albumIDs=QList< int >()) |
void | removeItemsFromAlbum (int albumID, const QList< qlonglong > &ids_forInformation=QList< qlonglong >()) |
void | removeItemsPermanently (QList< qlonglong > itemIDs, const QList< int > &albumIDs=QList< int >()) |
void | removeItemTag (qlonglong imageID, int tagID) |
void | removeTagProperties (int tagId, const QString &property=QString(), const QString &value=QString()) |
void | removeTagsFromItems (QList< qlonglong > imageIDs, const QList< int > &tagIDs) |
void | renameAlbum (int albumID, int newAlbumRootId, const QString &newRelativePath) |
void | renameItem (qlonglong imageID, const QString &newName) |
AlbumInfo::List | scanAlbums () const |
SearchInfo::List | scanSearches () const |
TagInfo::List | scanTags () const |
void | setAlbumCaption (int albumID, const QString &caption) |
void | setAlbumCategory (int albumID, const QString &category) |
void | setAlbumDate (int albumID, const QDate &date) |
void | setAlbumIcon (int albumID, qlonglong iconID) |
void | setAlbumModificationDate (int albumID, const QDateTime &modificationDate) |
void | setAlbumRootLabel (int rootId, const QString &newLabel) |
void | setAlbumRootPath (int rootId, const QString &newPath) |
void | setFilterSettings (const QStringList &imageFilter, const QStringList &videoFilter, const QStringList &audioFilter) |
void | setIgnoreDirectoryFilterSettings (const QStringList &ignoreDirectoryFilter) |
int | setImageComment (qlonglong imageID, const QString &comment, DatabaseComment::Type type, const QString &language=QString(), const QString &author=QString(), const QDateTime &date=QDateTime()) const |
void | setImageProperty (qlonglong imageID, const QString &property, const QString &value) |
void | setImageUuid (qlonglong imageId, const QString &uuid) |
void | setItemAlbum (qlonglong imageID, qlonglong albumId) |
void | setItemCopyrightProperty (qlonglong imageID, const QString &property, const QString &value, const QString &extraValue=QString(), CopyrightPropertyUnique uniqueness=PropertyUnique) |
void | setItemHistory (qlonglong imageId, const QString &history) |
void | setItemManualOrder (qlonglong imageID, qlonglong value) |
void | setItemModificationDate (qlonglong imageID, const QDateTime &modificationDate) |
void | setItemStatus (qlonglong imageID, DatabaseItem::Status status) |
void | setSetting (const QString &keyword, const QString &value) |
void | setTagIcon (int tagID, const QString &iconKDE, qlonglong iconID) |
void | setTagName (int tagID, const QString &name) |
void | setTagParentID (int tagID, int newParentTagID) |
void | setUniqueHashVersion (int version) |
void | setUserFilterSettings (const QStringList &imageFilter, const QStringList &videoFilter, const QStringList &audioFilter) |
void | setUserIgnoreDirectoryFilterSettings (const QStringList &ignoreDirectoryFilters) |
void | updateItem (qlonglong imageID, DatabaseItem::Category category, const QDateTime &modificationDate, qlonglong fileSize, const QString &uniqueHash) |
void | updateSearch (int searchID, DatabaseSearch::Type type, const QString &name, const QString &query) |
void | vacuum () |
~CoreDB () | |
Static Public Member Functions | |
static void | addBoundValuePlaceholders (QString &query, int count) |
static QStringList | imageCommentsFieldList (DatabaseFields::ItemComments fields) |
static QStringList | imageInformationFieldList (DatabaseFields::ItemInformation fields) |
static QStringList | imageMetadataFieldList (DatabaseFields::ImageMetadata fields) |
static QStringList | imagePositionsFieldList (DatabaseFields::ItemPositions fields) |
static QStringList | imagesFieldList (DatabaseFields::Images fields) |
static QStringList | videoMetadataFieldList (DatabaseFields::VideoMetadata fields) |
Protected Member Functions | |
QVector< QList< qlonglong > > | getRelatedImages (QList< qlonglong > ids, bool fromOrTo, DatabaseRelation::Type type, bool boolean) const |
QList< qlonglong > | getRelatedImages (qlonglong id, bool fromOrTo, DatabaseRelation::Type type, bool boolean) const |
Friends | |
class | Digikam::CoreDbAccess |
|
explicit |
Constructor
Digikam::CoreDB::~CoreDB | ( | ) |
Destructor
int Digikam::CoreDB::addAlbum | ( | int | albumRootId, |
const QString & | relativePath, | ||
const QString & | caption, | ||
const QDate & | date, | ||
const QString & | collection | ||
) | const |
Add a new album to the database with the given attributes
albumRootId | id of the album root of the new album |
relativePath | url of the album |
caption | the album caption |
date | the date for the album |
collection | the album collection |
References Digikam::AlbumChangeset::Added.
Referenced by Digikam::CollectionScanner::checkAlbum(), Digikam::AlbumManager::createPAlbum(), and getAlbumForPath().
int Digikam::CoreDB::addAlbumRoot | ( | AlbumRoot::Type | type, |
const QString & | identifier, | ||
const QString & | specificPath, | ||
const QString & | label | ||
) | const |
Add a new album to the database with the given attributes
type | The type of the album root |
specificPath | The path specific to volume |
label | An (optional) user-visible label |
References Digikam::AlbumRootChangeset::Added.
|
static |
Referenced by Digikam::FieldQueryBuilder::addChoiceIntField(), Digikam::FieldQueryBuilder::addChoiceStringField(), addImageMetadata(), addItemInformation(), addItemPosition(), Digikam::FieldQueryBuilder::addLongListField(), addVideoMetadata(), Digikam::ItemQueryBuilder::buildField(), and Digikam::ItemLister::listPAlbum().
void Digikam::CoreDB::addImageMetadata | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ImageMetadata | fields = DatabaseFields::ImageMetadataAll |
||
) |
Add (or replace) the ImageMetadata of the specified item. If there is already an entry, it will be discarded. The QVariantList shall have at most 16 entries, of types as defined in the DBSCHEMA and in metadatainfo.h, in this order: 0) String make 1) String model 2) String lens 3) Double aperture 4) Double focalLength 5) Double focalLength35 6) Double exposureTime 7) Int exposureProgram 8) Int exposureMode 9) Int sensitivity 10) Int flash 11) Int WhiteBalance 12) Int WhiteBalanceColorTemperature 13) Int meteringMode 14) Double subjectDistance 15) Double subjectDistanceCategory You can leave out entries from this list. Indicate the values that you have passed in the ImageMetadata flag in the third parameters.
References addBoundValuePlaceholders(), imageMetadataFieldList(), and Digikam::DatabaseFields::ImageMetadataNone.
Referenced by Digikam::ItemScanner::commitImageMetadata().
void Digikam::CoreDB::addImageRelation | ( | const ImageRelation & | relation | ) |
void Digikam::CoreDB::addImageRelation | ( | qlonglong | subjectId, |
qlonglong | objectId, | ||
DatabaseRelation::Type | type | ||
) |
Adds an image relation entry.
References Digikam::DatabaseFields::ImageRelations.
Referenced by addImageRelation(), Digikam::ItemInfo::addToGroup(), and Digikam::ItemInfo::markDerivedFrom().
void Digikam::CoreDB::addImageRelations | ( | const QList< qlonglong > & | subjectIds, |
const QList< qlonglong > & | objectIds, | ||
DatabaseRelation::Type | type | ||
) |
This method requires two lists of same size and will add list1[0]->list2[0],...,list1[n]->list2[n]
References Digikam::DatabaseFields::ImageRelations.
Referenced by Digikam::ItemScanner::resolveImageHistory().
void Digikam::CoreDB::addImageTagProperty | ( | const ImageTagProperty & | property | ) |
void Digikam::CoreDB::addImageTagProperty | ( | qlonglong | imageId, |
int | tagId, | ||
const QString & | property, | ||
const QString & | value | ||
) |
Adds a tag property. Note that this never replaces existing entries. It is also all right to add multiple entries for a tag with the same property. To replace an existing entry, remove the entry before.
References Digikam::ImageTagChangeset::PropertiesChanged, and value.
Referenced by addImageTagProperty(), Digikam::ItemTagPair::addProperty(), and Digikam::ItemTagPair::setProperty().
qlonglong Digikam::CoreDB::addItem | ( | int | albumID, |
const QString & | name, | ||
DatabaseItem::Status | status, | ||
DatabaseItem::Category | category, | ||
const QDateTime & | modificationDate, | ||
qlonglong | fileSize, | ||
const QString & | uniqueHash | ||
) | const |
Put a new item in the database or replace an existing one.
References Digikam::CollectionImageChangeset::Added, and Digikam::DatabaseFields::ImagesAll.
Referenced by Digikam::ItemScanner::commitAddImage().
void Digikam::CoreDB::addItemInformation | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ItemInformation | fields = DatabaseFields::ItemInformationAll |
||
) |
Add (or replace) the ItemInformation of the specified item. If there is already an entry, it will be discarded. The QVariantList shall have 9 entries, of types in this order: 0) Int rating 1) DateTime* creationDate 2) DateTime* digitizationDate 3) Int orientation 4) Int width 5) Int height 6) String format 7) Int colorDepth 8) Int colorModel ( (*) You can provide the date also as a string in the format Qt::IsoDate) You can leave out entries from this list, which will then be filled with null values. Indicate the values that you have passed in the ItemInformation flag in the third parameters.
References addBoundValuePlaceholders(), imageInformationFieldList(), and Digikam::DatabaseFields::ItemInformationNone.
Referenced by Digikam::ItemScanner::commitItemInformation().
void Digikam::CoreDB::addItemPosition | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ItemPositions | fields = DatabaseFields::ItemPositionsAll |
||
) |
Add (or replace) the ItemPosition of the specified item. If there is already an entry, it will be discarded. The QVariantList shall have at most 10 entries, of types in this order: 0) String Latitude 1) Double LatitudeNumber 2) String Longitude 3) Double LongitudeNumber 4) Double Altitude 5) Double Orientation 6) Double Tilt 7) Double Roll 8) Double Accuracy 9) String Description You can leave out entries from this list. Indicate the values that you have passed in the ItemInfo flag in the third parameters.
References addBoundValuePlaceholders(), imagePositionsFieldList(), and Digikam::DatabaseFields::ItemPositionsNone.
Referenced by Digikam::ItemPosition::apply(), Digikam::ItemScanner::commitItemPosition(), and Digikam::CollectionScanner::copyFileProperties().
void Digikam::CoreDB::addItemTag | ( | int | albumID, |
const QString & | name, | ||
int | tagID | ||
) |
Add a tag for the item
albumID | the albumID of the item |
name | the name of the item |
tagID | the tagID for the tag |
References addItemTag(), and getImageId().
void Digikam::CoreDB::addItemTag | ( | qlonglong | imageID, |
int | tagID, | ||
bool | newTag = false |
||
) |
Add a tag for the item
imageID | the ID of the item |
tagID | the tagID for the tag |
newTag | add to last assigned tag list |
References Digikam::ImageTagChangeset::Added, and Digikam::TagsCache::instance().
Referenced by addItemTag(), Digikam::ItemScanner::commitImageHistory(), Digikam::ItemScanner::resolveImageHistory(), and Digikam::ItemInfo::setTag().
int Digikam::CoreDB::addSearch | ( | DatabaseSearch::Type | type, |
const QString & | name, | ||
const QString & | query | ||
) | const |
Add a new search to the database with the given attributes
type | search type |
name | name of the search |
query | search query to use |
References Digikam::SearchChangeset::Added.
Referenced by Digikam::AlbumManager::createSAlbum(), and Digikam::HaarIface::rebuildDuplicatesAlbums().
int Digikam::CoreDB::addTag | ( | int | parentTagID, |
const QString & | name, | ||
const QString & | iconKDE, | ||
qlonglong | iconID | ||
) | const |
Adds a new tag to the database with given name, icon and parent id.
parentTagID | the id of the tag which will become the new tags parent |
name | the name of the tag |
iconKDE | the name of the icon file (this is filename which kde iconloader can load up) |
iconID | the id of the icon file Note: if the iconKDE parameter is empty, then the iconID parameter is used |
References Digikam::TagChangeset::Added, and Digikam::BdEngineBackend::NoErrors.
Referenced by Digikam::TagsCache::createTag(), and Digikam::AlbumManager::createTAlbum().
void Digikam::CoreDB::addTagProperty | ( | const TagProperty & | property | ) |
void Digikam::CoreDB::addTagProperty | ( | int | tagId, |
const QString & | property, | ||
const QString & | value | ||
) |
Adds a tag property. Note that this never replaces existing entries. It is also all right to add multiple entries for a tag with the same property. To replace an existing entry, remove the entry before.
References Digikam::TagChangeset::PropertiesChanged, and value.
Referenced by Digikam::TagProperties::addProperty(), addTagProperty(), and Digikam::TagProperties::setProperty().
Add each tag of a list of tags to each member of a list of items.
References Digikam::ImageTagChangeset::Added.
Referenced by Digikam::ItemInfo::addTagPaths(), Digikam::ItemScanner::commitTags(), Digikam::CollectionScanner::itemsWereRemoved(), Digikam::ItemGPS::saveChanges(), and Digikam::ItemScanner::tagItemHistoryGraph().
int Digikam::CoreDB::addToDownloadHistory | ( | const QString & | identifier, |
const QString & | name, | ||
qlonglong | fileSize, | ||
const QDateTime & | date | ||
) | const |
Add the specified fingerprint to the download history table. Returns the id of the entry.
Referenced by Digikam::CoreDbDownloadHistory::setDownloaded().
void Digikam::CoreDB::addVideoMetadata | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::VideoMetadata | fields = DatabaseFields::VideoMetadataAll |
||
) |
Add (or replace) the VideoMetadata of the specified item. If there is already an entry, it will be discarded. The QVariantList shall have 8 entries, of types in this order: 0) String AspectRatio 1) String AudioBitRate 2) String AudioChannelType 3) String AudioCodec 4) String Duration 5) String FrameRate 6) String VideoCodec You can leave out entries from this list, which will then be filled with null values. Indicate the values that you have passed in the VideoMetadata flag in the third parameters.
References addBoundValuePlaceholders(), videoMetadataFieldList(), and Digikam::DatabaseFields::VideoMetadataNone.
Referenced by Digikam::ItemScanner::commitVideoMetadata().
void Digikam::CoreDB::changeAlbumRootType | ( | int | rootId, |
AlbumRoot::Type | newType | ||
) |
Sets the type of the specified album root to a new value.
References Digikam::AlbumRootChangeset::PropertiesChanged.
Referenced by Digikam::CollectionManager::refreshLocation().
void Digikam::CoreDB::changeImageComment | ( | int | commentId, |
qlonglong | imageID, | ||
const QVariantList & | infos, | ||
DatabaseFields::ItemComments | fields = DatabaseFields::ItemCommentsAll |
||
) |
Changes the properties of a comment. The QVariantList shall have at most 5 entries, of types in this order: 0) Int Type 1) String Language 2) String Author 3) DateTime Date 4) String Comment
References imageCommentsFieldList(), and Digikam::DatabaseFields::ItemCommentsNone.
Referenced by Digikam::ItemComments::apply().
void Digikam::CoreDB::changeImageMetadata | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ImageMetadata | fields = DatabaseFields::ImageMetadataAll |
||
) |
Change the indicated fields of the image information for the specified item. This method does nothing if the item does not yet have an entry in the ItemInformation table. The parameters are as for the method above.
References imageMetadataFieldList(), and Digikam::DatabaseFields::ImageMetadataNone.
void Digikam::CoreDB::changeItemInformation | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ItemInformation | fields = DatabaseFields::ItemInformationAll |
||
) |
Change the indicated fields of the image information for the specified item. Fields not indicated by the fields parameter will not be touched. This method does nothing if the item does not yet have an entry in the ItemInformation table. The parameters are as for the method above.
References imageInformationFieldList(), and Digikam::DatabaseFields::ItemInformationNone.
Referenced by clearMetadataFromImage(), Digikam::ItemScanner::commitItemInformation(), Digikam::CollectionScanner::copyFileProperties(), Digikam::ItemInfo::setDateTime(), Digikam::ItemInfo::setOrientation(), and Digikam::ItemInfo::setRating().
void Digikam::CoreDB::changeItemPosition | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::ItemPositions | fields = DatabaseFields::ItemPositionsAll |
||
) |
Change the indicated fields of the image information for the specified item. This method does nothing if the item does not yet have an entry in the ItemInformation table. The parameters are as for the method above.
References imagePositionsFieldList(), and Digikam::DatabaseFields::ItemPositionsNone.
Referenced by Digikam::ItemPosition::apply().
void Digikam::CoreDB::changeVideoMetadata | ( | qlonglong | imageID, |
const QVariantList & | infos, | ||
DatabaseFields::VideoMetadata | fields = DatabaseFields::VideoMetadataAll |
||
) |
Change the indicated fields of the video information for the specified item. This method does nothing if the item does not yet have an entry in the ItemInformation table. The parameters are as for the method above.
References videoMetadataFieldList(), and Digikam::DatabaseFields::VideoMetadataNone.
void Digikam::CoreDB::clearMetadataFromImage | ( | qlonglong | imageID | ) |
Clear all metadata of an item
imageID | the ID of the item |
References changeItemInformation(), getImageTagProperties(), getItemTagIDs(), Digikam::DatabaseFields::ImageMetadataAll, Digikam::DatabaseFields::ItemCommentsAll, Digikam::DatabaseFields::ItemPositionsAll, Digikam::ImageTagChangeset::PropertiesChanged, Digikam::DatabaseFields::Rating, Digikam::ImageTagChangeset::RemovedAll, and Digikam::DatabaseFields::VideoMetadataAll.
Referenced by Digikam::ItemScanner::scanFile().
bool Digikam::CoreDB::copyAlbumProperties | ( | int | srcAlbumID, |
int | dstAlbumID | ||
) | const |
Copy the properties of the given srcAlbum to the dstAlbum. Both albums must exist.
Referenced by Digikam::CollectionScanner::checkAlbum().
void Digikam::CoreDB::copyImageAttributes | ( | qlonglong | srcId, |
qlonglong | destId | ||
) |
Copies all image-specific information, in all tables, from image srcId to destId.
References copyImageProperties(), copyImageTags(), Digikam::DatabaseFields::ImageHistoryInfoAll, Digikam::DatabaseFields::ImageMetadataAll, Digikam::DatabaseFields::ImageRelations, Digikam::DatabaseFields::ItemCommentsAll, Digikam::DatabaseFields::ItemInformationAll, Digikam::DatabaseFields::ItemPositionsAll, and Digikam::DatabaseFields::VideoMetadataAll.
Referenced by Digikam::ItemScanner::commitCopyImageAttributes(), and copyItem().
void Digikam::CoreDB::copyImageProperties | ( | qlonglong | srcId, |
qlonglong | dstId | ||
) |
Copies all entries in the ImageProperties table.
Referenced by Digikam::CollectionScanner::copyFileProperties(), and copyImageAttributes().
void Digikam::CoreDB::copyImageTags | ( | qlonglong | srcId, |
qlonglong | dstId | ||
) |
Copies all entries in the ImageTags table.
References Digikam::ImageTagChangeset::Added, and Digikam::ImageTagChangeset::PropertiesChanged.
Referenced by copyImageAttributes().
int Digikam::CoreDB::copyItem | ( | int | srcAlbumID, |
const QString & | srcName, | ||
int | dstAlbumID, | ||
const QString & | dstName | ||
) |
Copy the attributes of an item to a different item. Useful when say a file is copied. The operation fails (returns -1) of src and dest are identical.
srcAlbumID | the id of the source album |
dstAlbumID | the id of the destination album |
srcName | the name of the source file |
dstName | the name of the destination file |
References Digikam::CollectionImageChangeset::Added, Digikam::CollectionImageChangeset::Copied, copyImageAttributes(), deleteItem(), getImageId(), and Digikam::DatabaseFields::ImagesAll.
Referenced by Digikam::ItemInfo::copyItem().
QUuid Digikam::CoreDB::databaseUuid | ( | ) |
Returns a UUID for the database file. This UUID is kept stable over schema updates.
References getSetting(), and setSetting().
void Digikam::CoreDB::deleteAlbum | ( | int | albumID | ) |
Deletes an album from the database. This will not delete the subalbums of the album.
albumID | the id of the album |
References Digikam::AlbumChangeset::Deleted, and Digikam::BdEngineBackend::NoErrors.
void Digikam::CoreDB::deleteAlbumRoot | ( | int | rootId | ) |
Deletes an album root from the database.
rootId | the id of the album root |
References Digikam::AlbumRootChangeset::Deleted, and Digikam::BdEngineBackend::NoErrors.
Referenced by Digikam::CollectionManager::removeLocation().
void Digikam::CoreDB::deleteItem | ( | int | albumID, |
const QString & | file | ||
) |
Deletes an item from the database.
albumID | The id of the album. |
file | The filename of the file to delete. |
References Digikam::CollectionImageChangeset::Deleted, and getImageId().
Referenced by copyItem(), and moveItem().
void Digikam::CoreDB::deleteItem | ( | qlonglong | imageId | ) |
Deletes an item from the database if it does not belong to an album. This method can only be used if the album of the image is NULL!
imageId | The id of the image. |
void Digikam::CoreDB::deleteObsoleteItem | ( | qlonglong | imageId | ) |
Deletes an item from the database without checking the album.
imageId | The id of the image. |
void Digikam::CoreDB::deleteRemovedItems | ( | ) |
Delete all items from the database that are marked as removed. Use with care!
References Digikam::DatabaseItem::Obsolete, and Digikam::CollectionImageChangeset::RemovedDeleted.
void Digikam::CoreDB::deleteSearch | ( | int | searchID | ) |
Delete a search from the database.
searchID | the id of the search |
References Digikam::SearchChangeset::Deleted.
Referenced by Digikam::AlbumManager::deleteSAlbum(), and Digikam::HaarIface::rebuildDuplicatesAlbums().
void Digikam::CoreDB::deleteSearches | ( | DatabaseSearch::Type | type | ) |
Delete all search with the given type
References Digikam::SearchChangeset::Deleted.
Referenced by Digikam::HaarIface::rebuildDuplicatesAlbums().
void Digikam::CoreDB::deleteStaleAlbums | ( | ) |
Deletes albums from the database that were previously removed with makeStaleAlbum()
References Digikam::BdEngineBackend::NoErrors.
Referenced by Digikam::CollectionScanner::completeScan(), and Digikam::CollectionScanner::partialScan().
void Digikam::CoreDB::deleteTag | ( | int | tagID | ) |
Deletes a tag from the database. This will not delete the subtags of the tag.
tagID | the id of the tag |
References Digikam::TagChangeset::Deleted.
Referenced by Digikam::AlbumManager::deleteTAlbum().
QList< qlonglong > Digikam::CoreDB::findByNameAndCreationDate | ( | const QString & | fileName, |
const QDateTime & | creationDate | ||
) | const |
Returns all items with the given file name and creation date.
Referenced by Digikam::ItemScanner::resolveHistoryImageId().
qlonglong Digikam::CoreDB::findImageId | ( | int | albumID, |
const QString & | name, | ||
DatabaseItem::Status | status, | ||
DatabaseItem::Category | category, | ||
qlonglong | fileSize, | ||
const QString & | uniqueHash | ||
) | const |
Find the imageId fitting to the information given for the item
albumID | the albumID of the item (-1 means NULL) |
name | the name of the item |
status | the status of the item |
category | the category of the item |
fileSize | the file size |
uniqueHash | the unique hash |
Referenced by Digikam::ItemScanner::commitAddImage().
int Digikam::CoreDB::findInDownloadHistory | ( | const QString & | identifier, |
const QString & | name, | ||
qlonglong | fileSize, | ||
const QDateTime & | date | ||
) | const |
Search for the specified fingerprint in the download history table. Returns the id of the entry, or -1 if not found.
QList< int > Digikam::CoreDB::getAlbumAndSubalbumsForPath | ( | int | albumRootId, |
const QString & | relativePath | ||
) | const |
Find out the album ids for a given relative path, including the subalbums.
albumRootId | id of the album root of the album |
relativePath | The path for which you want the albumIDs relative to the album root |
Referenced by Digikam::ItemLister::listPAlbum(), and Digikam::CollectionScanner::scanForStaleAlbums().
QDate Digikam::CoreDB::getAlbumAverageDate | ( | int | albumID | ) | const |
Returns the average date of all images for that album.
albumID | the id of the album to calculate |
int Digikam::CoreDB::getAlbumForPath | ( | int | albumRootId, |
const QString & | relativePath, | ||
bool | create = true |
||
) | const |
Find out the album for a given folder.
albumRootId | id of the album root of the album |
relativePath | The relative path for which you want the albumID relative to the album root |
create | If true, an album is newly created if it does not yet exist. If false, -1 is returned if no album exists. |
References addAlbum().
Referenced by Digikam::CollectionScanner::checkAlbum(), Digikam::CollectionScanner::countItemsInFolder(), Digikam::AbstractAlbumTreeView::doLoadState(), Digikam::ItemLister::listPAlbum(), and Digikam::CollectionScanner::scanAlbumRoot().
QDate Digikam::CoreDB::getAlbumHighestDate | ( | int | albumID | ) | const |
Returns the highest/newest date of all images for that album.
albumID | the id of the album to calculate |
QDate Digikam::CoreDB::getAlbumLowestDate | ( | int | albumID | ) | const |
Returns the lowest/oldest date of all images for that album.
albumID | the id of the album to calculate |
QDateTime Digikam::CoreDB::getAlbumModificationDate | ( | int | albumID | ) | const |
Returns the QDateTime of the album modification date.
albumID | the id of the album |
Referenced by Digikam::CollectionScanner::scanAlbum().
QMap< QString, QDateTime > Digikam::CoreDB::getAlbumModificationMap | ( | int | albumRootId | ) | const |
Returns a QMap with relative path and the album modification date.
albumRootID | id of the album root of the album |
QString Digikam::CoreDB::getAlbumRelativePath | ( | int | albumID | ) | const |
Given an albumid, this returns the relative path for that album (the path below the album root, starting with a slash)
albumID | the id of the album |
Referenced by Digikam::ItemQueryBuilder::buildField(), getItemNamesInAlbum(), getNumberOfAllItemsAndAlbums(), and renameAlbum().
int Digikam::CoreDB::getAlbumRootId | ( | int | albumID | ) | const |
Given an albumid, this returns the album root id for that album
albumID | the id of the albumdb |
Referenced by Digikam::ItemQueryBuilder::buildField(), getItemIDsAndURLsInAlbum(), getItemNamesInAlbum(), getItemURLsInAlbum(), getNumberOfAllItemsAndAlbums(), and renameAlbum().
QList< AlbumRootInfo > Digikam::CoreDB::getAlbumRoots | ( | ) | const |
Returns all albums and their attributes in the database
References Digikam::AlbumRootInfo::id, Digikam::AlbumRootInfo::identifier, Digikam::AlbumRootInfo::label, Digikam::AlbumRootInfo::specificPath, Digikam::AlbumRootInfo::status, and Digikam::AlbumRootInfo::type.
Referenced by Digikam::AbstractAlbumTreeView::doLoadState().
QList< AlbumShortInfo > Digikam::CoreDB::getAlbumShortInfos | ( | ) | const |
Returns all albums in the database with their albumRoot and ID, ordered by id.
References Digikam::AlbumShortInfo::albumRootId, Digikam::AlbumShortInfo::id, and Digikam::AlbumShortInfo::relativePath.
Referenced by Digikam::CollectionScanner::scanForStaleAlbums().
QList< int > Digikam::CoreDB::getAlbumsOnAlbumRoot | ( | int | albumRootId | ) | const |
Find out all album ids of a given album root
Referenced by Digikam::CollectionManager::removeLocation().
QVariantList Digikam::CoreDB::getAllCreationDates | ( | ) | const |
Returns a QVariantList of creationDate of all items
Referenced by Digikam::DatesJob::run().
QList< qlonglong > Digikam::CoreDB::getAllItems | ( | ) | const |
Returns all ids of items in images table.
QHash< qlonglong, QPair< int, int > > Digikam::CoreDB::getAllItemsWithAlbum | ( | ) | const |
Returns all ids of items with album ids in images table. QPair.first == albumRootID QPair.second == albumID
Referenced by Digikam::HaarIface::Private::rebuildSignatureCache().
QStringList Digikam::CoreDB::getDirtyOrMissingFaceImageUrls | ( | ) | const |
Returns a list of all images where the Faces have either not been detected yet, or is outdated because the file is identified as changed since the generation of the fingerprint. Return image ids or item URLs.
References Digikam::CollectionManager::albumRootPath(), and Digikam::CollectionManager::instance().
void Digikam::CoreDB::getFilterSettings | ( | QStringList * | imageFilter, |
QStringList * | videoFilter, | ||
QStringList * | audioFilter | ||
) |
Get the settings for the file name filters of this database. Returns a list with lowercase suffixes only, no wildcards added ("png", not "*.png") Returned is a joint result of main and user settings. If you are not interested in a specific value, pass 0.
References getSetting().
Referenced by Digikam::ApplicationSettings::getAllFileFilter(), Digikam::ApplicationSettings::getAudioFileFilter(), Digikam::ApplicationSettings::getImageFileFilter(), Digikam::ApplicationSettings::getMovieFileFilter(), Digikam::ApplicationSettings::getRawFileFilter(), Digikam::CollectionScanner::loadNameFilters(), and Digikam::AlbumModificationHelper::slotAlbumDelete().
QMap< QString, int > Digikam::CoreDB::getFormatStatistics | ( | ) | const |
Returns a QMap<QString,int> of ItemInformation.format -> count of items with that format.
References Digikam::DatabaseItem::UndefinedCategory.
QMap< QString, int > Digikam::CoreDB::getFormatStatistics | ( | DatabaseItem::Category | category | ) | const |
References Digikam::DatabaseItem::UndefinedCategory.
QList< ItemScanInfo > Digikam::CoreDB::getIdenticalFiles | ( | const QString & | uniqueHash, |
qlonglong | fileSize, | ||
qlonglong | sourceId = -1 |
||
) | const |
QList< ItemScanInfo > Digikam::CoreDB::getIdenticalFiles | ( | qlonglong | id | ) | const |
Find items that are, with reasonable certainty, identical to the file pointed to by id. Criteria: Unique Hash, file size and album non-null. The first variant will not return an ItemScanInfo for id. The second allows to pass one id as source id for exclusion from the list. If this is -1, no id is excluded.
Referenced by Digikam::ItemInfo::fromUniqueHash(), Digikam::ItemScanner::resolveHistoryImageId(), and Digikam::ItemScanner::scanFromIdenticalFile().
void Digikam::CoreDB::getIgnoreDirectoryFilterSettings | ( | QStringList * | ignoreDirectoryFilter | ) |
References getSetting().
Referenced by Digikam::CollectionScanner::loadNameFilters().
qlonglong Digikam::CoreDB::getImageId | ( | int | albumID, |
const QString & | name | ||
) | const |
Get the imageId of the item
albumID | the albumID of the item |
name | the name of the item |
Referenced by addItemTag(), copyItem(), deleteItem(), moveItem(), Digikam::CollectionScanner::scanFile(), and Digikam::CollectionScanner::scanNewFile().
QList< qlonglong > Digikam::CoreDB::getImageIds | ( | DatabaseItem::Status | status | ) | const |
Returns all image ids with the given status.
status | The status. |
QList< qlonglong > Digikam::CoreDB::getImageIds | ( | DatabaseItem::Status | status, |
DatabaseItem::Category | category | ||
) | const |
Returns all image ids with the given status and category.
status | The status. |
category | The category. |
QList< qlonglong > Digikam::CoreDB::getImageIds | ( | int | albumID, |
const QString & | name, | ||
DatabaseItem::Status | status | ||
) | const |
Get the imageId fitting to the information given for the item
albumID | the albumID of the item (-1 means NULL) |
name | the name of the item |
status | the status of the item |
Referenced by Digikam::CollectionScanner::completeScanCleanupPart().
QList< QVariant > Digikam::CoreDB::getImageIdsFromArea | ( | qreal | lat1, |
qreal | lat2, | ||
qreal | lng1, | ||
qreal | lng2, | ||
int | sortMode, | ||
const QString & | sortBy | ||
) | const |
Referenced by Digikam::GPSJob::run().
QVariantList Digikam::CoreDB::getImageMetadata | ( | qlonglong | imageID, |
DatabaseFields::ImageMetadata | metadataFields = DatabaseFields::ImageMetadataAll |
||
) | const |
Read image metadata. Parameters as above.
References imageMetadataFieldList(), and Digikam::DatabaseFields::ImageMetadataNone.
Referenced by Digikam::ItemInfo::getDatabaseFieldsRaw().
QString Digikam::CoreDB::getImageProperty | ( | qlonglong | imageID, |
const QString & | property | ||
) | const |
Returns the property with the specified name for the specified image
Referenced by Digikam::ItemExtendedProperties::readFakeListProperty(), and Digikam::ItemExtendedProperties::readProperty().
QVariantList Digikam::CoreDB::getImagesFields | ( | qlonglong | imageID, |
DatabaseFields::Images | imagesFields | ||
) | const |
Returns the requested fields from the Images table. Choose the fields with the mask. The fields will be returned in the following order and type: 0) Int Album 1) String Name 2) Int Status 3) Int Category 4) DateTime ModificationDate 5) int FileSize 6) String uniqueHash
References imagesFieldList(), Digikam::DatabaseFields::ImagesNone, and Digikam::DatabaseFields::ModificationDate.
Referenced by Digikam::ItemInfo::category(), Digikam::ItemInfo::fileSize(), Digikam::ItemScanner::fillCommonContainer(), Digikam::ItemInfo::isRemoved(), Digikam::ItemInfo::isVisible(), Digikam::ItemInfo::manualOrder(), Digikam::ItemInfo::modDateTime(), and Digikam::ItemInfo::uniqueHash().
QVector< QList< qlonglong > > Digikam::CoreDB::getImagesRelatedFrom | ( | const QList< qlonglong > & | subjectIds, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
References getRelatedImages().
QList< qlonglong > Digikam::CoreDB::getImagesRelatedFrom | ( | qlonglong | subjectId, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
Retrieves all images that the given image is related to (retrieves objects, given image is subject) If type is given, filters by type, otherwise returns all types. "Get images related to from this"
References getRelatedImages().
Referenced by Digikam::ItemInfo::groupImageId(), Digikam::ItemInfoList::loadGroupImageIds(), and removeAllImageRelationsFrom().
QVector< QList< qlonglong > > Digikam::CoreDB::getImagesRelatingTo | ( | const QList< qlonglong > & | objectIds, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
References getRelatedImages().
QList< qlonglong > Digikam::CoreDB::getImagesRelatingTo | ( | qlonglong | objectId, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
Retrieves all images that relate to the given image (retrieves subject, given image is object) If type is given, filters by type, otherwise returns all types. "Get images this image is relating to"
References getRelatedImages().
Referenced by Digikam::ItemInfo::addToGroup(), and removeAllImageRelationsTo().
QList< qlonglong > Digikam::CoreDB::getImagesWithImageTagProperty | ( | int | tagId, |
const QString & | property | ||
) | const |
Returns all image ids that are associated to the tag with the given property.
Referenced by Digikam::TagModificationHelper::slotMultipleFaceTagDel().
QList< qlonglong > Digikam::CoreDB::getImagesWithProperty | ( | const QString & | property | ) | const |
Returns all image ids that are associated to the given property.
QList< ImageTagProperty > Digikam::CoreDB::getImageTagProperties | ( | qlonglong | imageId, |
int | tagId = -1 |
||
) | const |
Get the properties for the given image/tag pair. If the tagID is -1, returns the ImageTagProperties for all tagIds of the given image.
References Digikam::ImageTagProperty::imageId.
Referenced by clearMetadataFromImage().
QString Digikam::CoreDB::getImageUuid | ( | qlonglong | imageId | ) | const |
Retrieves the image UUID
Referenced by Digikam::ItemScanner::scanImageHistoryIfModified(), and Digikam::ItemInfo::uuid().
int Digikam::CoreDB::getItemAlbum | ( | qlonglong | imageID | ) | const |
Find the album of an item
imageID | The ID of the item |
QList< CommentInfo > Digikam::CoreDB::getItemComments | ( | qlonglong | imageID | ) | const |
Retrieves all available comments for the specified item.
References Digikam::CommentInfo::author, Digikam::CommentInfo::comment, Digikam::CommentInfo::date, Digikam::CommentInfo::id, Digikam::CommentInfo::imageId, Digikam::CommentInfo::language, and Digikam::CommentInfo::type.
Given a set of items (identified by their IDs), get a list of ID of all common tags
imageIDList | a list of IDs of the items |
Referenced by Digikam::ContextMenuHelper::addRemoveTagsMenu().
QList< CopyrightInfo > Digikam::CoreDB::getItemCopyright | ( | qlonglong | imageID, |
const QString & | property = QString() |
||
) | const |
Returns the copyright properties of the specified image. If property is not null, only the given property is returned.
References Digikam::CopyrightInfo::extraValue, Digikam::CopyrightInfo::id, Digikam::CopyrightInfo::property, and Digikam::CopyrightInfo::value.
Referenced by Digikam::ItemCopyright::copyrightInfo(), Digikam::ItemCopyright::copyrightInfos(), and Digikam::ItemCopyright::replaceFrom().
qlonglong Digikam::CoreDB::getItemFromAlbum | ( | int | albumID, |
const QString & | fileName | ||
) | const |
Returns the id of the item with the given filename in the album with the given id.
albumId | The albumId in which we search the item. |
fileName | The name of the item file. |
Referenced by Digikam::AlbumManager::getItemFromAlbum().
ImageHistoryEntry Digikam::CoreDB::getItemHistory | ( | qlonglong | imageId | ) | const |
Retrieves the history entry for the given image.
References Digikam::ImageHistoryEntry::history, Digikam::ImageHistoryEntry::imageId, and Digikam::ImageHistoryEntry::uuid.
Referenced by Digikam::ItemInfo::imageHistory(), and Digikam::ItemScanner::resolveImageHistory().
QMap< qlonglong, QString > Digikam::CoreDB::getItemIDsAndURLsInAlbum | ( | int | albumID | ) | const |
Given a albumID, get a map of Ids and urls of all items in the album NOTE: Uses the CollectionManager
albumID | the id of the album |
References Digikam::CollectionManager::albumRootPath(), getAlbumRootId(), and Digikam::CollectionManager::instance().
QList< qlonglong > Digikam::CoreDB::getItemIDsInAlbum | ( | int | albumID | ) | const |
Given a albumID, get a list of Ids of all items in the album
albumID | the id of the album |
Referenced by Digikam::ImageWindow::dropEvent(), Digikam::HaarIface::imagesFromAlbumsAndTags(), and Digikam::CollectionScanner::safelyRemoveAlbums().
QList< qlonglong > Digikam::CoreDB::getItemIDsInTag | ( | int | tagID, |
bool | recursive = false |
||
) | const |
Given a tagID, get a list of Ids of all items in the tag
tagID | the id of the tag |
recursive | perform a recursive folder hierarchy parsing |
Referenced by Digikam::CollectionScanner::completeHistoryScanning(), Digikam::AlbumManager::deleteTAlbum(), Digikam::ImageWindow::dropEvent(), Digikam::HaarIface::imagesFromAlbumsAndTags(), Digikam::AlbumManager::mergeTAlbum(), Digikam::TagModificationHelper::slotMultipleTagDel(), and Digikam::TagModificationHelper::slotTagDelete().
QVariantList Digikam::CoreDB::getItemInformation | ( | qlonglong | imageID, |
DatabaseFields::ItemInformation | infoFields = DatabaseFields::ItemInformationAll |
||
) | const |
Read image information. Parameters as above.
References Digikam::DatabaseFields::CreationDate, Digikam::DatabaseFields::DigitizationDate, imageInformationFieldList(), and Digikam::DatabaseFields::ItemInformationNone.
Referenced by Digikam::CollectionScanner::copyFileProperties(), Digikam::ItemInfo::dateTime(), Digikam::ItemInfo::dimensions(), Digikam::ItemScanner::fillCommonContainer(), Digikam::ItemInfo::format(), Digikam::ItemInfo::orientation(), and Digikam::ItemInfo::rating().
QString Digikam::CoreDB::getItemName | ( | qlonglong | imageID | ) | const |
Retrieve the name of the item
imageID | The ID of the item |
QStringList Digikam::CoreDB::getItemNamesInAlbum | ( | int | albumID, |
bool | recursive = false |
||
) | const |
Returns all items for a given albumid. This is used to verify if all items on disk are consistent with the database in the CollectionScanner class.
albumID | The albumID for which you want all items. |
recursive | perform a recursive folder hierarchy parsing |
References getAlbumRelativePath(), and getAlbumRootId().
QVariantList Digikam::CoreDB::getItemPosition | ( | qlonglong | imageID, |
DatabaseFields::ItemPositions | positionFields = DatabaseFields::ItemPositionsAll |
||
) | const |
Read image metadata. Parameters as above.
References Digikam::DatabaseFields::Altitude, imagePositionsFieldList(), Digikam::DatabaseFields::ItemPositionsNone, Digikam::DatabaseFields::LatitudeNumber, Digikam::DatabaseFields::LongitudeNumber, Digikam::DatabaseFields::PositionAccuracy, Digikam::DatabaseFields::PositionOrientation, Digikam::DatabaseFields::PositionRoll, and Digikam::DatabaseFields::PositionTilt.
Referenced by Digikam::CollectionScanner::copyFileProperties().
QVariantList Digikam::CoreDB::getItemPositions | ( | QList< qlonglong > | imageIDs, |
DatabaseFields::ItemPositions | fields | ||
) | const |
References Digikam::DatabaseFields::Altitude, imagePositionsFieldList(), Digikam::DatabaseFields::ItemPositionsNone, Digikam::DatabaseFields::LatitudeNumber, Digikam::DatabaseFields::LongitudeNumber, Digikam::DatabaseFields::PositionAccuracy, Digikam::DatabaseFields::PositionOrientation, Digikam::DatabaseFields::PositionRoll, and Digikam::DatabaseFields::PositionTilt.
ItemScanInfo Digikam::CoreDB::getItemScanInfo | ( | qlonglong | imageID | ) | const |
Get scan info from the image ID
References Digikam::ItemScanInfo::albumID, Digikam::ItemScanInfo::category, Digikam::ItemScanInfo::fileSize, Digikam::ItemScanInfo::id, Digikam::ItemScanInfo::itemName, Digikam::ItemScanInfo::modificationDate, Digikam::ItemScanInfo::status, and Digikam::ItemScanInfo::uniqueHash.
Referenced by Digikam::ItemScanner::copyFromSource(), Digikam::ItemInfo::historyImageId(), Digikam::ItemScanner::ItemScanner(), and Digikam::CollectionScanner::scanFile().
QList< ItemScanInfo > Digikam::CoreDB::getItemScanInfos | ( | int | albumID | ) | const |
Returns an ItemScanInfo object for each item in the album with the specified album id.
References Digikam::ItemScanInfo::albumID, Digikam::ItemScanInfo::category, Digikam::ItemScanInfo::fileSize, Digikam::ItemScanInfo::id, Digikam::ItemScanInfo::itemName, Digikam::ItemScanInfo::modificationDate, Digikam::ItemScanInfo::status, and Digikam::ItemScanInfo::uniqueHash.
Referenced by Digikam::CollectionScanner::scanAlbum().
QList< qlonglong > Digikam::CoreDB::getItemsForUuid | ( | const QString & | uuid | ) | const |
Retrieves the images with the given UUID
Referenced by Digikam::ItemScanner::resolveHistoryImageId().
ItemShortInfo Digikam::CoreDB::getItemShortInfo | ( | int | albumRootId, |
const QString & | relativePath, | ||
const QString & | name | ||
) | const |
Get item and album if from albumRootId, album path and file name.
References Digikam::ItemShortInfo::album, Digikam::ItemShortInfo::albumID, Digikam::ItemShortInfo::albumRootID, Digikam::ItemShortInfo::id, and Digikam::ItemShortInfo::itemName.
ItemShortInfo Digikam::CoreDB::getItemShortInfo | ( | qlonglong | imageID | ) | const |
Get item and album info from the image ID
References Digikam::ItemShortInfo::album, Digikam::ItemShortInfo::albumID, Digikam::ItemShortInfo::albumRootID, Digikam::ItemShortInfo::id, and Digikam::ItemShortInfo::itemName.
Referenced by Digikam::ItemInfo::fromLocationAlbumAndName(), Digikam::ItemScanner::ItemScanner(), and Digikam::ItemScanner::resolveHistoryImageId().
QVector< QList< int > > Digikam::CoreDB::getItemsTagIDs | ( | const QList< qlonglong > & | imageIds | ) | const |
For a list of items, return the tag ids associated with the item. Amounts to calling getItemTagIDs for each id in imageIds, but is optimized.
Referenced by Digikam::ItemInfoList::loadTagIds().
QStringList Digikam::CoreDB::getItemsURLsWithTag | ( | int | tagId | ) | const |
Returns a list of all images where tagId is assigned Return item URLs.
References Digikam::CollectionManager::albumRootPath(), Digikam::FirstColorLabel, Digikam::FirstPickLabel, Digikam::CollectionManager::instance(), Digikam::TagsCache::instance(), Digikam::LastColorLabel, Digikam::LastPickLabel, Digikam::NoColorLabel, Digikam::NoPickLabel, Digikam::TagsCache::tagForColorLabel(), and Digikam::TagsCache::tagForPickLabel().
QList< int > Digikam::CoreDB::getItemTagIDs | ( | qlonglong | imageID | ) | const |
Get a list of IDs of all the tags for the item
imageID | the ID of the item |
Referenced by clearMetadataFromImage(), Digikam::ItemScanner::commitTags(), and Digikam::ItemInfo::tagIds().
QStringList Digikam::CoreDB::getItemTagNames | ( | qlonglong | imageID | ) | const |
Get a list of names of all the tags for the item
imageID | the ID of the item |
QStringList Digikam::CoreDB::getItemURLsInAlbum | ( | int | albumID, |
ItemSortOrder | order = NoItemSorting |
||
) | const |
Given a albumID, get a list of the url of all items in the album NOTE: Uses the CollectionManager
albumID | the id of the album |
order | order for the returned items to use |
References Digikam::CollectionManager::albumRootPath(), ByItemDate, ByItemName, ByItemPath, ByItemRating, getAlbumRootId(), Digikam::CollectionManager::instance(), and NoItemSorting.
QStringList Digikam::CoreDB::getItemURLsInTag | ( | int | tagID, |
bool | recursive = false |
||
) | const |
Given a tagid, get a list of the url of all items in the tag NOTE: Uses the CollectionManager
tagID | the id of the tag |
recursive | perform a recursive folder hierarchy parsing |
References Digikam::CollectionManager::albumRootPath(), and Digikam::CollectionManager::instance().
QStringList Digikam::CoreDB::getListFromImageMetadata | ( | DatabaseFields::ImageMetadata | field | ) | const |
Return a list from a field from imageMetadata
References imageMetadataFieldList().
Referenced by Digikam::SearchField::createField().
QPair< int, int > Digikam::CoreDB::getNumberOfAllItemsAndAlbums | ( | int | albumID | ) | const |
Returns the QPair<int, int> of all items (first) and albums (second) as a counter in the album.
albumID | the id of the album |
References getAlbumRelativePath(), and getAlbumRootId().
QMap< int, int > Digikam::CoreDB::getNumberOfImagesInAlbums | ( | ) | const |
Returns a QMap<int, int> of album id -> count of items in the album
Referenced by Digikam::AlbumsJob::run().
QMap< int, int > Digikam::CoreDB::getNumberOfImagesInTagProperties | ( | const QString & | property | ) | const |
Returns a QMap<int,int> of tag id -> count of items with the given tag property
Referenced by Digikam::FaceUtils::removeNormalTag(), Digikam::TagsJob::run(), and Digikam::ItemIconView::slotRemoveTag().
int Digikam::CoreDB::getNumberOfImagesInTagProperties | ( | int | tagId, |
const QString & | property | ||
) | const |
Returns the count of images that have a tag property for the given tag.
QMap< int, int > Digikam::CoreDB::getNumberOfImagesInTags | ( | ) | const |
Returns a QMap<int,int> of tag id -> count of items with the tag
Referenced by Digikam::TagsJob::run().
int Digikam::CoreDB::getNumberOfItemsInAlbum | ( | int | albumID | ) | const |
Returns the number of items in the album.
albumID | the id of the album |
Referenced by Digikam::CollectionScanner::scanAlbumRoot().
QList< qlonglong > Digikam::CoreDB::getObsoleteItemIds | ( | ) | const |
Get obsolete item Ids.
References Digikam::DatabaseItem::Obsolete.
Referenced by Digikam::DatabaseTask::run().
QList< qlonglong > Digikam::CoreDB::getOneRelatedImageEach | ( | const QList< qlonglong > & | ids, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
For each of the given ids, find one single related image (direction does not matter). Ids are unique in the returned list, and do not correspond by index to the given list.
References Digikam::DatabaseRelation::UndefinedType.
Referenced by Digikam::CollectionScanner::itemsWereRemoved().
QList< int > Digikam::CoreDB::getRecentlyAssignedTags | ( | ) | const |
Get a list of recently assigned tags (only last 6 tags are listed)
Referenced by Digikam::TaggingActionFactory::actions(), and Digikam::AlbumManager::getRecentlyAssignedTags().
|
protected |
|
protected |
Referenced by getImagesRelatedFrom(), getImagesRelatingTo(), hasImagesRelatedFrom(), and hasImagesRelatingTo().
QList< qlonglong > Digikam::CoreDB::getRelatedImagesToByType | ( | DatabaseRelation::Type | type | ) | const |
Retrieves all images that related to (retrieves objects) by given type.
Referenced by Digikam::ItemInfoCache::getImageGroupedCount().
QList< QPair< qlonglong, qlonglong > > Digikam::CoreDB::getRelationCloud | ( | qlonglong | imageId, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
For the given image id, retrieves all relations of all related images: Each pair (a,b) means "a is related to b". Each a and b in the list will have a direct or indirect relation to the initial imageId. If type is given, filters by type, otherwise returns all types.
References Digikam::DatabaseRelation::UndefinedType.
Referenced by Digikam::ItemInfo::relationCloud().
SearchInfo Digikam::CoreDB::getSearchInfo | ( | int | searchId | ) | const |
Get information about the specified search
References Digikam::SearchInfo::id, Digikam::SearchInfo::name, Digikam::SearchInfo::query, and Digikam::SearchInfo::type.
QString Digikam::CoreDB::getSearchQuery | ( | int | searchId | ) | const |
Get the query for the search specified by its id
QString Digikam::CoreDB::getSetting | ( | const QString & | keyword | ) | const |
This function returns the value which is stored in the database (table Settings).
keyword | The keyword for which the value has to be returned. |
Referenced by Digikam::CollectionScanner::checkDeleteRemoved(), Digikam::CollectionScanner::databaseInitialScanDone(), databaseUuid(), Digikam::DBStatDlg::DBStatDlg(), getFilterSettings(), getIgnoreDirectoryFilterSettings(), getUniqueHashVersion(), getUserFilterSettings(), getUserIgnoreDirectoryFilterSettings(), Digikam::CollectionScanner::incrementDeleteRemovedCompleteScanCount(), and Digikam::AlbumManager::setDatabase().
QList< int > Digikam::CoreDB::getTagIdsWithProperties | ( | qlonglong | imageId | ) | const |
Get all tagIds for which ImageTagProperties exist for the given image.
Referenced by Digikam::ItemTagPair::availablePairs().
TagInfo Digikam::CoreDB::getTagInfo | ( | int | tagId | ) | const |
QList< TagProperty > Digikam::CoreDB::getTagProperties | ( | ) | const |
Returns the list of all tag properties (ordered by tag id, then property).
References Digikam::TagProperty::tagId.
Referenced by Digikam::DatabaseTask::run(), and Digikam::TagProperties::TagProperties().
QList< TagProperty > Digikam::CoreDB::getTagProperties | ( | const QString & | property | ) | const |
Returns the list of tag properties with the given attribute.
References Digikam::TagProperty::property, Digikam::TagProperty::tagId, and Digikam::TagProperty::value.
QList< TagProperty > Digikam::CoreDB::getTagProperties | ( | int | tagID | ) | const |
Returns the list of tag properties of the given tag.
References Digikam::TagProperty::tagId.
QList< TagShortInfo > Digikam::CoreDB::getTagShortInfos | ( | ) | const |
Returns all tags in the database with their parent id and name, ordered by id.
References Digikam::TagShortInfo::id, Digikam::TagShortInfo::name, and Digikam::TagShortInfo::pid.
QList< int > Digikam::CoreDB::getTagsWithProperty | ( | const QString & | property | ) | const |
Returns a list of tag ids with the specified property. FIXME: Not tested, might not work at all.
int Digikam::CoreDB::getUniqueHashVersion | ( | ) | const |
Returns the version used for the unique hash in this database. The value is cached.
References getSetting().
Referenced by isUniqueHashV2().
void Digikam::CoreDB::getUserFilterSettings | ( | QString * | imageFilterString, |
QString * | videoFilterString, | ||
QString * | audioFilterString | ||
) |
Returns the user-configurable filter settings. If you are not interested in a specific value, pass 0.
References getSetting().
Referenced by Digikam::SetupMime::applySettings(), and Digikam::SetupMime::readSettings().
void Digikam::CoreDB::getUserIgnoreDirectoryFilterSettings | ( | QString * | ignoreDirectoryFilterString | ) |
References getSetting().
Referenced by Digikam::SetupCollections::applySettings().
QVariantList Digikam::CoreDB::getVideoMetadata | ( | qlonglong | imageID, |
DatabaseFields::VideoMetadata | metadataFields = DatabaseFields::VideoMetadataAll |
||
) | const |
Read video metadata. Parameters as above.
References videoMetadataFieldList(), and Digikam::DatabaseFields::VideoMetadataNone.
Referenced by Digikam::ItemScanner::fillVideoMetadataContainer(), and Digikam::ItemInfo::getDatabaseFieldsRaw().
bool Digikam::CoreDB::hasImageHistory | ( | qlonglong | imageId | ) | const |
Returns true if the image has a history stored in DB If not, it returns false
Referenced by Digikam::ItemInfo::hasImageHistory().
bool Digikam::CoreDB::hasImagesRelatedFrom | ( | qlonglong | subjectId, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
References getRelatedImages().
Referenced by Digikam::ItemInfo::hasAncestorImages().
bool Digikam::CoreDB::hasImagesRelatingTo | ( | qlonglong | objectId, |
DatabaseRelation::Type | type = DatabaseRelation::UndefinedType |
||
) | const |
References getRelatedImages().
Referenced by Digikam::ItemInfo::hasDerivedImages().
bool Digikam::CoreDB::hasTags | ( | const QList< qlonglong > & | imageIDList | ) | const |
Given a set of items (identified by their IDs), this will see if any of the items has a tag.
imageIDList | a list of IDs of the items |
|
static |
|
static |
References Digikam::DatabaseFields::ColorDepth, Digikam::DatabaseFields::ColorModel, Digikam::DatabaseFields::CreationDate, Digikam::DatabaseFields::DigitizationDate, Digikam::DatabaseFields::Format, Digikam::DatabaseFields::Height, Digikam::DatabaseFields::Orientation, Digikam::DatabaseFields::Rating, and Digikam::DatabaseFields::Width.
Referenced by addItemInformation(), changeItemInformation(), and getItemInformation().
|
static |
References Digikam::DatabaseFields::Aperture, Digikam::DatabaseFields::ExposureMode, Digikam::DatabaseFields::ExposureProgram, Digikam::DatabaseFields::ExposureTime, Digikam::DatabaseFields::FlashMode, Digikam::DatabaseFields::FocalLength, Digikam::DatabaseFields::FocalLength35, Digikam::DatabaseFields::Lens, Digikam::DatabaseFields::Make, Digikam::DatabaseFields::MeteringMode, Digikam::DatabaseFields::Model, Digikam::DatabaseFields::Sensitivity, Digikam::DatabaseFields::SubjectDistance, Digikam::DatabaseFields::SubjectDistanceCategory, Digikam::DatabaseFields::WhiteBalance, and Digikam::DatabaseFields::WhiteBalanceColorTemperature.
Referenced by addImageMetadata(), changeImageMetadata(), getImageMetadata(), and getListFromImageMetadata().
|
static |
References Digikam::DatabaseFields::Altitude, Digikam::DatabaseFields::Latitude, Digikam::DatabaseFields::LatitudeNumber, Digikam::DatabaseFields::Longitude, Digikam::DatabaseFields::LongitudeNumber, Digikam::DatabaseFields::PositionAccuracy, Digikam::DatabaseFields::PositionDescription, Digikam::DatabaseFields::PositionOrientation, Digikam::DatabaseFields::PositionRoll, and Digikam::DatabaseFields::PositionTilt.
Referenced by addItemPosition(), changeItemPosition(), getItemPosition(), and getItemPositions().
|
static |
References Digikam::DatabaseFields::Album, Digikam::DatabaseFields::Category, Digikam::DatabaseFields::FileSize, Digikam::DatabaseFields::ManualOrder, Digikam::DatabaseFields::ModificationDate, Digikam::DatabaseFields::Name, Digikam::DatabaseFields::Status, and Digikam::DatabaseFields::UniqueHash.
Referenced by getImagesFields().
bool Digikam::CoreDB::integrityCheck | ( | ) | const |
Returns true if the integrity of the database is preserved.
bool Digikam::CoreDB::isUniqueHashV2 | ( | ) | const |
References getUniqueHashVersion().
void Digikam::CoreDB::makeStaleAlbum | ( | int | albumID | ) |
Makes the album a stale entry by setting the albumRoot to 0. Emits the same changeset as deleteAlbum()
References Digikam::AlbumChangeset::Deleted, and Digikam::BdEngineBackend::NoErrors.
Referenced by Digikam::CollectionScanner::safelyRemoveAlbums().
void Digikam::CoreDB::migrateAlbumRoot | ( | int | rootId, |
const QString & | identifier | ||
) |
Migrates a given album root to a new disk location. This only changes the values in the AlbumRoots table. It is expected that this merely reflects underlying partition changes, still pointing to the same data.
References Digikam::AlbumRootChangeset::PropertiesChanged.
Referenced by Digikam::CollectionManager::refreshLocation().
void Digikam::CoreDB::moveItem | ( | int | srcAlbumID, |
const QString & | srcName, | ||
int | dstAlbumID, | ||
const QString & | dstName | ||
) |
Move the attributes of an item to a different item. Useful when say a file is renamed
srcAlbumID | the id of the source album |
dstAlbumID | the id of the destination album |
srcName | the name of the source file |
dstName | the name of the destination file |
References Digikam::CollectionImageChangeset::Added, Digikam::DatabaseFields::Album, deleteItem(), getImageId(), Digikam::CollectionImageChangeset::Moved, and Digikam::CollectionImageChangeset::Removed.
QList< qlonglong > Digikam::CoreDB::removeAllImageRelationsFrom | ( | qlonglong | subjectId, |
DatabaseRelation::Type | type | ||
) | const |
QList< qlonglong > Digikam::CoreDB::removeAllImageRelationsTo | ( | qlonglong | objectId, |
DatabaseRelation::Type | type | ||
) | const |
References getImagesRelatingTo(), and Digikam::DatabaseFields::ImageRelations.
Referenced by Digikam::ItemInfo::clearGroup(), and Digikam::ItemScanner::commitCopyImageAttributes().
void Digikam::CoreDB::removeImageComment | ( | int | commentId, |
qlonglong | imageid | ||
) |
Remove the specified entry in ItemComments
References Digikam::DatabaseFields::ItemCommentsAll.
Referenced by Digikam::ItemComments::apply().
void Digikam::CoreDB::removeImageProperty | ( | qlonglong | imageID, |
const QString & | property | ||
) |
Referenced by Digikam::ItemExtendedProperties::removeProperty().
void Digikam::CoreDB::removeImagePropertyByName | ( | const QString & | property | ) |
void Digikam::CoreDB::removeImageRelation | ( | const ImageRelation & | relation | ) |
void Digikam::CoreDB::removeImageRelation | ( | qlonglong | subjectId, |
qlonglong | objectId, | ||
DatabaseRelation::Type | type | ||
) |
Removes image relations. The batch methods return all removed partners.
References Digikam::DatabaseFields::ImageRelations.
Referenced by removeImageRelation().
void Digikam::CoreDB::removeImageTagProperties | ( | qlonglong | imageId, |
int | tagId = -1 , |
||
const QString & | property = QString() , |
||
const QString & | value = QString() |
||
) |
Removes properties for the given tag. If the value is given, removes only the entries with the given property/value pair. If only property is given, removes all properties with the given name. If property is null, removes all properties for the given tag. If tagId is -1, removes all image tag properties for the given image. Note: After the first parameter you give as a wildcard, the following will be ignored and taken as wildcard as well.
References Digikam::ImageTagChangeset::PropertiesChanged, and value.
Referenced by Digikam::ItemTagPair::clearProperties(), Digikam::ItemTagPair::removeProperties(), Digikam::ItemTagPair::removeProperty(), and Digikam::ItemInfo::removeTag().
void Digikam::CoreDB::removeItemAllTags | ( | qlonglong | imageID, |
const QList< int > & | currentTagIds | ||
) |
Remove all tags for the item
imageID | the ID of the item |
currentTagIds | the current tags ids assigned to the item |
References Digikam::ImageTagChangeset::RemovedAll.
Referenced by Digikam::ItemInfo::removeAllTags().
void Digikam::CoreDB::removeItemCopyrightProperties | ( | qlonglong | imageID, |
const QString & | property = QString() , |
||
const QString & | extraValue = QString() , |
||
const QString & | value = QString() |
||
) |
Removes copyright properties for the given image id. All values after the first null value, in order of parameters, are treated as wild cards (you can give value as wildcard; value and extraValue; or property, extraValue and value). Note that extraValue is ordered before value in this method!
References value.
Referenced by Digikam::ItemCopyright::removeLanguageProperty(), Digikam::ItemCopyright::removeProperties(), and Digikam::ItemCopyright::replaceFrom().
void Digikam::CoreDB::removeItemPosition | ( | qlonglong | imageid | ) |
Remove the entry in ItemPositions for the given image
References Digikam::DatabaseFields::ItemPositionsAll.
Referenced by Digikam::ItemPosition::remove().
void Digikam::CoreDB::removeItemPositionAltitude | ( | qlonglong | imageid | ) |
Remove the altitude in ItemPositions for the given image
References Digikam::DatabaseFields::Altitude.
Referenced by Digikam::ItemPosition::removeAltitude().
void Digikam::CoreDB::removeItems | ( | QList< qlonglong > | itemIDs, |
const QList< int > & | albumIDs = QList<int>() |
||
) |
Marks all items in the list as removed, resets their dirids. The items can later be removed by deleteRemovedItems().
itemIDs | a list of item IDs to be marked |
albumIDs | this parameter is purely informational. it shall contain the albums that the items are removed from. |
References Digikam::CollectionImageChangeset::Removed, and Digikam::DatabaseItem::Trashed.
Referenced by Digikam::CollectionScanner::scanAlbum().
void Digikam::CoreDB::removeItemsFromAlbum | ( | int | albumID, |
const QList< qlonglong > & | ids_forInformation = QList<qlonglong>() |
||
) |
Marks all items in the specified album as removed, resets their dirids. The album can be deleted afterwards without removing the entries for the items, which can later be removed by deleteRemovedItems().
albumID | The id of the album |
ids | Fully optional: The image ids in the album, if you know them anyway. This parameter is only used for distributing the change notification. |
References Digikam::CollectionImageChangeset::RemovedAll, and Digikam::DatabaseItem::Trashed.
Referenced by Digikam::CollectionScanner::safelyRemoveAlbums().
void Digikam::CoreDB::removeItemsPermanently | ( | QList< qlonglong > | itemIDs, |
const QList< int > & | albumIDs = QList<int>() |
||
) |
Marks all items in the list as obsolete, resets their dirids. The items can later be removed by deleteRemovedItems().
itemIDs | a list of item IDs to be marked |
albumIDs | this parameter is purely informational. it shall contain the albums that the items are removed from. |
References Digikam::DatabaseItem::Obsolete, and Digikam::CollectionImageChangeset::Removed.
Referenced by Digikam::EmptyDTrashItemsJob::run().
void Digikam::CoreDB::removeItemTag | ( | qlonglong | imageID, |
int | tagID | ||
) |
Remove a specific tag for the item
imageID | the ID of the item |
tagID | the tagID for the tag |
References Digikam::ImageTagChangeset::Removed.
Referenced by Digikam::ItemInfo::removeTag().
void Digikam::CoreDB::removeTagProperties | ( | int | tagId, |
const QString & | property = QString() , |
||
const QString & | value = QString() |
||
) |
Removes properties for the given tag. If the value is given, removes only the entries with the given property/value pair. If only property is given, removes all properties with the given name. If property is null, removes all properties for the given tag.
References Digikam::TagChangeset::PropertiesChanged, and value.
Referenced by Digikam::TagProperties::removeProperties(), and Digikam::TagProperties::removeProperty().
void Digikam::CoreDB::removeTagsFromItems | ( | QList< qlonglong > | imageIDs, |
const QList< int > & | tagIDs | ||
) |
Remove each tag from a list of tags from a each member of a list of items.
References Digikam::ImageTagChangeset::Removed.
Referenced by Digikam::ItemScanner::commitTags(), Digikam::ItemScanner::resolveImageHistory(), and Digikam::ItemScanner::tagItemHistoryGraph().
void Digikam::CoreDB::renameAlbum | ( | int | albumID, |
int | newAlbumRootId, | ||
const QString & | newRelativePath | ||
) |
Give an existing album a new relativePath and a newAlbumRootId
References getAlbumRelativePath(), getAlbumRootId(), Digikam::BdEngineBackend::NoErrors, and Digikam::AlbumChangeset::Renamed.
Referenced by Digikam::AlbumManager::renamePAlbum(), and Digikam::CollectionScanner::scanForStaleAlbums().
void Digikam::CoreDB::renameItem | ( | qlonglong | imageID, |
const QString & | newName | ||
) |
Rename the item. Note: we not use here ImageChangeset.
Referenced by Digikam::ItemInfo::setName().
AlbumInfo::List Digikam::CoreDB::scanAlbums | ( | ) | const |
Returns all albums and their attributes in the database
References Digikam::AlbumInfo::albumRootId, Digikam::AlbumInfo::caption, Digikam::AlbumInfo::category, Digikam::AlbumInfo::date, Digikam::AlbumInfo::iconId, Digikam::AlbumInfo::id, and Digikam::AlbumInfo::relativePath.
Referenced by Digikam::DBStatDlg::DBStatDlg().
SearchInfo::List Digikam::CoreDB::scanSearches | ( | ) | const |
Returns all searches from the database
References Digikam::SearchInfo::id, Digikam::SearchInfo::name, Digikam::SearchInfo::query, and Digikam::SearchInfo::type.
TagInfo::List Digikam::CoreDB::scanTags | ( | ) | const |
Returns all tags and their attributes in the database
References Digikam::TagInfo::icon, Digikam::TagInfo::iconId, Digikam::TagInfo::id, Digikam::TagInfo::name, and Digikam::TagInfo::pid.
Referenced by Digikam::DBStatDlg::DBStatDlg().
void Digikam::CoreDB::setAlbumCaption | ( | int | albumID, |
const QString & | caption | ||
) |
Set a caption for the album.
albumID | the id of the album |
caption | the new caption for the album |
References Digikam::AlbumChangeset::PropertiesChanged.
Referenced by Digikam::PAlbum::setCaption().
void Digikam::CoreDB::setAlbumCategory | ( | int | albumID, |
const QString & | category | ||
) |
Set a category for the album.
albumID | the id of the album |
category | the new category for the album |
References Digikam::AlbumChangeset::PropertiesChanged.
Referenced by Digikam::PAlbum::setCategory().
void Digikam::CoreDB::setAlbumDate | ( | int | albumID, |
const QDate & | date | ||
) |
Set a date for the album.
albumID | the id of the album |
date | the date for the album |
References Digikam::AlbumChangeset::PropertiesChanged.
Referenced by Digikam::CollectionScanner::scanAlbum(), and Digikam::PAlbum::setDate().
void Digikam::CoreDB::setAlbumIcon | ( | int | albumID, |
qlonglong | iconID | ||
) |
Set the icon for the album.
albumID | the id of the album |
iconID | the id of the icon file |
References Digikam::AlbumChangeset::PropertiesChanged.
Referenced by Digikam::AlbumManager::updatePAlbumIcon().
void Digikam::CoreDB::setAlbumModificationDate | ( | int | albumID, |
const QDateTime & | modificationDate | ||
) |
Set the modification date time for the album.
albumID | the id of the album |
dateTime | the modification date time for the album |
Referenced by Digikam::CollectionScanner::scanAlbum().
void Digikam::CoreDB::setAlbumRootLabel | ( | int | rootId, |
const QString & | newLabel | ||
) |
Changes the label of the specified album root
rootId | the id of the album root |
newLabel | new label for the album root |
References Digikam::AlbumRootChangeset::PropertiesChanged.
Referenced by Digikam::CollectionManager::refreshLocation().
void Digikam::CoreDB::setAlbumRootPath | ( | int | rootId, |
const QString & | newPath | ||
) |
Changes the specificPath of the specified album root
rootId | the id of the album root |
newPath | new path for the album root |
References Digikam::AlbumRootChangeset::PropertiesChanged.
Referenced by Digikam::CollectionManager::refreshLocation().
void Digikam::CoreDB::setFilterSettings | ( | const QStringList & | imageFilter, |
const QStringList & | videoFilter, | ||
const QStringList & | audioFilter | ||
) |
Sets the main filter settings of the database. Should only be called at schema update.
References setSetting().
void Digikam::CoreDB::setIgnoreDirectoryFilterSettings | ( | const QStringList & | ignoreDirectoryFilter | ) |
References setSetting().
int Digikam::CoreDB::setImageComment | ( | qlonglong | imageID, |
const QString & | comment, | ||
DatabaseComment::Type | type, | ||
const QString & | language = QString() , |
||
const QString & | author = QString() , |
||
const QDateTime & | date = QDateTime() |
||
) | const |
Sets the comments for the image. A comment for the image with the same source, language and author will be overwritten.
imageID | The imageID of the image |
comment | The comment string |
type | The type of the comment |
language | Information about the language of the comment. A null string shall be used if language information is not available from the source, or if the comment is in the default language. |
author | Optional information about the author who wrote the comment. If not supported by the source, pass a null string. |
date | Optional information about the date when the comment was written If not supported by the source, pass a null string. |
References Digikam::DatabaseFields::ItemCommentsAll.
Referenced by Digikam::ItemComments::apply().
void Digikam::CoreDB::setImageProperty | ( | qlonglong | imageID, |
const QString & | property, | ||
const QString & | value | ||
) |
Sets the property with the given name for the given image to the specified value
References value.
Referenced by Digikam::ItemExtendedProperties::setFakeListProperty(), and Digikam::ItemExtendedProperties::setProperty().
void Digikam::CoreDB::setImageUuid | ( | qlonglong | imageId, |
const QString & | uuid | ||
) |
References Digikam::DatabaseFields::ImageUUID.
Referenced by Digikam::ItemScanner::commitImageHistory(), and Digikam::ItemInfo::setUuid().
void Digikam::CoreDB::setItemAlbum | ( | qlonglong | imageID, |
qlonglong | albumId | ||
) |
Updates the album field for the item. Note: Do not use this to move the item. This function only has the purpose to reuse image infos for restored images from trash.
References Digikam::CollectionImageChangeset::Added, and Digikam::DatabaseFields::Album.
Referenced by Digikam::ItemScanner::commitAddImage().
void Digikam::CoreDB::setItemCopyrightProperty | ( | qlonglong | imageID, |
const QString & | property, | ||
const QString & | value, | ||
const QString & | extraValue = QString() , |
||
CopyrightPropertyUnique | uniqueness = PropertyUnique |
||
) |
Sets the property with the given name for the given image to the specified value and extraValue
References PropertyExtraValueUnique, PropertyUnique, and value.
Referenced by Digikam::ItemCopyright::replaceFrom(), Digikam::ItemCopyright::setCreator(), Digikam::ItemCopyright::setLanguageProperty(), and Digikam::ItemCopyright::setSimpleProperty().
void Digikam::CoreDB::setItemHistory | ( | qlonglong | imageId, |
const QString & | history | ||
) |
Changes (adds or updates) the image history
References Digikam::DatabaseFields::ImageHistory.
Referenced by Digikam::ItemScanner::commitImageHistory(), and Digikam::ItemInfo::setItemHistory().
void Digikam::CoreDB::setItemManualOrder | ( | qlonglong | imageID, |
qlonglong | value | ||
) |
Updates the manualOrder field for the item.
References Digikam::DatabaseFields::ManualOrder, and value.
Referenced by Digikam::ItemInfo::setManualOrder().
void Digikam::CoreDB::setItemModificationDate | ( | qlonglong | imageID, |
const QDateTime & | modificationDate | ||
) |
Updates the modification date field for the item.
References Digikam::DatabaseFields::ModificationDate.
Referenced by Digikam::ItemInfo::setModDateTime().
void Digikam::CoreDB::setItemStatus | ( | qlonglong | imageID, |
DatabaseItem::Status | status | ||
) |
Updates the status field for the item. Note: Do not use this to set to the Removed status, see removeItems().
References Digikam::DatabaseFields::Status.
Referenced by Digikam::ItemScanner::commitAddImage(), Digikam::CollectionScanner::completeScanCleanupPart(), and Digikam::ItemInfo::setVisible().
void Digikam::CoreDB::setSetting | ( | const QString & | keyword, |
const QString & | value | ||
) |
This adds a keyword-value combination to the database Settings table if the keyword already exists, the value will be replaced with the new value.
keyword | The keyword |
value | The value |
References value.
Referenced by databaseUuid(), Digikam::CollectionScanner::incrementDeleteRemovedCompleteScanCount(), Digikam::CollectionScanner::markDatabaseAsScanned(), Digikam::CollectionScanner::resetDeleteRemovedSettings(), Digikam::AlbumManager::setDatabase(), setFilterSettings(), setIgnoreDirectoryFilterSettings(), setUniqueHashVersion(), setUserFilterSettings(), setUserIgnoreDirectoryFilterSettings(), and Digikam::CollectionScanner::updateRemovedItemsTime().
void Digikam::CoreDB::setTagIcon | ( | int | tagID, |
const QString & | iconKDE, | ||
qlonglong | iconID | ||
) |
Set the icon for the tag.
tagID | the id of the tag |
iconKDE | the filename for the kde icon file |
iconID | the id of the icon file Note: Only one of the iconKDE or iconID parameters is used. if the iconKDE parameter is empty, then the iconID parameter is used |
References Digikam::TagChangeset::IconChanged.
Referenced by Digikam::AlbumManager::updateTAlbumIcon().
void Digikam::CoreDB::setTagName | ( | int | tagID, |
const QString & | name | ||
) |
Set a new name for the tag.
tagID | the id of the tag |
name | the new name for the tag |
References Digikam::TagChangeset::Renamed.
Referenced by Digikam::AlbumManager::renameTAlbum().
void Digikam::CoreDB::setTagParentID | ( | int | tagID, |
int | newParentTagID | ||
) |
Set the parent tagid for the tag. This is equivalent to reparenting the tag
tagID | the id of the tag |
newParentTagID | the new parentid for the tag |
References Digikam::TagChangeset::Reparented.
Referenced by Digikam::AlbumManager::moveTAlbum().
void Digikam::CoreDB::setUniqueHashVersion | ( | int | version | ) |
References setSetting().
Referenced by Digikam::CoreDbSchemaUpdater::updateUniqueHash().
void Digikam::CoreDB::setUserFilterSettings | ( | const QStringList & | imageFilter, |
const QStringList & | videoFilter, | ||
const QStringList & | audioFilter | ||
) |
Sets the user-configurable filter settings. The lists shall be as specified for getFilterSettings. They may include entries starting with "-", which indicates that this format shall be removed from the list, if it is included in the main settings list.
References setSetting().
Referenced by Digikam::SetupMime::applySettings().
void Digikam::CoreDB::setUserIgnoreDirectoryFilterSettings | ( | const QStringList & | ignoreDirectoryFilters | ) |
References setSetting().
Referenced by Digikam::SetupCollections::applySettings().
void Digikam::CoreDB::updateItem | ( | qlonglong | imageID, |
DatabaseItem::Category | category, | ||
const QDateTime & | modificationDate, | ||
qlonglong | fileSize, | ||
const QString & | uniqueHash | ||
) |
Update the fields of the Images table that have changed when the file has been modified on disk.
imageID | the image that has been modified |
References Digikam::DatabaseFields::Category, Digikam::DatabaseFields::FileSize, Digikam::DatabaseFields::ModificationDate, and Digikam::DatabaseFields::UniqueHash.
Referenced by Digikam::ItemScanner::commitUpdateImage().
void Digikam::CoreDB::updateSearch | ( | int | searchID, |
DatabaseSearch::Type | type, | ||
const QString & | name, | ||
const QString & | query | ||
) |
Updates Search with new attributes
searchID | the id of the search |
type | type of the search |
query | database query of the search |
References Digikam::SearchChangeset::Changed.
Referenced by Digikam::AlbumManager::updateSAlbum().
void Digikam::CoreDB::vacuum | ( | ) |
Shrinks the database.
References Digikam::DatabaseFields::ImageMetadataAll, Digikam::DatabaseFields::ImageRelations, Digikam::DatabaseFields::ImagesAll, Digikam::DatabaseFields::ItemCommentsAll, Digikam::DatabaseFields::ItemPositionsAll, Digikam::ImageTagChangeset::PropertiesChanged, Digikam::ImageTagChangeset::RemovedAll, and Digikam::DatabaseFields::VideoMetadataAll.
Referenced by Digikam::DatabaseTask::run().
|
static |
References Digikam::DatabaseFields::AspectRatio, Digikam::DatabaseFields::AudioBitRate, Digikam::DatabaseFields::AudioChannelType, Digikam::DatabaseFields::AudioCodec, Digikam::DatabaseFields::Duration, Digikam::DatabaseFields::FrameRate, and Digikam::DatabaseFields::VideoCodec.
Referenced by addVideoMetadata(), changeVideoMetadata(), and getVideoMetadata().
|
friend |