![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Inheritance diagram for Digikam::TreeViewLineEditComboBox:Public Member Functions | |
| TreeViewLineEditComboBox (QWidget *const parent=nullptr) | |
| This class provides a TreeViewComboBox with a read-only line edit. | |
| void | installView (QAbstractItemView *view=nullptr) override |
| Replace the standard combo box list view with a QTreeView. | |
| void | setLineEdit (QLineEdit *edit) |
| void | setLineEditText (const QString &text) |
| Set the text of the line edit (the text that is visible if the popup is not opened). | |
Public Member Functions inherited from Digikam::TreeViewComboBox | |
| TreeViewComboBox (QWidget *parent=nullptr) | |
| This class provides a QComboBox with a QTreeView instead of the usual QListView. | |
| virtual QTreeView * | 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 | |
| virtual void | installLineEdit () |
| Sets a line edit. | |
Protected Member Functions inherited from Digikam::TreeViewComboBox | |
| 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. | |
Protected Attributes | |
| QLineEdit * | m_comboLineEdit = nullptr |
Protected Attributes inherited from Digikam::StayPoppedUpComboBox | |
| QAbstractItemView * | m_view = nullptr |
Protected Attributes inherited from Digikam::ModelIndexBasedComboBox | |
| QPersistentModelIndex | m_currentIndex |
|
explicit |
The text in the line edit can be adjusted. The combo box will open on a click on the line edit. 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.
|
protectedvirtual |
Called by installView(). The default implementation is described above. An empty implementation will keep the default QComboBox line edit.
|
overridevirtual |
Call this after installing an appropriate model.
Reimplemented from Digikam::TreeViewComboBox.
| void Digikam::TreeViewLineEditComboBox::setLineEditText | ( | const QString & | text | ) |
Applicable only for default installLineEdit() implementation.