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

Public Slots

void hidePopup () override
 
void setParentTag (TAlbum *const album)
 
virtual void updateText ()
 

Signals

void taggingActionActivated (const TaggingAction &action)
 
void taggingActionSelected (const TaggingAction &action)
 

Public Member Functions

void addCheckUncheckContextMenuActions ()
 
 AddTagsComboBox (QWidget *const parent=nullptr)
 
QModelIndex currentIndex () const
 
TaggingAction currentTaggingAction ()
 
QSortFilterProxyModel * filterModel () const
 
bool isCheckable () const
 
AddTagsLineEditlineEdit () const
 
AbstractCheckableAlbumModelmodel () const
 
void setAlbumModels (AbstractCheckableAlbumModel *model, AlbumFilterModel *filterModel=nullptr)
 
void setAlbumModels (TagModel *const model, TagPropertiesFilterModel *const filteredModel=nullptr, CheckableAlbumFilterModel *const filterModel=nullptr)
 
void setCheckable (bool checkable)
 
void setCloseOnActivate (bool close)
 
void setCurrentIndex (const QModelIndex &index)
 
void setCurrentTag (TAlbum *const album)
 
void setDefaultAlbumModel ()
 
void setDefaultModel ()
 
void setDefaultTagModel ()
 
void setLineEdit (QLineEdit *edit)
 
void setLineEditText (const QString &text)
 
void setNoSelectionText (const QString &text)
 
void setPlaceholderText (const QString &message)
 
void setShowCheckStateSummary (bool show)
 
void setText (const QString &text)
 
void setTreeView (AbstractAlbumTreeView *const treeView)
 
void showPopup () override
 
QString text () const
 
TagTreeViewview () const
 
 ~AddTagsComboBox () override
 

Protected Slots

void slotLineEditActionActivated (const TaggingAction &action)
 
void slotLineEditActionSelected (const TaggingAction &action)
 
void slotViewIndexActivated (const QModelIndex &)
 

Protected Member Functions

bool eventFilter (QObject *object, QEvent *event) override
 
virtual void installLineEdit ()
 
void installView (QAbstractItemView *view=nullptr) override
 
void sendViewportEventToView (QEvent *e) override
 

Protected Attributes

QLineEdit * m_comboLineEdit
 
QPersistentModelIndex m_currentIndex
 
AbstractAlbumTreeViewm_treeView
 
QAbstractItemView * m_view
 

Constructor & Destructor Documentation

◆ AddTagsComboBox()

◆ ~AddTagsComboBox()

Digikam::AddTagsComboBox::~AddTagsComboBox ( )
override

Member Function Documentation

◆ addCheckUncheckContextMenuActions()

void Digikam::AbstractAlbumTreeViewSelectComboBox::addCheckUncheckContextMenuActions ( )
inherited

Enables a context menu which contains options to check or uncheck groups of albums, given you have a checkable model. Call this method after setModel().

References Digikam::AbstractAlbumTreeView::addContextMenuElement(), Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView, and Digikam::AbstractAlbumTreeView::setEnableContextMenu().

Referenced by Digikam::SearchFieldAlbum::setupValueWidgets().

◆ currentIndex()

QModelIndex Digikam::ModelIndexBasedComboBox::currentIndex ( ) const
inherited

◆ currentTaggingAction()

TaggingAction Digikam::AddTagsComboBox::currentTaggingAction ( )

Returns the currently set tagging action. This is the last action emitted by either taggingActionActivated() or taggingActionSelected()

Referenced by Digikam::AssignNameWidget::slotConfirm(), and slotViewIndexActivated().

◆ eventFilter()

bool Digikam::AddTagsComboBox::eventFilter ( QObject *  object,
QEvent *  event 
)
overrideprotected

◆ filterModel()

QSortFilterProxyModel * Digikam::AlbumSelectComboBox::filterModel ( ) const
inherited

◆ hidePopup

void Digikam::AlbumSelectComboBox::hidePopup ( )
overrideslotinherited

◆ installLineEdit()

void Digikam::TreeViewLineEditComboBox::installLineEdit ( )
protectedvirtualinherited

Sets a line edit. Called by installView(). The default implementation is described above. An empty implementation will keep the default QComboBox line edit.

References Digikam::TreeViewLineEditComboBox::m_comboLineEdit, and Digikam::TreeViewLineEditComboBox::setLineEdit().

Referenced by Digikam::TreeViewLineEditComboBox::installView().

◆ installView()

void Digikam::AbstractAlbumTreeViewSelectComboBox::installView ( QAbstractItemView *  view = nullptr)
overrideprotectedvirtualinherited

Replace the standard combo box list view with a QTreeView. Call this after installing an appropriate model.

Reimplemented from Digikam::AlbumSelectComboBox.

References Digikam::AlbumSelectComboBox::installView(), Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView, and Digikam::TreeViewComboBox::view().

◆ isCheckable()

bool Digikam::AlbumSelectComboBox::isCheckable ( ) const
inherited

◆ lineEdit()

AddTagsLineEdit * Digikam::AddTagsComboBox::lineEdit ( ) const

◆ model()

◆ sendViewportEventToView()

void Digikam::AbstractAlbumTreeViewSelectComboBox::sendViewportEventToView ( QEvent *  e)
overrideprotectedvirtualinherited

Implement in subclass: Send the given event to the viewportEvent() method of m_view. This method is protected for a usual QAbstractItemView. You can override, pass a view, and call parent implementation. The existing view will be used. You must then also reimplement sendViewportEventToView.

Implements Digikam::StayPoppedUpComboBox.

References Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView, and Digikam::AbstractAlbumTreeView::viewportEvent().

◆ setAlbumModels() [1/2]

◆ setAlbumModels() [2/2]

