digiKam
|
Public Slots | |
void | slotFaceTagDelete () |
void | slotFaceTagDelete (TAlbum *tag) |
void | slotMultipleFaceTagDel () |
void | slotMultipleFaceTagDel (const QList< TAlbum * > &tags) |
void | slotMultipleTagDel () |
void | slotMultipleTagDel (const QList< TAlbum * > &tags) |
must use bindTag and a QAction More... | |
void | slotMultipleTagsToFaceTags () |
void | slotMultipleTagsToFaceTags (const QList< TAlbum * > &tags) |
void | slotTagDelete () |
void | slotTagDelete (TAlbum *tag) |
void | slotTagEdit () |
void | slotTagEdit (TAlbum *tag) |
TAlbum * | slotTagNew () |
TAlbum * | slotTagNew (TAlbum *parent, const QString &title=QString(), const QString &iconName=QString()) |
void | slotTagToFaceTag () |
void | slotTagToFaceTag (TAlbum *tag) |
Signals | |
void | aboutToDeleteTag (TAlbum *tag) |
void | tagCreated (TAlbum *tag) |
void | tagEdited (TAlbum *tag) |
Public Member Functions | |
void | bindMultipleTags (QAction *action, const QList< TAlbum * > &tags) |
void | bindTag (QAction *action, TAlbum *parent) const |
QList< TAlbum * > | boundMultipleTags (QObject *sender) |
TAlbum * | boundTag (QObject *action) const |
TagModificationHelper (QObject *const parent, QWidget *const dialogParent) | |
~TagModificationHelper () override | |
Utility class providing methods to modify tag albums (TAlbum) in a way useful to implement views.
This class can do background processing for batch tag operations. So be sure that the signals indicating the progress of these operations are used.
|
explicit |
Constructor.
parent | the parent for qt parent child mechanism |
dialogParent | parent widget for dialogs displayed by this object |
|
override |
Destructor.
|
signal |
Referenced by slotMultipleTagDel(), and slotTagDelete().
void Digikam::TagModificationHelper::bindMultipleTags | ( | QAction * | action, |
const QList< TAlbum * > & | tags | ||
) |
Set QVector's pointer into action's data. Make sure that QVector is not a local object and it's not destroyed before boundMultipleTags are called
action | - action to store pointer |
tags | - QVector pointer to be stored |
Referenced by Digikam::ContextMenuHelper::addActionDeleteFaceTags(), Digikam::ContextMenuHelper::addActionDeleteTags(), and Digikam::ContextMenuHelper::addActionTagsToFaceTags().
void Digikam::TagModificationHelper::bindTag | ( | QAction * | action, |
TAlbum * | parent | ||
) | const |
Sets the tag that the given action operates on. You must call bindTag and then connect the action's triggered to the desired slot, slotTagNew(), slotTagEdit() or slotTagDelete(). Note: Changes the Action's user data.
Referenced by Digikam::ContextMenuHelper::addActionDeleteFaceTag(), Digikam::ContextMenuHelper::addActionDeleteTag(), Digikam::ContextMenuHelper::addActionEditTag(), Digikam::ContextMenuHelper::addActionNewTag(), and Digikam::ContextMenuHelper::addActionTagToFaceTag().
Return QVector pointer bound with bindMultipleTags. Use when context menu should delete more than one item: multiple-selection.
Referenced by slotMultipleFaceTagDel(), slotMultipleTagDel(), and slotMultipleTagsToFaceTags().
TAlbum * Digikam::TagModificationHelper::boundTag | ( | QObject * | action | ) | const |
Returns the tag bound with bindTag. The given QObject shall be a QAction, but for convenience the given object will be checked with qobject_cast first, so you can pass QObject::sender().
Referenced by slotFaceTagDelete(), slotTagDelete(), slotTagEdit(), slotTagNew(), and slotTagToFaceTag().
|
slot |
must use bindTag and a QAction
References boundTag().
|
slot |
Deletes the given face tag and after prompting the user for this. The tag itself is not deleted. Only its property as face tag.
tag | the face tag to delete |
References slotMultipleFaceTagDel().
|
slot |
must use bindMultipleTags and a QAction
References boundMultipleTags().
Referenced by slotFaceTagDelete().
Delete multiple face tags and prompt user only once for all The tags itself are not deleted. Only their properties as face tags.
tags | face tags to be deleted. |
References Digikam::ImageTagPropertyName::autodetectedFace(), Digikam::CoreDbAccess::db(), Digikam::FaceDbAccess::db(), Digikam::FaceDb::deleteIdentity(), Digikam::TagPropertyName::faceEngineName(), Digikam::TagPropertyName::faceEngineUuid(), Digikam::ItemInfo::filePath(), Digikam::CoreDB::getImagesWithImageTagProperty(), Digikam::Album::id(), Digikam::AlbumManager::instance(), Digikam::ItemTagPair::isAssigned(), Digikam::ItemInfo::isNull(), Digikam::Album::isRoot(), Digikam::FaceTags::isSystemPersonTagId(), Digikam::MetadataHub::load(), Digikam::TagPropertyName::person(), Digikam::ItemTagPair::removeProperties(), Digikam::TagProperties::removeProperties(), Digikam::TAlbum::standardIconName(), Digikam::ImageTagPropertyName::tagRegion(), Digikam::Album::title(), Digikam::ItemTagPair::unAssignTag(), Digikam::AlbumManager::updateTAlbumIcon(), Digikam::TagProperties::value(), and Digikam::MetadataHub::writeToMetadata().
|
slot |
must use bindMultipleTags and a QAction
References boundMultipleTags().
must use bindTag and a QAction
Delete multiple tags and prompt user only once for all
tags | the tags to be deleted, without root tag |
Tags must be deleted from children to parents, if we don't want to step on invalid index. Use QMultiMap to order them by distance to root tag
QMultimap doesn't provide reverse iterator, -1 is required because end() points after the last element
References aboutToDeleteTag(), Digikam::AlbumIterator::current(), Digikam::CoreDbAccess::db(), Digikam::CoreDB::getItemIDsInTag(), Digikam::AlbumManager::instance(), Digikam::Album::isRoot(), and Digikam::Album::parent().
|
slot |
must use bindMultipleTags and a QAction
References boundMultipleTags().
|
slot |
Marks the tags as face tags if they are not already.
tags | the tags to mark. |
References slotTagToFaceTag().
|
slot |
must use bindTag and a QAction
References boundTag().
|
slot |
Deletes the given tag and after prompting the user for this.
tag | the tag to delete, must not be the root tag album |
References aboutToDeleteTag(), Digikam::AlbumIterator::current(), Digikam::CoreDbAccess::db(), Digikam::CoreDB::getItemIDsInTag(), Digikam::AlbumManager::instance(), and Digikam::Album::isRoot().
Referenced by Digikam::ItemIconView::slotDeleteTag().
|
slot |
must use bindTag and a QAction
References boundTag().
|
slot |
Edits the given tag via a user dialog.
tag | the tag to change |
References Digikam::TagsActionMngr::defaultManager(), Digikam::TagPropertyName::faceEngineName(), Digikam::AlbumManager::instance(), Digikam::FaceTags::isPerson(), Digikam::TagPropertyName::person(), Digikam::TagProperties::setProperty(), Digikam::TagEditDlg::tagEdit(), tagEdited(), Digikam::TagPropertyName::tagKeyboardShortcut(), and Digikam::TagsActionMngr::updateTagShortcut().
Referenced by Digikam::TagFolderView::keyPressEvent(), and Digikam::ItemIconView::slotEditTag().
|
slot |
Same as above, but this slot can be triggered from a QAction if a parent tag is bound to this action, see below. Without this mechanism, will add a toplevel tag.
References boundTag().
|
slot |
Creates one ore more new tags under the given parent. If only the parent is given, then a dialog is shown to create new tags. Else, if also a title and optionally an icon are given, then these values will be used directly to create the tag.
parent | the parent tag album under which to create the new tags. May be 0 to use the root album |
title | if this isn't an empty string, then this tag name is suggested |
iconName | an optional name for the icon to suggest for the new tag |
References Digikam::TagEditDlg::createTAlbum(), Digikam::AlbumManager::findTAlbum(), Digikam::AlbumManager::instance(), Digikam::TagEditDlg::showtagsListCreationError(), Digikam::TagEditDlg::tagCreate(), and tagCreated().
Referenced by Digikam::ItemIconView::slotNewTag().
|
slot |
|
slot |
Marks the tag as face tag if it is not already.
tag | the tag to mark |
References Digikam::FaceTags::ensureIsPerson(), Digikam::Album::id(), Digikam::AlbumManager::instance(), Digikam::FaceTags::isPerson(), Digikam::TAlbum::standardIconName(), and Digikam::AlbumManager::updateTAlbumIcon().
|
signal |
Referenced by slotTagNew().
|
signal |
Referenced by slotTagEdit().