digiKam
|
Abstract base class for all album types. More...
Public Types | |
enum | Type { PHYSICAL =0 , TAG , DATE , SEARCH , FACE } |
Public Member Functions | |
QList< int > | childAlbumIds (bool recursive=false) |
AlbumList | childAlbums (bool recursive=false) |
Album * | childAtRow (int row) const |
int | childCount () const |
virtual CoreDbUrl | databaseUrl () const =0 |
void * | extraData (const void *const key) const |
Album * | firstChild () const |
int | globalID () const |
int | id () const |
bool | isAncestorOf (Album *const album) const |
bool | isRoot () const |
bool | isTrashAlbum () const |
bool | isUsedByLabelsTree () const |
Album * | lastChild () const |
Album * | next () const |
Album * | parent () const |
Album * | prev () const |
void | removeExtraData (const void *const key) |
int | rowFromAlbum () const |
void | setExtraData (const void *const key, void *const value) |
void | setUsedByLabelsTree (bool isUsed) |
QString | title () const |
Type | type () const |
Static Public Member Functions | |
static int | globalID (Type type, int id) |
Produces the global id. More... | |
Protected Member Functions | |
Album (Album::Type type, int id, bool root) | |
void | clear () |
void | insertChild (Album *const child) |
void | removeChild (Album *const child) |
void | setParent (Album *const parent) |
void | setTitle (const QString &title) |
virtual | ~Album () |
Friends | |
class | AlbumManager |
Abstract base class for all album types.
A class which provides an abstraction for a type Album. This class is meant to be derived and every time a new Album Type is defined add a enum corresponding to that to Album::Type
This class provides a means of building a tree representation for Albums
enum Digikam::Album::Type |
|
protected |
Constructor
|
protectedvirtual |
Destructor
this will also recursively delete all child Albums
References clear(), and removeChild().
QList< int > Digikam::Album::childAlbumIds | ( | bool | recursive = false | ) |
References childAlbums().
Referenced by Digikam::AlbumManager::subTags().
AlbumList Digikam::Album::childAlbums | ( | bool | recursive = false | ) |
Referenced by childAlbumIds().
Album * Digikam::Album::childAtRow | ( | int | row | ) | const |
Referenced by Digikam::AbstractAlbumModel::index().
int Digikam::Album::childCount | ( | ) | const |
childCount
of the album Referenced by Digikam::AbstractAlbumModel::rowCount().
|
protected |
Delete all child albums and also remove any associated extra data
Referenced by ~Album().
|
pure virtual |
Implemented in Digikam::SAlbum, Digikam::DAlbum, Digikam::TAlbum, and Digikam::PAlbum.
References Digikam::operator==().
Referenced by Digikam::ItemInfoJob::allItemsFromAlbum().
void * Digikam::Album::extraData | ( | const void *const | key | ) | const |
Retrieve the associated extra data associated with key
key | the key of the extra data |
Referenced by Digikam::FindDuplicatesView::populateTreeView().
Album * Digikam::Album::firstChild | ( | ) | const |
Referenced by Digikam::AlbumManager::createPAlbum(), Digikam::AbstractSpecificAlbumModel::emitDataChangedForChildren(), Digikam::AlbumManager::findSAlbum(), Digikam::AlbumManager::findSAlbumsBySearchType(), Digikam::AbstractAlbumModel::hasChildren(), Digikam::AlbumManager::mergeTAlbum(), and Digikam::AlbumIterator::operator++().
int Digikam::Album::globalID | ( | ) | const |
An album ID is only unique among the set of all Albums of its Type. This is a global Identifier which will uniquely identifying the Album among all Albums
You can always get the ID
of the album using something like
globalID
of the album Referenced by Digikam::DBInfoIface::albumChooserItems(), Digikam::AbstractAlbumModel::albumData(), Digikam::AlbumManager::createSAlbum(), Digikam::AlbumManager::deleteSAlbum(), Digikam::AlbumManager::findAlbum(), Digikam::AlbumManager::findDAlbum(), Digikam::AlbumManager::findPAlbum(), Digikam::AlbumManager::findSAlbum(), Digikam::AlbumManager::findTAlbum(), Digikam::AlbumThumbnailLoader::getAlbumThumbnailDirectly(), Digikam::AlbumThumbnailLoader::getFaceThumbnailDirectly(), Digikam::AlbumThumbnailLoader::getTagThumbnailDirectly(), Digikam::ImportUI::slotDownload(), Digikam::AlbumThumbnailLoader::slotGotThumbnailFromIcon(), Digikam::AlbumThumbnailLoader::slotIconChanged(), and Digikam::AlbumManager::startScan().
|
static |
int Digikam::Album::id | ( | ) | const |
Each album has a ID
uniquely identifying it in the set of Albums of a Type
ID
for a root Album is always 0ID
of the album Referenced by Digikam::TagFolderView::addCustomContextMenuActions(), Digikam::ContextMenuHelper::addGotoMenu(), Digikam::AbstractCountingAlbumModel::albumCleared(), Digikam::AbstractCountingAlbumModel::albumCount(), Digikam::AbstractAlbumModel::albumData(), Digikam::AbstractCountingAlbumModel::albumData(), Digikam::AlbumModel::albumData(), Digikam::TagModel::albumData(), Digikam::AlbumManager::albumTitles(), Digikam::SetupCamera::applySettings(), Digikam::ItemAlbumFilterModel::compareInfosCategories(), Digikam::DigikamItemView::confirmFaces(), Digikam::TagDragDropHandler::createMimeData(), Digikam::TagEditDlg::createTAlbum(), Digikam::AlbumManager::createTAlbum(), Digikam::AlbumManager::deleteSAlbum(), Digikam::AlbumManager::deleteTAlbum(), Digikam::AbstractAlbumTreeView::doSaveState(), Digikam::AbstractCheckableAlbumTreeView::doSaveState(), Digikam::ItemDragDropHandler::dropEvent(), Digikam::TagDragDropHandler::dropEvent(), Digikam::DuplicatesFinder::DuplicatesFinder(), Digikam::SearchTabHeader::editSearch(), Digikam::AbstractCountingAlbumModel::excludeChildrenCount(), Digikam::TagModel::fontRoleData(), Digikam::AlbumManager::getItemFromAlbum(), globalID(), Digikam::ScanController::hintAtMoveOrCopyOfItem(), Digikam::ScanController::hintAtMoveOrCopyOfItems(), Digikam::AbstractCountingAlbumModel::includeChildrenCount(), Digikam::AlbumFilterModel::lessThan(), Digikam::AlbumManager::mergeTAlbum(), Digikam::AlbumManager::moveTAlbum(), Digikam::SearchFieldAlbum::read(), Digikam::SearchFieldLabels::read(), Digikam::AlbumManager::renamePAlbum(), Digikam::AlbumManager::renameTAlbum(), Digikam::TagList::restoreSettings(), Digikam::AbstractAlbumTreeView::rowsAboutToBeRemoved(), Digikam::AlbumSelectors::selectedAlbumIds(), Digikam::AlbumSelectors::selectedTagIds(), Digikam::TagFolderView::setContexMenuItems(), Digikam::AbstractCountingAlbumModel::setCount(), Digikam::AddTagsLineEdit::setCurrentTag(), Digikam::AddTagsLineEdit::setParentTag(), Digikam::FaceGroup::slotAlbumRenamed(), Digikam::ItemIconView::slotAlbumSelected(), Digikam::TagModificationHelper::slotMultipleFaceTagDel(), Digikam::ItemIconView::slotRefresh(), Digikam::TagModificationHelper::slotTagToFaceTag(), Digikam::AddTagsComboBox::slotViewIndexActivated(), Digikam::AlbumManager::tagNames(), Digikam::AlbumManager::tagPaths(), Digikam::AlbumManager::updatePAlbumIcon(), Digikam::AlbumManager::updateSAlbum(), Digikam::AlbumManager::updateTAlbumIcon(), Digikam::SearchFieldAlbum::write(), and Digikam::SearchFieldLabels::write().
|
protected |
Referenced by setParent().
bool Digikam::Album::isAncestorOf | ( | Album *const | album | ) | const |
album
is in the parent hierarchyalbum | the album to check whether it belongs in the child hierarchy |
References isRoot(), and parent().
Referenced by Digikam::AlbumDragDropHandler::accepts(), Digikam::TagDragDropHandler::accepts(), Digikam::AlbumManager::createTAlbum(), Digikam::AlbumManager::moveTAlbum(), Digikam::ItemAlbumModel::slotCollectionImageChange(), and Digikam::ItemAlbumModel::slotImageTagChange().
bool Digikam::Album::isRoot | ( | ) | const |
Referenced by Digikam::AlbumDragDropHandler::accepts(), Digikam::TagDragDropHandler::accepts(), Digikam::ContextMenuHelper::addActionDeleteAlbum(), Digikam::ContextMenuHelper::addActionEditAlbum(), Digikam::ContextMenuHelper::addActionRenameAlbum(), Digikam::ContextMenuHelper::addActionResetAlbumIcon(), Digikam::TagFolderView::addCustomContextMenuActions(), Digikam::AbstractCountingAlbumModel::albumData(), Digikam::AbstractCheckableAlbumModel::albumData(), Digikam::TagModel::albumData(), Digikam::AlbumDragDropHandler::createMimeData(), Digikam::AlbumManager::createPAlbum(), Digikam::TagEditDlg::createTAlbum(), Digikam::ItemDragDropHandler::dropEvent(), Digikam::AlbumThumbnailLoader::getStandardAlbumIcon(), Digikam::AlbumThumbnailLoader::getStandardTagIcon(), isAncestorOf(), Digikam::AlbumFilterModel::matchResult(), Digikam::PAlbumPath::PAlbumPath(), Digikam::AlbumSelectDialog::selectAlbum(), Digikam::TagMngrTreeView::setContexMenuItems(), Digikam::AbstractAlbumModel::slotAlbumAboutToBeAdded(), Digikam::AlbumWatch::slotAlbumAboutToBeDeleted(), Digikam::AbstractAlbumModel::slotAlbumAboutToBeDeleted(), Digikam::AlbumWatch::slotAlbumAdded(), Digikam::AlbumModificationHelper::slotAlbumDelete(), Digikam::AlbumModificationHelper::slotAlbumEdit(), Digikam::AlbumModificationHelper::slotAlbumNew(), Digikam::ItemIconView::slotAlbumOpenInFileManager(), Digikam::ItemIconView::slotAlbumSelected(), Digikam::TagModificationHelper::slotMultipleFaceTagDel(), Digikam::TagModificationHelper::slotMultipleTagDel(), Digikam::TagPropWidget::slotSelectionChanged(), Digikam::TagModificationHelper::slotTagDelete(), Digikam::TAlbum::tagIDs(), and Digikam::TAlbum::tagPath().
bool Digikam::Album::isTrashAlbum | ( | ) | const |
References PHYSICAL.
Referenced by Digikam::AlbumDragDropHandler::accepts(), Digikam::AlbumModel::albumData(), Digikam::ToolTipFiller::albumTipContents(), Digikam::AlbumDragDropHandler::createMimeData(), Digikam::AlbumThumbnailLoader::getStandardAlbumIcon(), Digikam::AlbumFilterModel::lessThan(), Digikam::AlbumWatch::slotAlbumAboutToBeDeleted(), Digikam::AlbumWatch::slotAlbumAdded(), and Digikam::ItemIconView::slotAlbumSelected().
bool Digikam::Album::isUsedByLabelsTree | ( | ) | const |
Album * Digikam::Album::lastChild | ( | ) | const |
Referenced by Digikam::AlbumManager::createSAlbum(), and Digikam::AlbumManager::moveTAlbum().
Album * Digikam::Album::next | ( | ) | const |
Referenced by Digikam::AlbumManager::createPAlbum(), Digikam::AbstractSpecificAlbumModel::emitDataChangedForChildren(), Digikam::AlbumManager::findSAlbum(), Digikam::AlbumManager::findSAlbumsBySearchType(), and Digikam::AlbumIterator::operator++().
Album * Digikam::Album::parent | ( | ) | const |
Referenced by Digikam::TagDragDropHandler::accepts(), Digikam::AlbumModel::albumData(), isAncestorOf(), Digikam::AlbumFilterModel::matchResult(), Digikam::AlbumManager::moveTAlbum(), Digikam::AlbumIterator::operator++(), Digikam::AbstractAlbumModel::parent(), setParent(), Digikam::AbstractAlbumModel::slotAlbumAboutToBeDeleted(), Digikam::ItemIconView::slotAlbumSelected(), Digikam::TagModificationHelper::slotMultipleTagDel(), Digikam::TAlbum::tagIDs(), and Digikam::TAlbum::tagPath().
Album * Digikam::Album::prev | ( | ) | const |
|
protected |
Referenced by Digikam::AlbumManager::moveTAlbum(), and ~Album().
void Digikam::Album::removeExtraData | ( | const void *const | key | ) |
Remove the associated extra data associated with key
key | the key of the extra data |
int Digikam::Album::rowFromAlbum | ( | ) | const |
rowFromAlbum
of the album Referenced by Digikam::ItemAlbumFilterModel::compareInfosCategories(), Digikam::AbstractAlbumModel::indexForAlbum(), Digikam::AbstractAlbumModel::slotAlbumAboutToBeAdded(), and Digikam::AbstractAlbumModel::slotAlbumAboutToBeDeleted().
void Digikam::Album::setExtraData | ( | const void *const | key, |
void *const | value | ||
) |
This allows to associate some "extra" data to a Album. As one Album can be used by several objects (often views) which all need to add some data, you have to use a key to reference your extra data within the Album.
That way a Album can hold and provide access to all those views separately.
for eg,
and can later access the searchFolderItem by doing
Note: you have to remove and destroy the data you associated yourself when you don't need it anymore!
key | the key of the extra data |
value | the value of the extra data |
References value.
Referenced by Digikam::FindDuplicatesView::populateTreeView().
|
protected |
References insertChild(), and parent().
Referenced by Digikam::AlbumManager::createSAlbum(), and Digikam::AlbumManager::moveTAlbum().
|
protected |
void Digikam::Album::setUsedByLabelsTree | ( | bool | isUsed | ) |
Sets the property m_usedByLabelsTree to true if the search album was created using the Colors and labels tree view
isUsed | => the status of the usage |
QString Digikam::Album::title | ( | ) | const |
title
aka name of the album Referenced by Digikam::AbstractAlbumModel::albumData(), Digikam::SearchModel::albumData(), Digikam::DBInfoIface::albumInfo(), Digikam::AbstractCountingAlbumModel::albumName(), Digikam::AlbumPropsEdit::AlbumPropsEdit(), Digikam::ToolTipFiller::albumTipContents(), Digikam::AlbumManager::albumTitles(), Digikam::ListItem::data(), Digikam::AlbumFilterModel::dataForCurrentSortRole(), Digikam::SAlbum::displayTitle(), Digikam::TagDragDropHandler::dropEvent(), Digikam::ImageWindow::dropEvent(), Digikam::ScanController::hintAtMoveOrCopyOfAlbum(), Digikam::SAlbum::isTemporarySearch(), Digikam::lessThanByTitle(), Digikam::TagsManagerFilterModel::matches(), Digikam::AlbumManager::mergeTAlbum(), Digikam::AlbumManager::moveTAlbum(), Digikam::ItemViewUtilities::openInfos(), Digikam::PAlbum::PAlbum(), Digikam::AlbumManager::renamePAlbum(), Digikam::SAlbum::SAlbum(), Digikam::SearchTabHeader::selectedSearchChanged(), Digikam::AddTagsLineEdit::setCurrentTag(), setTitle(), Digikam::AlbumModificationHelper::slotAlbumEdit(), Digikam::AlbumModificationHelper::slotAlbumRename(), Digikam::TagModificationHelper::slotMultipleFaceTagDel(), Digikam::SearchModificationHelper::slotSearchRename(), Digikam::TagPropWidget::slotSelectionChanged(), Digikam::AddTagsComboBox::slotViewIndexActivated(), Digikam::AbstractAlbumModel::sortRoleData(), Digikam::AlbumManager::tagNames(), Digikam::TAlbum::tagPath(), Digikam::TAlbum::TAlbum(), and Digikam::AlbumManager::updateSAlbum().
Album::Type Digikam::Album::type | ( | ) | const |
Referenced by Digikam::ContextMenuHelper::addAlbumCheckUncheckActions(), Digikam::ContextMenuHelper::addGotoMenu(), Digikam::ContextMenuHelper::addStandardActionThumbnail(), Digikam::AbstractAlbumModel::albumData(), Digikam::DBInfoIface::albumItems(), Digikam::ItemInfoJob::allItemsFromAlbum(), Digikam::ItemViewUtilities::createNewAlbumForInfos(), Digikam::AlbumFilterModel::dataForCurrentSortRole(), Digikam::DBInfoIface::defaultUploadUrl(), Digikam::ItemDragDropHandler::dropEvent(), Digikam::AbstractAlbumModel::filterAlbum(), Digikam::SAlbum::getTemporaryTitle(), globalID(), Digikam::AlbumFilterModel::lessThan(), Digikam::ItemViewUtilities::setAsAlbumThumbnail(), Digikam::AlbumWatch::slotAlbumAboutToBeDeleted(), Digikam::AlbumWatch::slotAlbumAdded(), Digikam::ItemAlbumModel::slotAlbumDeleted(), Digikam::ItemIconView::slotAlbumOpenInFileManager(), Digikam::AlbumFilterModel::slotAlbumRenamed(), Digikam::FaceGroup::slotAlbumRenamed(), Digikam::ImportUI::slotDownload(), Digikam::AlbumThumbnailLoader::slotIconChanged(), and Digikam::ItemIconView::slotRefresh().
|
friend |