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

Public Types

enum  Flag {
  CreateDefaultModel , CreateDefaultFilterModel , CreateDefaultDelegate , ShowCountAccordingToSettings ,
  AlwaysShowInclusiveCounts , DefaultFlags = CreateDefaultFilterModel | CreateDefaultDelegate | ShowCountAccordingToSettings
}
 
enum  StateSavingDepth { INSTANCE , DIRECT_CHILDREN , RECURSIVE }
 

Public Slots

void adaptColumnsToContent ()
 
void expandEverything (const QModelIndex &index)
 
void scrollToSelectedAlbum ()
 
void setCurrentAlbum (int searchId, bool selectInAlbumManager=true)
 
void setCurrentAlbums (const QList< Album * > &albums, bool selectInAlbumManager=true)
 
void setSearchTextSettings (const SearchTextSettings &settings)
 
void slotCollapseAllNodes ()
 slotCollapseAllNodes - collapse all nodes without root node More...
 
void slotCollapseNode ()
 slotCollapseNode - collapse recursively selected nodes More...
 
void slotExpandNode ()
 slotExpandNode - expands recursively selected nodes More...
 

Signals

void currentAlbumChanged (Album *currentAlbum)
 
void selectedAlbumsChanged (const QList< Album * > &selectedAlbums)
 

Public Member Functions

void addContextMenuElement (ContextMenuElement *const element)
 
CheckableAlbumFilterModelalbumFilterModel () const
 
SearchModelalbumModel () const
 Note: not filtered by search type. More...
 
CheckableAlbumFilterModelcheckableAlbumFilterModel () const
 
AbstractCheckableAlbumModelcheckableModel () const
 
QList< ContextMenuElement * > contextMenuElements () const
 
SAlbumcurrentAlbum () const
 
template<class A >
QList< A * > currentAlbums ()
 
void doLoadState () override
 
void doSaveState () override
 
 EditableSearchTreeView (QWidget *const parent, SearchModel *const searchModel, SearchModificationHelper *const searchModificationHelper)
 
bool expandMatches (const QModelIndex &index)
 
SearchFilterModelfilteredModel () const
 Contains only the searches with appropriate type - prefer to albumModel() More...
 
StateSavingDepth getStateSavingDepth () const
 
QModelIndex indexVisuallyAt (const QPoint &p)
 
bool isRestoreCheckState () const
 
void loadState ()
 
void removeContextMenuElement (ContextMenuElement *const element)
 
void saveState ()
 
QList< Album * > selectedItems ()
 selectedItems() - More...
 
void setAlbumFilterModel (SearchFilterModel *const filteredModel, CheckableAlbumFilterModel *const model)
 
void setAlbumManagerCurrentAlbum (const bool setCurrentAlbum)
 
void setAlbumModel (SearchModel *const model)
 
void setCheckOnMiddleClick (bool doThat)
 Enable checking on middle mouse button click (default: on) More...
 
virtual void setConfigGroup (const KConfigGroup &group)
 
void setContextMenuIcon (const QPixmap &pixmap)
 
void setContextMenuTitle (const QString &title)
 
void setEnableContextMenu (const bool enable)
 
virtual void setEntryPrefix (const QString &prefix)
 
void setExpandNewCurrentItem (const bool doThat)
 
void setExpandOnSingleClick (const bool doThat)
 
void setRestoreCheckState (bool restore)
 
void setSelectAlbumOnClick (const bool selectOnClick)
 
void setSelectOnContextMenu (const bool select)
 
void setStateSavingDepth (const StateSavingDepth depth)
 
bool viewportEvent (QEvent *event) override
 
 ~EditableSearchTreeView () override
 

Protected Slots

void albumSettingsChanged ()
 
void slotCurrentChanged ()
 
virtual void slotRootAlbumAvailable ()
 
void slotSearchTextSettingsAboutToChange (bool searched, bool willSearch)
 
void slotSearchTextSettingsChanged (bool wasSearching, bool searching)
 
void slotSelectionChanged ()
 

Protected Member Functions

void addCustomContextMenuActions (ContextMenuHelper &cmh, Album *album) override
 
virtual QPixmap contextMenuIcon () const
 
QString contextMenuTitle () const override
 
void dragEnterEvent (QDragEnterEvent *e) override
 
