digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::TagFilterView Class Reference

A view to filter the currently displayed album by tags. More...

+ Inheritance diagram for Digikam::TagFilterView:

Public Member Functions

 TagFilterView (QWidget *const parent, TagModel *const tagFilterModel)
 Constructor.
 
 ~TagFilterView () override
 Destructor.
 
- Public Member Functions inherited from Digikam::TagCheckView
 TagCheckView (QWidget *const parent, TagModel *const tagModel)
 
bool checkNewTags () const
 
void doLoadState () override
 Implements state loading for the album tree view in a somewhat clumsy procedure because the model may not be fully loaded when this method is called.
 
void doSaveState () override
 Implement this hook method for state saving.
 
QList< TAlbum * > getCheckedTags () const
 
QList< TAlbum * > getPartiallyCheckedTags () const
 
ToggleAutoTags getToggleAutoTags () const
 
void setCheckNewTags (bool checkNewTags)
 If.
 
void setToggleAutoTags (ToggleAutoTags toggle)
 
- Public Member Functions inherited from Digikam::TagFolderView
 TagFolderView (QWidget *const parent, TagModel *const model)
 Constructor.
 
 ~TagFolderView () override
 Destructor.
 
void setShowDeleteFaceTagsAction (bool show)
 Define whether to show the "Delete People Tags" action in context menus or not.
 
void setShowFindDuplicateAction (bool show)
 Define whether to show the "find duplicate" action in context menus or not.
 
void tagPropsEdit ()
 Open tag for editing.
 
- Public Member Functions inherited from Digikam::TagTreeView
 TagTreeView (QWidget *const parent=nullptr, Flags flags=DefaultFlags)
 
TAlbumalbumForIndex (const QModelIndex &index) const
 
TAlbumcurrentAlbum () const
 currentAlbum Even if multiple selection is enabled current Album can be only one, the last clicked item if you need selected items, see selectedAlbums() It's NOT the same as AlbumManager::currentAlbums()
 
TagPropertiesFilterModelfilteredModel () const
 Contains only the tags filtered by properties - prefer to albumModel()
 
QList< TAlbum * > selectedTagAlbums ()
 
QList< Album * > selectedTags ()
 selectedTags - return a list of all selected items in tag model
 
void setTAlbumFilterModel (TagPropertiesFilterModel *const filteredModel, CheckableAlbumFilterModel *const filterModel)
 
void setTAlbumModel (TagModel *const model)
 
TagModificationHelpertagModificationHelper () const
 
TagModeltalbumModel () const
 
- Public Member Functions inherited from Digikam::AbstractCheckableAlbumTreeView
 AbstractCheckableAlbumTreeView (QWidget *const parent, Flags flags)
 
CheckableAlbumFilterModelcheckableAlbumFilterModel () const
 
AbstractCheckableAlbumModelcheckableAlbumModel () const
 Manage check state through the model directly.
 
bool isRestoreCheckState () const
 Tells if the check state is restored while loading / saving state.
 
void setCheckOnMiddleClick (bool doThat)
 Enable checking on middle mouse button click (default: on).
 
void setRestoreCheckState (bool restore)
 Set whether to restore check state or not.
 
- Public Member Functions inherited from Digikam::AbstractCountingAlbumTreeView
 AbstractCountingAlbumTreeView (QWidget *const parent, Flags flags)
 
- Public Member Functions inherited from Digikam::AbstractAlbumTreeView
 AbstractAlbumTreeView (QWidget *const parent, Flags flags)
 Constructs an album tree view.
 
void addContextMenuElement (ContextMenuElement *const element)
 
AlbumFilterModelalbumFilterModel () const
 
AbstractSpecificAlbumModelalbumModel () const
 
QList< ContextMenuElement * > contextMenuElements () const
 
template<class A >
QList< A * > currentAlbums ()
 
bool expandMatches (const QModelIndex &index)
 Ensures that every current match is visible by expanding all parent entries.
 
QModelIndex indexVisuallyAt (const QPoint &p)
 This is a combination of indexAt() checked with visualRect().
 
void removeContextMenuElement (ContextMenuElement *const element)
 
QList< Album * > selectedItems ()
 
void setAlbumManagerCurrentAlbum (const bool setCurrentAlbum)
 Some treeviews shall control the global current album kept by AlbumManager.
 
void setContextMenuIcon (const QPixmap &pixmap)
 Set the context menu title and icon.
 
void setContextMenuTitle (const QString &title)
 
void setEnableContextMenu (const bool enable)
 Determines the global decision to show a popup menu or not.
 
void setExpandNewCurrentItem (const bool doThat)
 Expand an item when making it the new current item.
 
void setExpandOnSingleClick (const bool doThat)
 Enable expanding of tree items on single click on the item (default: off)
 
