digiKam
|
Public Slots | |
void | hidePopup () override |
virtual void | updateText () |
Public Member Functions | |
AbstractAlbumTreeViewSelectComboBox (QWidget *const parent=nullptr) | |
void | addCheckUncheckContextMenuActions () |
QModelIndex | currentIndex () const |
QSortFilterProxyModel * | filterModel () const |
bool | isCheckable () const |
AbstractCheckableAlbumModel * | model () const |
void | setAlbumModels (AbstractCheckableAlbumModel *model, AlbumFilterModel *filterModel=nullptr) |
void | setCheckable (bool checkable) |
void | setCloseOnActivate (bool close) |
void | setCurrentIndex (const QModelIndex &index) |
void | setDefaultAlbumModel () |
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 |
QTreeView * | 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 |
Abstract class. This is an AlbumSelectComboBox which installs an AlbumTreeView, not a plain QTreeView, as view.
void Digikam::AbstractAlbumTreeViewSelectComboBox::addCheckUncheckContextMenuActions | ( | ) |
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(), 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(), Digikam::AlbumTreeViewSelectComboBox::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().
|
overrideprotectedvirtual |
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(), m_treeView, and Digikam::TreeViewComboBox::view().
|
inherited |
|
inherited |
Returns the source model. Retrieve selection information from here.
Referenced by Digikam::AlbumSelectComboBox::setAlbumModels(), Digikam::AlbumTreeViewSelectComboBox::setAlbumModels(), Digikam::AddTagsComboBox::setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), and Digikam::SearchFieldAlbum::setupValueWidgets().
|
overrideprotectedvirtual |
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 m_treeView, and Digikam::AbstractAlbumTreeView::viewportEvent().
|
inherited |
References Digikam::AlbumSelectComboBox::filterModel(), Digikam::AlbumSelectComboBox::installView(), Digikam::AlbumSelectComboBox::model(), and Digikam::AlbumSelectComboBox::updateText().
Referenced by Digikam::AlbumTreeViewSelectComboBox::setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), Digikam::AlbumSelectComboBox::setDefaultAlbumModel(), and Digikam::AlbumSelectComboBox::setDefaultTagModel().
|
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().
|
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().
void Digikam::AbstractAlbumTreeViewSelectComboBox::setTreeView | ( | AbstractAlbumTreeView *const | treeView | ) |
Set a tree view created by you instead of creating a default view (in the subclasses). Only takes effect before calling setModel.
References 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().
|
inherited |
Returns the QTreeView of this class. Valid after installView() has been called
References Digikam::StayPoppedUpComboBox::m_view.
Referenced by Digikam::TreeViewComboBox::installView(), Digikam::AlbumSelectComboBox::installView(), installView(), Digikam::TreeViewLineEditComboBox::installView(), and Digikam::AlbumSelectComboBox::setDefaultAlbumModel().
|
protectedinherited |
|
protectedinherited |
|
protected |
Referenced by addCheckUncheckContextMenuActions(), Digikam::AddTagsComboBox::AddTagsComboBox(), installView(), sendViewportEventToView(), Digikam::AlbumTreeViewSelectComboBox::setAlbumModels(), Digikam::TagTreeViewSelectComboBox::setAlbumModels(), setTreeView(), Digikam::AlbumTreeViewSelectComboBox::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().