void dragLeaveEvent (QDragLeaveEvent *e) override
 
void dragMoveEvent (QDragMoveEvent *e) override
 
void dropEvent (QDropEvent *e) override
 
QString entryName (const QString &base) const
 
KConfigGroup getConfigGroup () const
 
void handleCustomContextMenuAction (QAction *action, const AlbumPointer< Album > &album) override
 
void middleButtonPressed (Album *a) override
 
void mousePressEvent (QMouseEvent *e) override
 Other helper methods. More...
 
virtual QPixmap pixmapForDrag (const QStyleOptionViewItem &option, QList< QModelIndex > indexes)
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) override
 
void rowsInserted (const QModelIndex &parent, int start, int end) override
 
void setAlbumFilterModel (AlbumFilterModel *const filterModel)
 
void setAlbumModel (AbstractCountingAlbumModel *const model)
 
void setAlbumModel (AbstractSpecificAlbumModel *const model)
 
virtual bool showContextMenuAt (QContextMenuEvent *event, Album *albumForEvent)
 
void startDrag (Qt::DropActions supportedActions) override
 

Protected Attributes

AlbumFilterModelm_albumFilterModel
 
AbstractSpecificAlbumModelm_albumModel
 
bool m_checkOnMiddleClick
 
AlbumModelDragDropHandlerm_dragDropHandler
 
SearchFilterModelm_filteredModel
 
Flags m_flags
 
int m_lastScrollBarValue
 
bool m_restoreCheckState
 

Detailed Description

This tree view for searches adds basic editing functionality via the context menu. This is in detail deleting and renaming existing searches.

Author
jwienke

Member Enumeration Documentation

◆ Flag

Enumerator
CreateDefaultModel 

Create a default model. Not supported by abstract classes. Not part of default flags!

CreateDefaultFilterModel 

Create a default filter model.

CreateDefaultDelegate 

Create a delegate which paints according to settings. If not set, the Qt default delegate of the view is used.

ShowCountAccordingToSettings 

Show the count according to the settings. If not set, call setShowCount() on the model yourself.

AlwaysShowInclusiveCounts 

Always show the inclusive counts. Not part of default flags!

DefaultFlags 

◆ StateSavingDepth

This enum defines the "depth" of the StateSavingObject::loadState() and StateSavingObject::saveState() methods.

Enumerator
INSTANCE 

Only the instance the saving / restoring was invoked on is saved / restored.

DIRECT_CHILDREN 

The instance itself and all direct children of this instance implementing StateSavingObject are saved / restored.

RECURSIVE 

The instance and all children in the complete hierarchy are saved / restored.

Constructor & Destructor Documentation

◆ EditableSearchTreeView()

Digikam::EditableSearchTreeView::EditableSearchTreeView ( QWidget *const  parent,
SearchModel *const  searchModel,
SearchModificationHelper *const  searchModificationHelper 
)

Constructor.

Parameters
parentqt parent
searchModelthe model this view should act on
searchModificationHelperthe modification helper object used to perform operations on the displayed searches

References Digikam::SearchTreeView::setAlbumModel(), Digikam::AbstractAlbumTreeView::setEnableContextMenu(), and Digikam::AbstractAlbumTreeView::setSelectAlbumOnClick().

◆ ~EditableSearchTreeView()

Digikam::EditableSearchTreeView::~EditableSearchTreeView ( )
override

Destructor.

Member Function Documentation

◆ adaptColumnsToContent

void Digikam::AbstractAlbumTreeView::adaptColumnsToContent ( )
slotinherited

Adapt the column sizes to the contents of the tree view.

Referenced by Digikam::AbstractAlbumTreeView::AbstractAlbumTreeView(), and Digikam::AbstractAlbumTreeView::setAlbumFilterModel().

◆ addContextMenuElement()

◆ addCustomContextMenuActions()

void Digikam::EditableSearchTreeView::addCustomContextMenuActions ( ContextMenuHelper cmh,
Album album 
)
overrideprotectedvirtual

◆ albumFilterModel()

◆ albumModel()

SearchModel * Digikam::SearchTreeView::albumModel ( ) const
inherited

Note: not filtered by search type.

References Digikam::AbstractAlbumTreeView::m_albumModel.

◆ albumSettingsChanged

◆ checkableAlbumFilterModel()