void setSelectAlbumOnClick (const bool selectOnClick)
 Sets whether to select an album on click via the album manager or not.
 
void setSelectOnContextMenu (const bool select)
 Sets whether to select the album under the mouse cursor on a context menu request (so that the album is shown using the album manager) or not.
 
bool viewportEvent (QEvent *event) override
 For internal use only.
 
- Public Member Functions inherited from Digikam::StateSavingObject
 StateSavingObject (QObject *const host)
 Constructor.
 
virtual ~StateSavingObject ()
 Destructor.
 
StateSavingDepth getStateSavingDepth () const
 Returns the depth used for state saving or loading.
 
void loadState ()
 Invokes loading the class' state.
 
void saveState ()
 Invokes saving the class' state.
 
virtual void setConfigGroup (const KConfigGroup &group)
 Sets a dedicated config group that will be used to store and reload the state from.
 
virtual void setEntryPrefix (const QString &prefix)
 Define a prefix that will be used for every entry in the config group.
 
void setStateSavingDepth (const StateSavingDepth depth)
 Sets the depth used for state saving or loading.
 

Protected Member Functions

void addCustomContextMenuActions (ContextMenuHelper &cmh, Album *album) override
 Hook method to add custom actions to the generated context menu.
 
void handleCustomContextMenuAction (QAction *action, const AlbumPointer< Album > &album) override
 Hook method to handle the custom context menu actions that were added with addCustomContextMenuActions.
 
- Protected Member Functions inherited from Digikam::TagFolderView
void addCustomContextMenuActions (ContextMenuHelper &cmh, Album *album) override
 Hook method to add custom actions to the generated context menu.
 
void contextMenuEvent (QContextMenuEvent *event) override
 Reimplement contextMenuEvent from AbstractAlbumTree to support multiple selection.
 
QString contextMenuTitle () const override
 Hook method to implement that returns the title for the context menu.
 
void handleCustomContextMenuAction (QAction *action, const AlbumPointer< Album > &album) override
 Hook method to handle the custom context menu actions that were added with addCustomContextMenuActions.
 
void keyPressEvent (QKeyEvent *event) override
 
virtual void setContexMenuItems (ContextMenuHelper &cmh, const QList< TAlbum * > &albums)
 Implementation of AddCustomContextMenuActions(see above) that handle multiple selection.
 
- Protected Member Functions inherited from Digikam::AbstractCheckableAlbumTreeView
void middleButtonPressed (Album *a) override
 
void rowsInserted (const QModelIndex &parent, int start, int end) override
 
void setAlbumModel (AbstractCheckableAlbumModel *const model)
 
virtual void setCheckableAlbumFilterModel (CheckableAlbumFilterModel *const filterModel)
 
- Protected Member Functions inherited from Digikam::AbstractCountingAlbumTreeView
void rowsInserted (const QModelIndex &parent, int start, int end) override
 
virtual void setAlbumFilterModel (AlbumFilterModel *const filterModel) override
 
void setAlbumModel (AbstractCountingAlbumModel *const model)
 
- Protected Member Functions inherited from Digikam::AbstractAlbumTreeView
virtual QPixmap contextMenuIcon () const
 Hook method that can be implemented to return a special icon used for the context menu.
 
void dragEnterEvent (QDragEnterEvent *e) override
 
void dragLeaveEvent (QDragLeaveEvent *e) override
 
void dragMoveEvent (QDragMoveEvent *e) override
 
void dropEvent (QDropEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 Other helper methods.
 
virtual QPixmap pixmapForDrag (const QStyleOptionViewItem &option, QList< QModelIndex > indexes)
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) override
 
void rowsInserted (const QModelIndex &index, int start, int end) override
 
void setAlbumModel (AbstractSpecificAlbumModel *const model)
 
virtual bool showContextMenuAt (QContextMenuEvent *event, Album *albumForEvent)
 Hook method to implement that determines if a context menu shall be displayed for the given event at the position coded in the event.
 
void startDrag (Qt::DropActions supportedActions) override
 
- Protected Member Functions inherited from Digikam::StateSavingObject
QString entryName (const QString &base) const
 Always use this method to create config group entry names.
 
KConfigGroup getConfigGroup () const
 Returns the config group that must be used for state saving and loading.
 

Additional Inherited Members

- Public Types inherited from Digikam::TagCheckView
enum  ToggleAutoTags { NoToggleAuto = 0 , Children , Parents , ChildrenAndParents }
 
- Public Types inherited from Digikam::AbstractAlbumTreeView
enum  Flag {
  CreateDefaultModel , CreateDefaultFilterModel , CreateDefaultDelegate , ShowCountAccordingToSettings ,
  AlwaysShowInclusiveCounts , DefaultFlags = CreateDefaultFilterModel | CreateDefaultDelegate | ShowCountAccordingToSettings
}
 
