digiKam
|
Public Slots | |
void | hidePopup () override |
virtual void | updateText () |
Public Member Functions | |
AlbumSelectComboBox (QWidget *const parent=nullptr) | |
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 | showPopup () override |
QTreeView * | view () const |
~AlbumSelectComboBox () override | |
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 |
QAbstractItemView * | m_view |
|
explicit |
References updateText().
|
override |
|
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().
QSortFilterProxyModel * Digikam::AlbumSelectComboBox::filterModel | ( | ) | const |
Return the filter model in use.
Referenced by setAlbumModels(), Digikam::AlbumTreeViewSelectComboBox::setAlbumModels(), Digikam::AddTagsComboBox::setAlbumModels(), and Digikam::TagTreeViewSelectComboBox::setAlbumModels().
|
overrideslot |
References Digikam::ModelIndexBasedComboBox::hidePopup(), and updateText().
|
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::TreeViewComboBox.
Reimplemented in Digikam::AbstractAlbumTreeViewSelectComboBox.
References Digikam::TreeViewLineEditComboBox::installView(), and Digikam::TreeViewComboBox::view().
Referenced by Digikam::AbstractAlbumTreeViewSelectComboBox::installView(), and setAlbumModels().
bool Digikam::AlbumSelectComboBox::isCheckable | ( | ) | const |
AbstractCheckableAlbumModel * Digikam::AlbumSelectComboBox::model | ( | ) | const |
Returns the source model. Retrieve selection information from here.
Referenced by setAlbumModels(), Digikam::AlbumTreeViewSelectComboBox::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::StayPoppedUpComboBox::m_view.
void Digikam::AlbumSelectComboBox::setAlbumModels | ( | AbstractCheckableAlbumModel * | model, |
AlbumFilterModel * | filterModel = nullptr |
||
) |
void Digikam::AlbumSelectComboBox::setCheckable | ( | bool | checkable | ) |
Enable checkboxes next to the items. Default: true
Referenced by Digikam::AddTagsComboBox::AddTagsComboBox().
void Digikam::AlbumSelectComboBox::setCloseOnActivate | ( | bool | close | ) |
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().
void Digikam::AlbumSelectComboBox::setDefaultAlbumModel | ( | ) |
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, setAlbumModels(), and Digikam::TreeViewComboBox::view().
void Digikam::AlbumSelectComboBox::setDefaultTagModel | ( | ) |
References Digikam::AbstractAlbumModel::IgnoreRootAlbum, and setAlbumModels().
|
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 updateText().
void Digikam::AlbumSelectComboBox::setNoSelectionText | ( | const QString & | text | ) |
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 updateText().
Referenced by Digikam::SearchFieldAlbum::setupValueWidgets().
void Digikam::AlbumSelectComboBox::setShowCheckStateSummary | ( | bool | show | ) |
If the box is checkable, enable showing a resume a la "3 Albums checked" in the combo box text. Default: True
References updateText().
|
overrideinherited |
References Digikam::ModelIndexBasedComboBox::m_currentIndex.
Referenced by Digikam::ChoiceSearchComboBox::labelClicked().
|
virtualslot |
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 AlbumSelectComboBox(), hidePopup(), setAlbumModels(), setNoSelectionText(), and setShowCheckStateSummary().
|
inherited |
Returns the QTreeView of this class. Valid after installView() has been called
References Digikam::StayPoppedUpComboBox::m_view.
Referenced by Digikam::TreeViewComboBox::installView(), installView(), Digikam::AbstractAlbumTreeViewSelectComboBox::installView(), Digikam::TreeViewLineEditComboBox::installView(), and setDefaultAlbumModel().
|
protectedinherited |
|
protectedinherited |
|
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().