CheckableAlbumFilterModel* Digikam::AbstractCheckableAlbumTreeView::checkableAlbumFilterModel ( ) const
inlineinherited

◆ checkableModel()

◆ contextMenuElements()

QList< AbstractAlbumTreeView::ContextMenuElement * > Digikam::AbstractAlbumTreeView::contextMenuElements ( ) const
inherited

◆ contextMenuIcon()

QPixmap Digikam::AbstractAlbumTreeView::contextMenuIcon ( ) const
protectedvirtualinherited

Hook method that can be implemented to return a special icon used for the context menu.

Returns
the icon for the context menu

References Digikam::AbstractAlbumTreeView::Private::contextMenuIcon.

Referenced by Digikam::TagMngrTreeView::contextMenuEvent(), and Digikam::TagFolderView::contextMenuEvent().

◆ contextMenuTitle()

QString Digikam::EditableSearchTreeView::contextMenuTitle ( ) const
overrideprotectedvirtual

implemented hook methods for context menus.

Reimplemented from Digikam::AbstractAlbumTreeView.

◆ currentAlbum()

SAlbum * Digikam::SearchTreeView::currentAlbum ( ) const
inherited

◆ currentAlbumChanged

void Digikam::AbstractAlbumTreeView::currentAlbumChanged ( Album currentAlbum)
signalinherited

◆ currentAlbums()

template<class A >
QList< A * > Digikam::AbstractAlbumTreeView::currentAlbums
inherited

◆ doLoadState()

void Digikam::AbstractCheckableAlbumTreeView::doLoadState ( )
overridevirtualinherited

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. Therefore the config is first parsed into d->statesByAlbumId which holds the state of all tree view entries indexed by album id. Afterwards an initial sync run is done restoring the state of all model entries that are already present at this time. Every processed entry is removed from d->statesByAlbumId. If there are still entries left in this map we assume that the model is not fully loaded at the moment. Therefore the rowsInserted signal is connected to a slot that restores the state of new rows based on the remaining entries in d->statesByAlbumId.

Reimplemented from Digikam::AbstractAlbumTreeView.

Reimplemented in Digikam::TagCheckView.

References Digikam::AbstractCheckableAlbumTreeView::checkableModel(), Digikam::AbstractAlbumTreeView::doLoadState(), Digikam::StateSavingObject::entryName(), Digikam::StateSavingObject::getConfigGroup(), and Digikam::AbstractAlbumTreeView::m_restoreCheckState.

Referenced by Digikam::TagCheckView::doLoadState().

◆ doSaveState()

◆ dragEnterEvent()

void Digikam::AbstractAlbumTreeView::dragEnterEvent ( QDragEnterEvent *  e)
overrideprotectedinherited

◆ dragLeaveEvent()

void Digikam::AbstractAlbumTreeView::dragLeaveEvent ( QDragLeaveEvent *  e)
overrideprotectedinherited

◆ dragMoveEvent()

◆ dropEvent()

◆ entryName()

QString Digikam::StateSavingObject::entryName ( const QString &  base) const
protectedinherited

Always use this method to create config group entry names. This allows to manipulate the entry keys externally by eg. setting a prefix.

Parameters
baseoriginal name planned for the config group entry
Returns
entry name after manipulating it with externally set parameters

Referenced by Digikam::FilterSideBarWidget::doLoadState(), Digikam::AbstractAlbumTreeView::doLoadState(), Digikam::AbstractCheckableAlbumTreeView::doLoadState(), Digikam::LabelsTreeView::doLoadState(), Digikam::ImportItemPropertiesSideBarImport::doLoadState(), Digikam::ItemPropertiesSideBar::doLoadState(), Digikam::ItemPropertiesSideBarDB::doLoadState(), Digikam::TagCheckView::doLoadState(), Digikam::Sidebar::doLoadState(), Digikam::SearchTextBar::doLoadState(), ShowFoto::ShowfotoFolderViewSideBar::doLoadState(), ShowFoto::ShowfotoStackViewSideBar::doLoadState(), Digikam::FaceScanWidget::doLoadState(), Digikam::FuzzySearchView::doLoadState(), Digikam::GPSSearchView::doLoadState(), Digikam::FilterSideBarWidget::doSaveState(), Digikam::AbstractAlbumTreeView::doSaveState(), Digikam::AbstractCheckableAlbumTreeView::doSaveState(), Digikam::LabelsTreeView::doSaveState(), Digikam::ImportItemPropertiesSideBarImport::doSaveState(), Digikam::ItemPropertiesSideBar::doSaveState(), Digikam::ItemPropertiesSideBarDB::doSaveState(), Digikam::TagCheckView::doSaveState(), Digikam::Sidebar::doSaveState(), Digikam::SearchTextBar::doSaveState(), ShowFoto::ShowfotoFolderViewSideBar::doSaveState(), ShowFoto::ShowfotoStackViewSideBar::doSaveState(), Digikam::FaceScanWidget::doSaveState(), Digikam::FuzzySearchView::doSaveState(), and Digikam::GPSSearchView::doSaveState().

