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

Public Types

enum  AlbumType { PhysAlbum = 0 , TagsAlbum , All }
 
enum  SelectionType { SingleSelection = 0 , MultipleSelection }
 

Public Slots

void loadState ()
 
void saveState ()
 

Signals

void signalSelectionChanged ()
 

Public Member Functions

 AlbumSelectors (const QString &label, const QString &configName, QWidget *const parent=nullptr, AlbumType albumType=All)
 
void resetPAlbumSelection ()
 
void resetSelection ()
 
void resetTAlbumSelection ()
 
QList< int > selectedAlbumIds () const
 
AlbumList selectedAlbums () const
 
AlbumList selectedAlbumsAndTags () const
 
QList< int > selectedTagIds () const
 
AlbumList selectedTags () const
 
void setAlbumSelected (Album *const album, SelectionType type)
 
void setTagSelected (Album *const album, SelectionType type)
 
void setTypeSelection (int albumType)
 
int typeSelection () const
 
bool wholeAlbumsChecked () const
 
bool wholeTagsChecked () const
 
 ~AlbumSelectors () override
 

Member Enumeration Documentation

◆ AlbumType

Enumerator
PhysAlbum 
TagsAlbum 
All 

◆ SelectionType

Enumerator
SingleSelection 
MultipleSelection 

Constructor & Destructor Documentation

◆ AlbumSelectors()

Digikam::AlbumSelectors::AlbumSelectors ( const QString &  label,
const QString &  configName,
QWidget *const  parent = nullptr,
AlbumType  albumType = All 
)
explicit

Default Constructor. 'label' is front text of label which title widget. 'configName' is name used to store Albums configuration in settings file. 'parent' is parent widget.

References All, PhysAlbum, and TagsAlbum.

◆ ~AlbumSelectors()

Digikam::AlbumSelectors::~AlbumSelectors ( )
override

Member Function Documentation

◆ loadState

void Digikam::AlbumSelectors::loadState ( )
slot

Called in constructor. Restore previous settings saved in configuration file.

References All, PhysAlbum, wholeAlbumsChecked(), and wholeTagsChecked().

Referenced by Digikam::FaceScanWidget::doLoadState(), and Digikam::FuzzySearchView::doLoadState().

◆ resetPAlbumSelection()

void Digikam::AlbumSelectors::resetPAlbumSelection ( )

Reset all Physical Albums selection.

References wholeAlbumsChecked().

Referenced by resetSelection().

◆ resetSelection()

void Digikam::AlbumSelectors::resetSelection ( )

Reset all Physical and Tag Albums selection.

References resetPAlbumSelection(), and resetTAlbumSelection().

◆ resetTAlbumSelection()

void Digikam::AlbumSelectors::resetTAlbumSelection ( )

Reset all Tag Albums selection.

References wholeTagsChecked().

Referenced by resetSelection().

◆ saveState

void Digikam::AlbumSelectors::saveState ( )
slot

Save settings in configuration file. Must be called explicitly by host implementation.

References All, typeSelection(), wholeAlbumsChecked(), and wholeTagsChecked().

Referenced by Digikam::FaceScanWidget::doSaveState(), and Digikam::FuzzySearchView::doSaveState().

◆ selectedAlbumIds()

QList< int > Digikam::AlbumSelectors::selectedAlbumIds ( ) const

Return list of selected physical album ids

References Digikam::Album::id(), and selectedAlbums().

Referenced by Digikam::FuzzySearchView::dropEvent().

◆ selectedAlbums()

AlbumList Digikam::AlbumSelectors::selectedAlbums ( ) const

◆ selectedAlbumsAndTags()

AlbumList Digikam::AlbumSelectors::selectedAlbumsAndTags ( ) const

Return list of selected physical and tag albums.

References selectedAlbums(), and selectedTags().

Referenced by Digikam::FaceScanWidget::settings().

◆ selectedTagIds()

QList< int > Digikam::AlbumSelectors::selectedTagIds ( ) const

Return list of selected tag album ids

References Digikam::Album::id(), and selectedTags().

◆ selectedTags()

AlbumList Digikam::AlbumSelectors::selectedTags ( ) const

◆ setAlbumSelected()

void Digikam::AlbumSelectors::setAlbumSelected ( Album *const  album,
SelectionType  type 
)

Select Physical Album from list. If singleSelection is true, only this one is selected from tree-view and all others are deselected.

References SingleSelection.

◆ setTagSelected()

void Digikam::AlbumSelectors::setTagSelected ( Album *const  album,
SelectionType  type 
)

Select Tag Album from list. If singleSelection is true, only this one is selected from tree-view and all others are deselected.

References SingleSelection.

◆ setTypeSelection()

void Digikam::AlbumSelectors::setTypeSelection ( int  albumType)

Sets the search type selection with the AlbumType.

References All.

◆ signalSelectionChanged

void Digikam::AlbumSelectors::signalSelectionChanged ( )
signal

◆ typeSelection()

int Digikam::AlbumSelectors::typeSelection ( ) const

Returns the selected album type.

References All.

Referenced by saveState().

◆ wholeAlbumsChecked()

bool Digikam::AlbumSelectors::wholeAlbumsChecked ( ) const

Return true if whole Albums collection option is checked.

Referenced by loadState(), resetPAlbumSelection(), saveState(), selectedAlbums(), and Digikam::FaceScanWidget::settings().

◆ wholeTagsChecked()

bool Digikam::AlbumSelectors::wholeTagsChecked ( ) const

Return true if whole Tags collection option is checked.

Referenced by loadState(), resetTAlbumSelection(), saveState(), and selectedTags().


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