digiKam Developer Documentation: Digikam::ListViewComboBox Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Digikam::ListViewComboBox Class Reference
Inheritance diagram for Digikam::ListViewComboBox:

## Public Member Functions
| ListViewComboBox (QWidget *parent=nullptr)
| This class provides an implementation of a StayPoppedUpComboBox with a QListView.
virtual void | installView (QAbstractItemView *view=nullptr)
| Replace the standard combo box list view with a QTreeView.
QListView * | view () const
| Returns the QTreeView of this class.
Public Member Functions inherited from Digikam::StayPoppedUpComboBox
| StayPoppedUpComboBox (QWidget *const parent=nullptr)
| This class provides an abstract QComboBox with a custom view (which is created by implementing subclasses) instead of the usual QListView.
Public Member Functions inherited from Digikam::ModelIndexBasedComboBox
| ModelIndexBasedComboBox (QWidget *const parent=nullptr)
| QComboBox has a current index based on a single integer.
QModelIndex | currentIndex () const
void | hidePopup () override
void | setCurrentIndex (const QModelIndex &index)
void | showPopup () override

## Protected Member Functions
void | sendViewportEventToView (QEvent *e) override
| Implement in subclass: Send the given event to the viewportEvent() method of m_view.
Protected Member Functions inherited from Digikam::StayPoppedUpComboBox
bool | eventFilter (QObject *watched, QEvent *event) override
void | installView (QAbstractItemView *view)
| Replace the standard combo box list view with the given view.

## Additional Inherited Members
Protected Attributes inherited from Digikam::StayPoppedUpComboBox
QAbstractItemView * | m_view = nullptr
Protected Attributes inherited from Digikam::ModelIndexBasedComboBox
QPersistentModelIndex | m_currentIndex

## Constructor & Destructor Documentation

## ◆ ListViewComboBox()

Digikam::ListViewComboBox::ListViewComboBox | ( | QWidget * | parent = `nullptr` | ) |
| explicit

This is the standard view of a QComboBox, but in conjunction with StayPoppedUpComboBox some extra steps are needed. You need three steps: Construct the object, call setModel() with an appropriate QAbstractItemModel, then call installView().

## Member Function Documentation

## ◆ installView()

void Digikam::ListViewComboBox::installView | ( | QAbstractItemView * | view = `nullptr` | ) |
| virtual

Call this after installing an appropriate model.

Reimplemented in Digikam::ChoiceSearchComboBox.

## ◆ sendViewportEventToView()

void Digikam::ListViewComboBox::sendViewportEventToView | ( | QEvent * | e | ) |
| overrideprotectedvirtual

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.

## ◆ view()

QListView * Digikam::ListViewComboBox::view | ( |  | ) | const

Valid after installView() has been called.