◆ expandEverything

void Digikam::AbstractAlbumTreeView::expandEverything ( const QModelIndex &  index)
slotinherited

Expands the complete tree under the given index.

Parameters
indexthe index to start expanding everything

References Digikam::AbstractAlbumTreeView::albumFilterModel().

◆ expandMatches()

bool Digikam::AbstractAlbumTreeView::expandMatches ( const QModelIndex &  index)
inherited

Ensures that every current match is visible by expanding all parent entries.

Parameters
indexthe index to start ensuring expansion state
Returns
true if there was a match under index. This return value can normally be ignored by the caller because it is only used for an internal recursion.

References Digikam::AlbumFilterModel::ChildMatch, Digikam::AlbumFilterModel::DirectMatch, Digikam::AbstractAlbumTreeView::m_albumFilterModel, Digikam::AlbumFilterModel::matchResult(), Digikam::AlbumFilterModel::NoMatch, Digikam::AlbumFilterModel::ParentMatch, and Digikam::AlbumFilterModel::SpecialMatch.

Referenced by Digikam::AbstractAlbumTreeView::slotSearchTextSettingsChanged().

◆ filteredModel()

SearchFilterModel * Digikam::SearchTreeView::filteredModel ( ) const
inherited

Contains only the searches with appropriate type - prefer to albumModel()

References Digikam::SearchTreeView::m_filteredModel.

Referenced by Digikam::FuzzySearchView::FuzzySearchView(), and Digikam::SearchTreeView::setAlbumFilterModel().

◆ getConfigGroup()

KConfigGroup Digikam::StateSavingObject::getConfigGroup ( ) const
protectedinherited

Returns the config group that must be used for state saving and loading.

Returns
config group for state saving and loading

Referenced by Digikam::AlbumFolderViewSideBarWidget::AlbumFolderViewSideBarWidget(), Digikam::DateFolderViewSideBarWidget::DateFolderViewSideBarWidget(), Digikam::FilterSideBarWidget::doLoadState(), Digikam::TagViewSideBarWidget::doLoadState(), Digikam::TimelineSideBarWidget::doLoadState(), Digikam::MapWidgetView::doLoadState(), Digikam::TableView::doLoadState(), Digikam::AbstractAlbumTreeView::doLoadState(), Digikam::AbstractCheckableAlbumTreeView::doLoadState(), Digikam::LabelsTreeView::doLoadState(), Digikam::ImportItemPropertiesSideBarImport::doLoadState(), Digikam::ItemPropertiesSideBar::doLoadState(), Digikam::ItemPropertiesSideBarDB::doLoadState(), Digikam::TagsManager::doLoadState(), Digikam::TagCheckView::doLoadState(), Digikam::Sidebar::doLoadState(), Digikam::SearchTextBar::doLoadState(), ShowFoto::ShowfotoFolderViewSideBar::doLoadState(), ShowFoto::ShowfotoStackViewSideBar::doLoadState(), Digikam::FaceScanWidget::doLoadState(), Digikam::FuzzySearchView::doLoadState(), Digikam::GPSSearchView::doLoadState(), Digikam::FilterSideBarWidget::doSaveState(), Digikam::TagViewSideBarWidget::doSaveState(), Digikam::TimelineSideBarWidget::doSaveState(), Digikam::MapWidgetView::doSaveState(), Digikam::TableView::doSaveState(), Digikam::AbstractAlbumTreeView::doSaveState(), Digikam::AbstractCheckableAlbumTreeView::doSaveState(), Digikam::LabelsTreeView::doSaveState(), Digikam::ImportItemPropertiesSideBarImport::doSaveState(), Digikam::ItemPropertiesSideBar::doSaveState(), Digikam::ItemPropertiesSideBarDB::doSaveState(), Digikam::TagsManager::doSaveState(), Digikam::TagCheckView::doSaveState(), Digikam::Sidebar::doSaveState(), Digikam::SearchTextBar::doSaveState(), ShowFoto::ShowfotoFolderViewSideBar::doSaveState(), ShowFoto::ShowfotoStackViewSideBar::doSaveState(), Digikam::FaceScanWidget::doSaveState(), Digikam::FuzzySearchView::doSaveState(), Digikam::GPSSearchView::doSaveState(), Digikam::FuzzySearchSideBarWidget::FuzzySearchSideBarWidget(), Digikam::GPSSearchSideBarWidget::GPSSearchSideBarWidget(), Digikam::LabelsSideBarWidget::LabelsSideBarWidget(), Digikam::PeopleSideBarWidget::PeopleSideBarWidget(), Digikam::SearchSideBarWidget::SearchSideBarWidget(), Digikam::TagsManager::setupUi(), Digikam::TagViewSideBarWidget::TagViewSideBarWidget(), and Digikam::TimelineSideBarWidget::TimelineSideBarWidget().

