digiKam
|
Public Slots | |
void | hidePopup () override |
virtual void | updateText () |
Public Member Functions | |
void | addCheckUncheckContextMenuActions () |
AlbumTreeViewSelectComboBox (QWidget *const parent=nullptr) | |
QModelIndex | currentIndex () const |
QSortFilterProxyModel * | filterModel () const |
bool | isCheckable () const |
AbstractCheckableAlbumModel * | model () const |
void | setAlbumModels (AbstractCheckableAlbumModel *model, AlbumFilterModel *filterModel=nullptr) |
void | setAlbumModels (AlbumModel *model, CheckableAlbumFilterModel *filterModel=nullptr) |
void | setCheckable (bool checkable) |
void | setCloseOnActivate (bool close) |
void | setCurrentIndex (const QModelIndex &index) |
void | setDefaultAlbumModel () |
void | setDefaultModel () |
void | setDefaultTagModel () |
void | setLineEdit (QLineEdit *edit) |
void | setLineEditText (const QString &text) |
void | setNoSelectionText (const QString &text) |
void | setShowCheckStateSummary (bool show) |
void | setTreeView (AbstractAlbumTreeView *const treeView) |
void | showPopup () override |
AlbumTreeView * | view () const |
Protected Member Functions | |
bool | eventFilter (QObject *watched, 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 |
AbstractAlbumTreeView * | m_treeView |
QAbstractItemView * | m_view |
|
explicit |
|
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().
|
inherited |
References Digikam::ModelIndexBasedComboBox::m_currentIndex.
Referenced by Digikam::AddTagsComboBox::setCurrentTag().
|
overrideprotectedinherited |
References Digikam::StayPoppedUpComboBox::m_view, and Digikam::StayPoppedUpComboBox::sendViewportEventToView().
Referenced by Digikam::AddTagsComboBox::eventFilter().
|
inherited |
Return the filter model in use.
Referenced by Digikam::AlbumSelectComboBox::setAlbumModels(), setAlbumModels(), Digikam::AddTagsComboBox::setAlbumModels(), and Digikam::TagTreeViewSelectComboBox::setAlbumModels().
|
overrideslotinherited |
|
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().
|
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().
|
inherited |
|
inherited |
Returns the source model. Retrieve selection information from here.
Referenced by Digikam::AlbumSelectComboBox::setAlbumModels(), setAlbumModels(), Digikam::AddTagsComboBox::setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), and Digikam::SearchFieldAlbum::setupValueWidgets().
|
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().
|
inherited |
References Digikam::AlbumSelectComboBox::filterModel(), Digikam::AlbumSelectComboBox::installView(), Digikam::AlbumSelectComboBox::model(), and Digikam::AlbumSelectComboBox::updateText().
Referenced by setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), Digikam::AlbumSelectComboBox::setDefaultAlbumModel(), and Digikam::AlbumSelectComboBox::setDefaultTagModel().
void Digikam::AlbumTreeViewSelectComboBox::setAlbumModels | ( | AlbumModel * | model, |
CheckableAlbumFilterModel * | filterModel = nullptr |
||
) |
References Digikam::AlbumSelectComboBox::filterModel(), Digikam::AbstractAlbumModel::IgnoreRootAlbum, Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView, Digikam::AlbumSelectComboBox::model(), Digikam::AlbumTreeView::setAlbumFilterModel(), Digikam::AlbumTreeView::setAlbumModel(), Digikam::AlbumSelectComboBox::setAlbumModels(), and view().
Referenced by setDefaultModel().
|
inherited |
Enable checkboxes next to the items. Default: true
Referenced by Digikam::AddTagsComboBox::AddTagsComboBox().
|
inherited |
Enable closing when an item was activated (clicked). Default: false.
Referenced by Digikam::AddTagsComboBox::AddTagsComboBox().
|
inherited |
References Digikam::ModelIndexBasedComboBox::m_currentIndex.
Referenced by Digikam::RatingComboBox::ratingWidgetChanged(), and Digikam::RatingComboBox::setRatingValue().
|
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().
void Digikam::AlbumTreeViewSelectComboBox::setDefaultModel | ( | ) |
References setAlbumModels().
Referenced by Digikam::SearchFieldAlbum::setupValueWidgets().
|
inherited |
|
inherited |
|
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().
|
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().
|
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().
|
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.
|
overrideinherited |
References Digikam::ModelIndexBasedComboBox::m_currentIndex.
Referenced by Digikam::ChoiceSearchComboBox::labelClicked().
|
virtualslotinherited |
Updates the text describing the selection ("3 Albums selected"). Can be overridden to customize the default text.
References Digikam::TreeViewLineEditComboBox::setLineEditText(), and Digikam::Album::TAG.
Referenced by Digikam::AlbumSelectComboBox::AlbumSelectComboBox(), Digikam::AlbumSelectComboBox::hidePopup(), Digikam::AlbumSelectComboBox::setAlbumModels(), Digikam::AlbumSelectComboBox::setNoSelectionText(), and Digikam::AlbumSelectComboBox::setShowCheckStateSummary().
AlbumTreeView * Digikam::AlbumTreeViewSelectComboBox::view | ( | ) | const |
References Digikam::AbstractAlbumTreeViewSelectComboBox::m_treeView.
Referenced by setAlbumModels().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by Digikam::AbstractAlbumTreeViewSelectComboBox::addCheckUncheckContextMenuActions(), Digikam::AddTagsComboBox::AddTagsComboBox(), Digikam::AbstractAlbumTreeViewSelectComboBox::installView(), Digikam::AbstractAlbumTreeViewSelectComboBox::sendViewportEventToView(), setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), Digikam::AbstractAlbumTreeViewSelectComboBox::setTreeView(), view(), and Digikam::TagTreeViewSelectComboBox::view().
|
protectedinherited |
Referenced by Digikam::StayPoppedUpComboBox::eventFilter(), Digikam::StayPoppedUpComboBox::installView(), Digikam::TreeViewComboBox::sendViewportEventToView(), Digikam::ListViewComboBox::sendViewportEventToView(), Digikam::StayPoppedUpComboBox::StayPoppedUpComboBox(), Digikam::TreeViewComboBox::view(), and Digikam::ListViewComboBox::view().