typedef QFlags< FlagFlags
 
- Public Types inherited from Digikam::StateSavingObject
enum  StateSavingDepth { INSTANCE , DIRECT_CHILDREN , RECURSIVE }
 This enum defines the "depth" of the StateSavingObject::loadState() and StateSavingObject::saveState() methods. More...
 
- Public Slots inherited from Digikam::TagCheckView
void slotResetCheckState ()
 Resets the whole tag filter.
 
- Public Slots inherited from Digikam::TagFolderView
void slotTagNewFromABCMenu (const QString &personName)
 
- Public Slots inherited from Digikam::TagTreeView
void setCurrentAlbum (int tagId, bool selectInAlbumManager=true)
 
void setCurrentAlbums (const QList< Album * > &tags, bool selectInAlbumManager=true) override
 
- Public Slots inherited from Digikam::AbstractAlbumTreeView
void adaptColumnsToContent ()
 Adapt the column sizes to the contents of the tree view.
 
void expandEverything (const QModelIndex &index)
 Expands the complete tree under the given index.
 
void scrollToSelectedAlbum ()
 Scrolls to the first selected album if there is one.
 
virtual void setCurrentAlbums (const QList< Album * > &albums, bool selectInAlbumManager=true)
 Selects the given album.
 
void setSearchTextSettings (const SearchTextSettings &settings)
 
void slotCollapseAllNodes ()
 slotCollapseAllNodes - collapse all nodes without root node
 
void slotCollapseNode ()
 slotCollapseNode - collapse recursively selected nodes
 
void slotExpandNode ()
 slotExpandNode - expands recursively selected nodes
 
- Signals inherited from Digikam::TagCheckView
void checkedTagsChanged (const QList< TAlbum * > &includedTags, const QList< TAlbum * > &excludedTags)
 Emitted if the checked tags have changed.
 
- Signals inherited from Digikam::TagFolderView
void signalFindDuplicates (const QList< TAlbum * > &albums)
 
- Signals inherited from Digikam::TagTreeView
void assignTags (int tagId, const QList< int > &imageIDs)
 
- Signals inherited from Digikam::AbstractAlbumTreeView
void currentAlbumChanged (Album *currentAlbum)
 Emitted when the currently selected album changes.
 
void selectedAlbumsChanged (const QList< Album * > &selectedAlbums)
 Emitted when the current selection changes.
 
- Protected Slots inherited from Digikam::AbstractAlbumTreeView
void albumSettingsChanged ()
 
void slotCurrentChanged ()
 
virtual void slotRootAlbumAvailable ()
 
void slotSearchTextSettingsAboutToChange (bool searched, bool willSearch)
 
void slotSearchTextSettingsChanged (bool wasSearching, bool searching)
 
void slotSelectionChanged ()
 
- Protected Attributes inherited from Digikam::TagTreeView
TagPropertiesFilterModelm_filteredModel = nullptr
 
TagModificationHelperm_modificationHelper = nullptr
 
- Protected Attributes inherited from Digikam::AbstractAlbumTreeView
AlbumFilterModelm_albumFilterModel = nullptr
 
AbstractSpecificAlbumModelm_albumModel = nullptr
 
bool m_checkOnMiddleClick = false
 
AlbumModelDragDropHandlerm_dragDropHandler = nullptr
 
Flags m_flags = DefaultFlags
 
int m_lastScrollBarValue = 0
 
bool m_restoreCheckState = false
 

Detailed Description

Author
jwienke

Constructor & Destructor Documentation

◆ TagFilterView()

Digikam::TagFilterView::TagFilterView ( QWidget *const  parent,
TagModel *const  tagFilterModel 
)
explicit
Parameters
parentthe parent for qt parent child mechanism
tagFilterModeltag model to work on

Member Function Documentation

◆ addCustomContextMenuActions()

void Digikam::TagFilterView::addCustomContextMenuActions ( ContextMenuHelper cmh,
Album album 
)
overrideprotectedvirtual
Parameters
cmhhelper object to create the context menu
albumtag on which the context menu will be created. May be null if it is requested on no tag entry

Reimplemented from Digikam::TagCheckView.

◆ handleCustomContextMenuAction()

void Digikam::TagFilterView::handleCustomContextMenuAction ( QAction *  action,
const AlbumPointer< Album > &  album 
)
overrideprotectedvirtual
Parameters
actionthe action that was chosen by the user, may be null if none of the custom actions were selected
albumthe tag on which the context menu was requested. May be null if there was no

Reimplemented from Digikam::AbstractAlbumTreeView.