◆ getStateSavingDepth()

StateSavingObject::StateSavingDepth Digikam::StateSavingObject::getStateSavingDepth ( ) const
inherited

Returns the depth used for state saving or loading. Default is StateSavingDepth::INSTANCE.

Returns
state saving / restoring depth

◆ handleCustomContextMenuAction()

void Digikam::EditableSearchTreeView::handleCustomContextMenuAction ( QAction *  action,
const AlbumPointer< Album > &  album 
)
overrideprotectedvirtual

Handles deletion and renaming actions.

Reimplemented from Digikam::AbstractAlbumTreeView.

Reimplemented in Digikam::NormalSearchTreeView.

Referenced by Digikam::NormalSearchTreeView::handleCustomContextMenuAction().

◆ indexVisuallyAt()

QModelIndex Digikam::AbstractAlbumTreeView::indexVisuallyAt ( const QPoint &  p)
inherited

This is a combination of indexAt() checked with visualRect(). p must be in the viewport currently. Decoration will not be included. Suitable for mouse click positions.

Referenced by Digikam::AbstractAlbumTreeView::dragMoveEvent(), Digikam::AbstractAlbumTreeView::dropEvent(), and Digikam::AbstractAlbumTreeView::mousePressEvent().

◆ isRestoreCheckState()

bool Digikam::AbstractCheckableAlbumTreeView::isRestoreCheckState ( ) const
inherited

Tells if the check state is restored while loading / saving state.

Returns
true if restoring check state is active

References Digikam::AbstractAlbumTreeView::m_restoreCheckState.

Referenced by Digikam::TagFilterView::addCustomContextMenuActions().

◆ loadState()

void Digikam::StateSavingObject::loadState ( )
inherited

◆ middleButtonPressed()

◆ mousePressEvent()

◆ pixmapForDrag()

QPixmap Digikam::AbstractAlbumTreeView::pixmapForDrag ( const QStyleOptionViewItem &  option,
QList< QModelIndex >  indexes 
)
protectedvirtualinherited

TODO: Move to delegate, when we have one. Copy code from image delegate for creating icons when dragging multiple items

Referenced by Digikam::AbstractAlbumTreeView::startDrag().

◆ removeContextMenuElement()

void Digikam::AbstractAlbumTreeView::removeContextMenuElement ( ContextMenuElement *const  element)
inherited

◆ rowsAboutToBeRemoved()

void Digikam::AbstractAlbumTreeView::rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotectedinherited

◆ rowsInserted()

void Digikam::AbstractCheckableAlbumTreeView::rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotectedinherited

◆ saveState()

◆ scrollToSelectedAlbum

void Digikam::AbstractAlbumTreeView::scrollToSelectedAlbum ( )
slotinherited

Scrolls to the first selected album if there is one.

Referenced by Digikam::AbstractAlbumTreeView::doLoadState().

◆ selectedAlbumsChanged

void Digikam::AbstractAlbumTreeView::selectedAlbumsChanged ( const QList< Album * > &  selectedAlbums)
signalinherited