void Digikam::AddTagsComboBox::setAlbumModels ( TagModel *const  model,
TagPropertiesFilterModel *const  filteredModel = nullptr,
CheckableAlbumFilterModel *const  filterModel = nullptr 
)

You must call this after construction. If filtered/filterModel is 0, a default one is constructed

References Digikam::AlbumSelectComboBox::filterModel(), Digikam::AlbumSelectComboBox::model(), and Digikam::TagTreeViewSelectComboBox::setAlbumModels().

Referenced by Digikam::AssignNameWidget::setAlbumModels().

◆ setCheckable()

void Digikam::AlbumSelectComboBox::setCheckable ( bool  checkable)
inherited

Enable checkboxes next to the items. Default: true

Referenced by AddTagsComboBox().

◆ setCloseOnActivate()

void Digikam::AlbumSelectComboBox::setCloseOnActivate ( bool  close)
inherited

Enable closing when an item was activated (clicked). Default: false.

Referenced by AddTagsComboBox().

◆ setCurrentIndex()

void Digikam::ModelIndexBasedComboBox::setCurrentIndex ( const QModelIndex &  index)
inherited

◆ setCurrentTag()

void Digikam::AddTagsComboBox::setCurrentTag ( TAlbum *const  album)

◆ setDefaultAlbumModel()

void Digikam::AlbumSelectComboBox::setDefaultAlbumModel ( )
inherited

Once after creation, call one of these three methods. Use the first one if you want a standard combo box for PAlbums and the second one for tags, while the third allows you to provide custom source and filter models. The first two also set a default noSelectionText. Customize afterwards if required.

References Digikam::AbstractAlbumModel::IgnoreRootAlbum, Digikam::AlbumSelectComboBox::setAlbumModels(), and Digikam::TreeViewComboBox::view().

◆ setDefaultModel()

void Digikam::TagTreeViewSelectComboBox::setDefaultModel ( )
inherited

◆ setDefaultTagModel()

void Digikam::AlbumSelectComboBox::setDefaultTagModel ( )
inherited

◆ setLineEdit()

void Digikam::TreeViewLineEditComboBox::setLineEdit ( QLineEdit *  edit)
inherited

◆ setLineEditText()

void Digikam::TreeViewLineEditComboBox::setLineEditText ( const QString &  text)
inherited

Set the text of the line edit (the text that is visible if the popup is not opened). Applicable only for default installLineEdit() implementation.

References Digikam::TreeViewLineEditComboBox::m_comboLineEdit.

Referenced by Digikam::AlbumSelectComboBox::updateText().

◆ setNoSelectionText()

void Digikam::AlbumSelectComboBox::setNoSelectionText ( const QString &  text)
inherited

Sets the text that is used to describe the state when no album is selected. This may be something like "Any album" or "No tag selected". Depends on the default line edit implementation of TreeViewLineEditComboBox.

References Digikam::AlbumSelectComboBox::updateText().

Referenced by Digikam::SearchFieldAlbum::setupValueWidgets().

◆ setParentTag

void Digikam::AddTagsComboBox::setParentTag ( TAlbum *const  album)
slot

Set a parent tag for suggesting a parent tag for a new tag, and a default action.

Referenced by Digikam::AssignNameWidget::setParentTag().

◆ setPlaceholderText()

void Digikam::AddTagsComboBox::setPlaceholderText ( const QString &  message)

◆ setShowCheckStateSummary()

void Digikam::AlbumSelectComboBox::setShowCheckStateSummary ( bool  show)
inherited

If the box is checkable, enable showing a resume a la "3 Albums checked" in the combo box text. Default: True

References Digikam::AlbumSelectComboBox::updateText().

◆ setText()

void Digikam::AddTagsComboBox::setText ( const QString &  text)

References text().

◆ setTreeView()

void Digikam::AbstractAlbumTreeViewSelectComboBox::setTreeView ( AbstractAlbumTreeView *const  treeView)
inherited

Set a tree view created by you instead of creating a default view (in the subclasses). Only takes effect before calling setModel.

References Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView.

◆ showPopup()

void Digikam::ModelIndexBasedComboBox::showPopup ( )
overrideinherited

◆ slotLineEditActionActivated

void Digikam::AddTagsComboBox::slotLineEditActionActivated ( const TaggingAction action)
protectedslot

References taggingActionActivated().

Referenced by AddTagsComboBox().

◆ slotLineEditActionSelected

void Digikam::AddTagsComboBox::slotLineEditActionSelected ( const TaggingAction action)
protectedslot

References taggingActionSelected().

Referenced by AddTagsComboBox().

◆ slotViewIndexActivated

void Digikam::AddTagsComboBox::slotViewIndexActivated ( const QModelIndex &  index)
protectedslot

◆ taggingActionActivated

void Digikam::AddTagsComboBox::taggingActionActivated ( const TaggingAction action)
signal

Emitted when the user activates an action (typically, by pressing return)

Referenced by AddTagsComboBox(), and slotLineEditActionActivated().

◆ taggingActionSelected

void Digikam::AddTagsComboBox::taggingActionSelected ( const TaggingAction action)
signal

Emitted when an action is selected, but not explicitly activated. (typically by selecting an item in the tree view

Referenced by AddTagsComboBox(), slotLineEditActionSelected(), and slotViewIndexActivated().

◆ text()

QString Digikam::AddTagsComboBox::text ( ) const

Referenced by AddTagsComboBox(), and setText().

◆ updateText

void Digikam::AlbumSelectComboBox::updateText ( )
virtualslotinherited

◆ view()

Member Data Documentation

◆ m_comboLineEdit

QLineEdit* Digikam::TreeViewLineEditComboBox::m_comboLineEdit
protectedinherited

◆ m_currentIndex

◆ m_treeView

◆ m_view


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