digiKam
|
Public Slots | |
void | slotAlbumDelete () |
void | slotAlbumDelete (PAlbum *album) |
void | slotAlbumEdit () |
void | slotAlbumEdit (PAlbum *album) |
PAlbum * | slotAlbumNew () |
PAlbum * | slotAlbumNew (PAlbum *parentAlbum) |
void | slotAlbumRename () |
void | slotAlbumRename (PAlbum *album) |
void | slotAlbumResetIcon () |
void | slotAlbumResetIcon (PAlbum *album) |
Public Member Functions | |
AlbumModificationHelper (QObject *const parent, QWidget *const dialogParent) | |
void | bindAlbum (QAction *const action, PAlbum *const parent) const |
PAlbum * | boundAlbum (QObject *const action) const |
~AlbumModificationHelper () override | |
Utility class providing methods to modify physical albums (PAlbum) in a way useful to implement views.
|
explicit |
Constructor.
parent | the parent for qt parent child mechanism |
dialogParent | parent widget for dialogs displayed by this object |
|
override |
Destructor.
void Digikam::AlbumModificationHelper::bindAlbum | ( | QAction *const | action, |
PAlbum *const | parent | ||
) | const |
Sets the album 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::addActionDeleteAlbum(), Digikam::ContextMenuHelper::addActionEditAlbum(), Digikam::ContextMenuHelper::addActionNewAlbum(), Digikam::ContextMenuHelper::addActionRenameAlbum(), and Digikam::ContextMenuHelper::addActionResetAlbumIcon().
PAlbum * Digikam::AlbumModificationHelper::boundAlbum | ( | QObject *const | action | ) | const |
Returns the album bound with bindAlbum. 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 slotAlbumDelete(), slotAlbumEdit(), slotAlbumNew(), slotAlbumRename(), and slotAlbumResetIcon().
|
slot |
References boundAlbum().
|
slot |
Deletes the given album after waiting for a graphical confirmation of the user.
album | the album to delete |
References Digikam::DeleteDialogMode::Albums, Digikam::DeleteDialog::confirmDeleteList(), Digikam::CoreDbAccess::db(), Digikam::DIO::del(), Digikam::DeleteDialogMode::Files, Digikam::PAlbum::folderPath(), Digikam::CoreDB::getFilterSettings(), Digikam::PAlbum::isAlbumRoot(), Digikam::Album::isRoot(), Digikam::DeleteDialog::shouldDelete(), Digikam::DeleteDialogMode::Subalbums, and Digikam::DeleteDialogMode::UserPreference.
Referenced by Digikam::ItemIconView::slotDeleteAlbum().
|
slot |
References boundAlbum().
|
slot |
Graphically edits the properties of the given album.
album | the album to edit |
References Digikam::PAlbum::caption(), Digikam::PAlbum::category(), Digikam::PAlbum::date(), Digikam::AlbumPropsEdit::editProps(), Digikam::DigikamApp::instance(), Digikam::AlbumManager::instance(), Digikam::ApplicationSettings::instance(), Digikam::PAlbum::isAlbumRoot(), Digikam::Album::isRoot(), Digikam::ApplicationSettings::setAlbumCategoryNames(), Digikam::PAlbum::setCaption(), Digikam::PAlbum::setCategory(), Digikam::PAlbum::setDate(), Digikam::ItemIconView::slotSortAlbums(), Digikam::Album::title(), and Digikam::DigikamApp::view().
Referenced by Digikam::ItemIconView::slotAlbumPropsEdit().
|
slot |
References boundAlbum().
Creates a new album under the given parent. The user will be prompted for the settings of the new album.
parentAlbum | parent album for the new one |
References Digikam::PAlbum::albumRootId(), Digikam::CollectionManager::albumRootPath(), Digikam::AlbumPropsEdit::createNew(), Digikam::AlbumManager::createPAlbum(), Digikam::AlbumManager::instance(), Digikam::CollectionManager::instance(), Digikam::ApplicationSettings::instance(), Digikam::Album::isRoot(), and Digikam::ApplicationSettings::setAlbumCategoryNames().
Referenced by Digikam::ItemIconView::slotNewAlbum().
|
slot |
References boundAlbum().
|
slot |
Renames the given album. The user will be prompted for a new name.
album | the album to rename |
References Digikam::AlbumManager::instance(), and Digikam::Album::title().
Referenced by Digikam::ItemIconView::slotRenameAlbum().
|
slot |
References boundAlbum().
|
slot |