Emitted when the current selection changes. Use currentChanged unless in multi-selection mode.

◆ selectedItems()

◆ setAlbumFilterModel() [1/2]

◆ setAlbumFilterModel() [2/2]

◆ setAlbumManagerCurrentAlbum()

void Digikam::AbstractAlbumTreeView::setAlbumManagerCurrentAlbum ( const bool  setCurrentAlbum)
inherited

Some treeviews shall control the global current album kept by AlbumManager. Other treeview are self-contained and shall not change the current album. Default: false

References Digikam::AbstractAlbumTreeView::Private::setInAlbumManager.

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

◆ setAlbumModel() [1/3]

◆ setAlbumModel() [2/3]

◆ setAlbumModel() [3/3]

◆ setCheckOnMiddleClick()

void Digikam::AbstractCheckableAlbumTreeView::setCheckOnMiddleClick ( bool  doThat)
inherited

Enable checking on middle mouse button click (default: on)

References Digikam::AbstractAlbumTreeView::m_checkOnMiddleClick.

◆ setConfigGroup()

void Digikam::StateSavingObject::setConfigGroup ( const KConfigGroup &  group)
virtualinherited

Sets a dedicated config group that will be used to store and reload the state from. If this method is not called, a group based on the object name is used.

You can re-implement this method to pass the group set here to child objects. Don't forget to call this method in your implementation.

Parameters
groupconfig group to use for state saving and restoring

Reimplemented in Digikam::GPSSearchView, Digikam::FuzzySearchView, Digikam::FilterSideBarWidget, and Digikam::DateFolderView.

Referenced by Digikam::ImageWindow::closeEvent(), Digikam::DateFolderView::setConfigGroup(), Digikam::FilterSideBarWidget::setConfigGroup(), Digikam::FuzzySearchView::setConfigGroup(), and Digikam::GPSSearchView::setConfigGroup().

◆ setContextMenuIcon()

void Digikam::AbstractAlbumTreeView::setContextMenuIcon ( const QPixmap &  pixmap)
inherited

Set the context menu title and icon. This is used by the default implementation of contextMenuIcon() and contextMenuTitle(). You can alternatively reimplement these methods.

References Digikam::AbstractAlbumTreeView::Private::contextMenuIcon.

◆ setContextMenuTitle()

void Digikam::AbstractAlbumTreeView::setContextMenuTitle ( const QString &  title)
inherited

◆ setCurrentAlbum

void Digikam::SearchTreeView::setCurrentAlbum ( int  searchId,
bool  selectInAlbumManager = true 
)
slotinherited

◆ setCurrentAlbums

void Digikam::SearchTreeView::setCurrentAlbums ( const QList< Album * > &  albums,
bool  selectInAlbumManager = true 
)
slotinherited

◆ setEnableContextMenu()

void Digikam::AbstractAlbumTreeView::setEnableContextMenu ( const bool  enable)
inherited

Determines the global decision to show a popup menu or not. More detailed decision at which position a menu can be shown and where not can be made by implementing showContextMenuAt.

Parameters
enableif true, a context menu can be shown

References Digikam::AbstractAlbumTreeView::Private::enableContextMenu.

Referenced by Digikam::AbstractAlbumTreeViewSelectComboBox::addCheckUncheckContextMenuActions(), Digikam::AlbumSelectionTreeView::AlbumSelectionTreeView(), EditableSearchTreeView(), and Digikam::TagFolderView::TagFolderView().

◆ setEntryPrefix()

void Digikam::StateSavingObject::setEntryPrefix ( const QString &  prefix)
virtualinherited

Define a prefix that will be used for every entry in the config group. The default prefix is empty.

You can re-implement this method to pass the prefix set here to child objects. Don't forget to call this method in your implementation.

Parameters
prefixthe prefix to use for the config entries

References prefix.

◆ setExpandNewCurrentItem()

void Digikam::AbstractAlbumTreeView::setExpandNewCurrentItem ( const bool  doThat)
inherited

Expand an item when making it the new current item

References Digikam::AbstractAlbumTreeView::Private::expandNewCurrent.

◆ setExpandOnSingleClick()

void Digikam::AbstractAlbumTreeView::setExpandOnSingleClick ( const bool  doThat)
inherited

