digiKam
Digikam::ChoiceSearchComboBox Class Reference
+ Inheritance diagram for Digikam::ChoiceSearchComboBox:

Signals

void checkStateChanged ()
 

Public Member Functions

 ChoiceSearchComboBox (QWidget *const parent=nullptr)
 
QModelIndex currentIndex () const
 
void hidePopup () override
 
DSqueezedClickLabellabel () const
 
ChoiceSearchModelmodel () const
 
void setCurrentIndex (const QModelIndex &index)
 
void setLabelText (const QString &text)
 
void setSearchModel (ChoiceSearchModel *model)
 
void showPopup () override
 
QListView * view () const
 

Protected Slots

void labelClicked ()
 

Protected Member Functions

bool eventFilter (QObject *watched, QEvent *event) override
 
void installView (QAbstractItemView *view=nullptr) override
 
void sendViewportEventToView (QEvent *e) override
 

Protected Attributes

QPersistentModelIndex m_currentIndex
 
DSqueezedClickLabelm_label
 
QAbstractItemView * m_view
 

Constructor & Destructor Documentation

◆ ChoiceSearchComboBox()

Digikam::ChoiceSearchComboBox::ChoiceSearchComboBox ( QWidget *const  parent = nullptr)
explicit

A combo box for entering a choice of values. Operates on a ChoiceSearchModel. After constructing the object, call setModel with your model.

Member Function Documentation

◆ checkStateChanged

void Digikam::ChoiceSearchComboBox::checkStateChanged ( )
signal

◆ currentIndex()

QModelIndex Digikam::ModelIndexBasedComboBox::currentIndex ( ) const
inherited

◆ eventFilter()

bool Digikam::StayPoppedUpComboBox::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotectedinherited

◆ hidePopup()

void Digikam::ModelIndexBasedComboBox::hidePopup ( )
overrideinherited

◆ installView()

void Digikam::ChoiceSearchComboBox::installView ( QAbstractItemView *  view = nullptr)
overrideprotectedvirtual

Replace the standard combo box list view with a QTreeView. Call this after installing an appropriate model.

Reimplemented from Digikam::ListViewComboBox.

References Digikam::ListViewComboBox::installView(), labelClicked(), m_label, Digikam::DAdjustableLabel::setElideMode(), Digikam::ProxyLineEdit::setWidget(), and Digikam::ListViewComboBox::view().

Referenced by setSearchModel().

◆ label()

DSqueezedClickLabel * Digikam::ChoiceSearchComboBox::label ( ) const

◆ labelClicked

void Digikam::ChoiceSearchComboBox::labelClicked ( )
protectedslot

◆ model()

ChoiceSearchModel * Digikam::ChoiceSearchComboBox::model ( ) const

Referenced by setSearchModel().

◆ sendViewportEventToView()

void Digikam::ListViewComboBox::sendViewportEventToView ( QEvent *  e)
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.

◆ setCurrentIndex()

void Digikam::ModelIndexBasedComboBox::setCurrentIndex ( const QModelIndex &  index)
inherited

◆ setLabelText()

void Digikam::ChoiceSearchComboBox::setLabelText ( const QString &  text)

Updates the text on the line edit area.

References m_label, and Digikam::DAdjustableLabel::setAdjustedText().

Referenced by Digikam::SearchFieldChoice::updateComboText().

◆ setSearchModel()

void Digikam::ChoiceSearchComboBox::setSearchModel ( ChoiceSearchModel model)

Sets the model and initializes the widget. Can only be called once for a widget.

References installView(), and model().

Referenced by Digikam::SearchFieldChoice::setupValueWidgets().

◆ showPopup()

void Digikam::ModelIndexBasedComboBox::showPopup ( )
overrideinherited

◆ view()

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

Returns the QTreeView of this class. Valid after installView() has been called.

References Digikam::StayPoppedUpComboBox::m_view.

Referenced by Digikam::ListViewComboBox::installView(), and installView().

Member Data Documentation

◆ m_currentIndex

◆ m_label

DSqueezedClickLabel* Digikam::ChoiceSearchComboBox::m_label
protected

Referenced by installView(), label(), and setLabelText().

◆ m_view


The documentation for this class was generated from the following files: