![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Member Functions | |
TreeViewComboBox (QWidget *parent=nullptr) | |
This class provides a QComboBox with a QTreeView instead of the usual QListView. | |
virtual void | installView (QAbstractItemView *view=nullptr) |
Replace the standard combo box list view with a QTreeView. | |
virtual QTreeView * | view () const |
Returns the QTreeView of this class. | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
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 | |
![]() | |
QAbstractItemView * | m_view = nullptr |
![]() | |
QPersistentModelIndex | m_currentIndex |
|
explicit |
You need three steps: Construct the object, call setModel() with an appropriate QAbstractItemModel, then call installView() to replace the standard combo box view with a QTreeView.
|
virtual |
Call this after installing an appropriate model.
Reimplemented in Digikam::AlbumSelectComboBox, Digikam::AbstractAlbumTreeViewSelectComboBox, and Digikam::TreeViewLineEditComboBox.
|
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.
|
virtual |
Valid after installView() has been called