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

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
 
QString displayTitle () const
 
void * extraData (const void *const key) const
 
AlbumfirstChild () const
 
int globalID () const
 
int id () const
 
bool isAdvancedSearch () const
 
bool isAncestorOf (Album *const album) const
 
bool isDuplicatesSearch () const
 
bool isHaarSearch () const
 
bool isKeywordSearch () const
 
bool isMapSearch () const
 
bool isNormalSearch () const
 
bool isRoot () const
 
bool isTemporarySearch () const
 
bool isTimelineSearch () const
 
bool isTrashAlbum () const
 
bool isUsedByLabelsTree () const
 
AlbumlastChild () const
 
Albumnext () const
 
Albumparent () const
 
Albumprev () const
 
QString query () const
 
void removeExtraData (const void *const key)
 
int rowFromAlbum () const
 
 SAlbum (const QString &title, int id, bool root=false)
 
DatabaseSearch::Type searchType () const
 
void setExtraData (const void *const key, void *const value)
 
void setUsedByLabelsTree (bool isUsed)
 
QString title () const
 
Type type () const
 
 ~SAlbum () override
 

Static Public Member Functions

static QString getTemporaryHaarTitle (DatabaseSearch::HaarSearchType haarType)
 
static QString getTemporaryTitle (DatabaseSearch::Type type, DatabaseSearch::HaarSearchType haarType=DatabaseSearch::HaarImageSearch)
 
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 Search 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

◆ SAlbum()

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

◆ ~SAlbum()

Digikam::SAlbum::~SAlbum ( )
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::SAlbum::databaseUrl ( ) const
overridevirtual
Returns
the kde url of the album

Implements Digikam::Album.

References Digikam::CoreDbUrl::searchUrl().

◆ displayTitle()

◆ 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()

◆ getTemporaryHaarTitle()

QString Digikam::SAlbum::getTemporaryHaarTitle ( DatabaseSearch::HaarSearchType  haarType)
static

Returns the title for a temporary haar search depending on the sub-type used for this search

Parameters
haarTypetype of the haar search to get the name for
Returns
string that identifies this album uniquely as an unsaved search

References Digikam::DatabaseSearch::HaarImageSearch, and Digikam::DatabaseSearch::HaarSketchSearch.

Referenced by displayTitle(), Digikam::FuzzySearchView::dropEvent(), getTemporaryTitle(), isTemporarySearch(), Digikam::FuzzySearchView::setItemInfo(), and Digikam::ItemIconView::Private::userPresentableAlbumTitle().

◆ getTemporaryTitle()

QString Digikam::SAlbum::getTemporaryTitle ( DatabaseSearch::Type  type,
DatabaseSearch::HaarSearchType  haarType = DatabaseSearch::HaarImageSearch 
)
static

Returns the title of search albums that is used to mark them as a temporary search that isn't saved officially yet and is only used for viewing purposes.

Parameters
typethe type of the search to get the temporary title for
haarTypethere are several haar searches, so that this search type needs a special handling
Returns
string that identifies this album uniquely as an unsaved search

References Digikam::DatabaseSearch::AdvancedSearch, Digikam::DatabaseSearch::DuplicatesSearch, getTemporaryHaarTitle(), Digikam::DatabaseSearch::HaarSearch, Digikam::DatabaseSearch::KeywordSearch, Digikam::DatabaseSearch::LegacyUrlSearch, Digikam::DatabaseSearch::MapSearch, Digikam::DatabaseSearch::TimeLineSearch, and Digikam::Album::type().

Referenced by isTemporarySearch(), Digikam::SearchTabHeader::selectedSearchChanged(), and Digikam::ItemIconView::Private::userPresentableAlbumTitle().

◆ 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().

◆ 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

◆ isAdvancedSearch()

bool Digikam::SAlbum::isAdvancedSearch ( ) const

◆ isAncestorOf()

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

◆ isDuplicatesSearch()

bool Digikam::SAlbum::isDuplicatesSearch ( ) const

◆ isHaarSearch()

bool Digikam::SAlbum::isHaarSearch ( ) const

◆ isKeywordSearch()

bool Digikam::SAlbum::isKeywordSearch ( ) const

◆ isMapSearch()

bool Digikam::SAlbum::isMapSearch ( ) const

◆ isNormalSearch()

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

◆ isTemporarySearch()

bool Digikam::SAlbum::isTemporarySearch ( ) const

◆ isTimelineSearch()

bool Digikam::SAlbum::isTimelineSearch ( ) const

◆ 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()

◆ 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

◆ query()

◆ 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()

◆ searchType()

◆ 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

◆ 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: