digiKam
Digikam::TAlbum Class Reference
+ Inheritance diagram for Digikam::TAlbum:

Public Types

enum  Type {
  PHYSICAL =0 , TAG , DATE , SEARCH ,
  FACE
}
 

Public Member Functions

QList< int > childAlbumIds (bool recursive=false)
 
AlbumList childAlbums (bool recursive=false)
 
AlbumchildAtRow (int row) const
 
int childCount () const
 
CoreDbUrl databaseUrl () const override
 
void * extraData (const void *const key) const
 
AlbumfirstChild () const
 
int globalID () const
 
bool hasProperty (const QString &key) const
 
QString icon () const
 
qlonglong iconId () const
 
int id () const
 
bool isAncestorOf (Album *const album) const
 
bool isInternalTag () const
 
bool isRoot () const
 
bool isTrashAlbum () const
 
bool isUsedByLabelsTree () const
 
AlbumlastChild () const
 
Albumnext () const
 
Albumparent () const
 
QString prettyUrl () const
 
Albumprev () const
 
QMap< QString, QString > properties () const
 
QString property (const QString &key) const
 
void removeExtraData (const void *const key)
 
int rowFromAlbum () const
 
void setExtraData (const void *const key, void *const value)
 
void setUsedByLabelsTree (bool isUsed)
 
QString standardIconName () const
 
QList< int > tagIDs () const
 
QString tagPath (bool leadingSlash=true) const
 
 TAlbum (const QString &title, int id, bool root=false)
 
QString title () const
 
Type type () const
 
 ~TAlbum () override
 

Static Public Member Functions

static int globalID (Type type, int id)
 Produces the global id. More...
 

Protected Member Functions

void clear ()
 
void insertChild (Album *const child)
 
void removeChild (Album *const child)
 
void setParent (Album *const parent)
 
void setTitle (const QString &title)
 

Friends

class AlbumManager
 

Detailed Description

A Tag Album representation

Member Enumeration Documentation

◆ Type

enum Digikam::Album::Type
inherited
Enumerator
PHYSICAL 

A physical album type.

See also
PAlbum
TAG 

A tag album type.

See also
TAlbum
DATE 

A date album type.

See also
DAlbum
SEARCH 

A search album type.

See also
SAlbum
FACE 

A faces album type.

See also
FAlbum

Constructor & Destructor Documentation

◆ TAlbum()

Digikam::TAlbum::TAlbum ( const QString &  title,
int  id,
bool  root = false 
)

◆ ~TAlbum()

Digikam::TAlbum::~TAlbum ( )
override

Member Function Documentation

◆ childAlbumIds()

QList< int > Digikam::Album::childAlbumIds ( bool  recursive = false)
inherited
Returns
a list of all child Albums

References Digikam::Album::childAlbums().

Referenced by Digikam::AlbumManager::subTags().

◆ childAlbums()

AlbumList Digikam::Album::childAlbums ( bool  recursive = false)
inherited
Returns
a list of all child Albums

Referenced by Digikam::Album::childAlbumIds().

◆ childAtRow()

Album * Digikam::Album::childAtRow ( int  row) const
inherited
Returns
the child of this album at row

Referenced by Digikam::AbstractAlbumModel::index().

◆ childCount()

int Digikam::Album::childCount ( ) const
inherited
Returns
the childCount of the album

Referenced by Digikam::AbstractAlbumModel::rowCount().

◆ clear()

void Digikam::Album::clear ( )
protectedinherited

Delete all child albums and also remove any associated extra data

Referenced by Digikam::Album::~Album().

◆ databaseUrl()

CoreDbUrl Digikam::TAlbum::databaseUrl ( ) const
overridevirtual
Returns
the kde url of the album

Implements Digikam::Album.

References Digikam::CoreDbUrl::fromTagIds(), and tagIDs().

◆ extraData()

void * Digikam::Album::extraData ( const void *const  key) const
inherited

Retrieve the associated extra data associated with key

Parameters
keythe key of the extra data
See also
setExtraData
extraData

Referenced by Digikam::FindDuplicatesView::populateTreeView().

◆ firstChild()

◆ globalID() [1/2]

int Digikam::Album::globalID ( ) const
inherited

◆ globalID() [2/2]

int Digikam::Album::globalID ( Type  type,
int  id 
)
staticinherited