Enable expanding of tree items on single click on the item (default: off)

References Digikam::AbstractAlbumTreeView::Private::expandOnSingleClick.

Referenced by Digikam::TagCheckView::TagCheckView().

◆ setRestoreCheckState()

void Digikam::AbstractCheckableAlbumTreeView::setRestoreCheckState ( bool  restore)
inherited

Set whether to restore check state or not.

Parameters
restoreif true, restore check state

References Digikam::AbstractAlbumTreeView::m_restoreCheckState.

Referenced by Digikam::TagFilterView::handleCustomContextMenuAction().

◆ setSearchTextSettings

void Digikam::AbstractAlbumTreeView::setSearchTextSettings ( const SearchTextSettings settings)
slotinherited

◆ setSelectAlbumOnClick()

void Digikam::AbstractAlbumTreeView::setSelectAlbumOnClick ( const bool  selectOnClick)
inherited

Sets whether to select an album on click via the album manager or not.

Parameters
selectOnClickif true, a click on an item automatically sets this item as the current album in the album manager

References Digikam::AbstractAlbumTreeView::Private::selectAlbumOnClick.

Referenced by Digikam::AlbumSelectionTreeView::AlbumSelectionTreeView(), EditableSearchTreeView(), Digikam::TagCheckView::TagCheckView(), Digikam::TagFolderView::TagFolderView(), and Digikam::TagMngrTreeView::TagMngrTreeView().

◆ setSelectOnContextMenu()

void Digikam::AbstractAlbumTreeView::setSelectOnContextMenu ( const bool  select)
inherited

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

Defaults to true.

Parameters
selecttrue if a context menu request shall select the album

References Digikam::AbstractAlbumTreeView::Private::selectOnContextMenu.

Referenced by Digikam::TagCheckView::TagCheckView().

◆ setStateSavingDepth()

void Digikam::StateSavingObject::setStateSavingDepth ( const StateSavingDepth  depth)
inherited

Sets the depth used for state saving or loading.

Parameters
depthnew depth to use

◆ showContextMenuAt()

bool Digikam::AbstractAlbumTreeView::showContextMenuAt ( QContextMenuEvent *  event,
Album albumForEvent 
)
protectedvirtualinherited

Hook method to implement that determines if a context menu shall be displayed for the given event at the position coded in the event.

Parameters
eventcontext menu event to react on
albumForEventthe album at the mouse position or null if there is no album at that position
Returns
true if a context menu shall be displayed at the event coordinates, else false

Referenced by Digikam::TagFolderView::contextMenuEvent().

◆ slotCollapseAllNodes

void Digikam::AbstractAlbumTreeView::slotCollapseAllNodes ( )
slotinherited

◆ slotCollapseNode

void Digikam::AbstractAlbumTreeView::slotCollapseNode ( )
slotinherited

◆ slotCurrentChanged

◆ slotExpandNode

void Digikam::AbstractAlbumTreeView::slotExpandNode ( )
slotinherited

◆ slotRootAlbumAvailable

void Digikam::AbstractAlbumTreeView::slotRootAlbumAvailable ( )
protectedvirtualslotinherited

◆ slotSearchTextSettingsAboutToChange

void Digikam::AbstractAlbumTreeView::slotSearchTextSettingsAboutToChange ( bool  searched,
bool  willSearch 
)
protectedslotinherited

◆ slotSearchTextSettingsChanged

◆ slotSelectionChanged

◆ startDrag()

void Digikam::AbstractAlbumTreeView::startDrag ( Qt::DropActions  supportedActions)
overrideprotectedinherited

◆ viewportEvent()

bool Digikam::AbstractAlbumTreeView::viewportEvent ( QEvent *  event)
overrideinherited

Member Data Documentation

◆ m_albumFilterModel

◆ m_albumModel

◆ m_checkOnMiddleClick

◆ m_dragDropHandler

AlbumModelDragDropHandler* Digikam::AbstractAlbumTreeView::m_dragDropHandler
protectedinherited

◆ m_filteredModel

◆ m_flags

Flags Digikam::AbstractAlbumTreeView::m_flags
protectedinherited

◆ m_lastScrollBarValue

int Digikam::AbstractAlbumTreeView::m_lastScrollBarValue
protectedinherited

◆ m_restoreCheckState


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