Produces the global id.

Parameters
typeThe type of the album
idthe (type-specific) id of the album
Returns
the global id

References Digikam::Album::DATE, Digikam::Album::FACE, Digikam::Album::id(), Digikam::Album::PHYSICAL, Digikam::Album::SEARCH, Digikam::Album::TAG, and Digikam::Album::type().

◆ hasProperty()

◆ icon()

◆ iconId()

◆ id()

int Digikam::Album::id ( ) const
inherited

Each album has a ID uniquely identifying it in the set of Albums of a Type

Note
The ID for a root Album is always 0
Returns
the ID of the album
See also
globalID()

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(), Digikam::Album::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().

◆ insertChild()

void Digikam::Album::insertChild ( Album *const  child)
protectedinherited

◆ isAncestorOf()

bool Digikam::Album::isAncestorOf ( Album *const  album) const
inherited

◆ isInternalTag()

◆ isRoot()

bool Digikam::Album::isRoot ( ) const
inherited
Returns
true is the album is a Root Album

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(), Digikam::Album::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(), tagIDs(), and tagPath().

◆ isTrashAlbum()

◆ isUsedByLabelsTree()

bool Digikam::Album::isUsedByLabelsTree ( ) const
inherited
Returns
true if the Album was created by Labels Tree

◆ lastChild()

Album * Digikam::Album::lastChild ( ) const
inherited
Returns
the last child of this album or 0 if no children

Referenced by Digikam::AlbumManager::createSAlbum(), and Digikam::AlbumManager::moveTAlbum().

◆ next()

◆ parent()

◆ prettyUrl()

QString Digikam::TAlbum::prettyUrl ( ) const

References tagPath().

◆ prev()

Album * Digikam::Album::prev ( ) const
inherited
Returns
the previous sibling of this album of this album or 0 if no previous sibling
See also
AlbumIterator

◆ properties()

QMap< QString, QString > Digikam::TAlbum::properties ( ) const

◆ property()

◆ removeChild()

void Digikam::Album::removeChild ( Album *const  child)
protectedinherited

◆ removeExtraData()

void Digikam::Album::removeExtraData ( const void *const  key)
inherited

Remove the associated extra data associated with key

Parameters
keythe key of the extra data
See also
setExtraData
extraData

◆ rowFromAlbum()

◆ setExtraData()

void Digikam::Album::setExtraData ( const void *const  key,
void *const  value 
)
inherited

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,

album->setExtraData( this, searchFolderItem );

and can later access the searchFolderItem by doing

SearchFolderItem *item = static_cast<SearchFolderItem*>(album->extraData(this));

Note: you have to remove and destroy the data you associated yourself when you don't need it anymore!

Parameters
keythe key of the extra data
valuethe value of the extra data
See also
extraData
removeExtraData

References value.

Referenced by Digikam::FindDuplicatesView::populateTreeView().

◆ setParent()

void Digikam::Album::setParent ( Album *const  parent)
protectedinherited

◆ setTitle()

◆ setUsedByLabelsTree()

void Digikam::Album::setUsedByLabelsTree ( bool  isUsed)
inherited

Sets the property m_usedByLabelsTree to true if the search album was created using the Colors and labels tree view

Parameters
isUsed=> the status of the usage

◆ standardIconName()

◆ tagIDs()

QList< int > Digikam::TAlbum::tagIDs ( ) const

◆ tagPath()

QString Digikam::TAlbum::tagPath ( bool  leadingSlash = true) const
Returns
The tag path, e.g. "/People/Friend/John" if leadingSlash is true, "People/Friend/John" if leadingSlash if false. The root TAlbum returns "/" resp. "".

References Digikam::Album::isRoot(), Digikam::Album::parent(), and Digikam::Album::title().

Referenced by Digikam::TagEditDlg::createTAlbum(), Digikam::AlbumManager::findTAlbum(), Digikam::AlbumManager::moveTAlbum(), prettyUrl(), Digikam::TagEditDlg::TagEditDlg(), and Digikam::AlbumManager::tagPaths().

◆ title()

QString Digikam::Album::title ( ) const
inherited

◆ type()

Friends And Related Function Documentation

◆ AlbumManager

friend class AlbumManager
friend

The documentation for this class was generated from the following files: