JS8Call-Improved master
Loading...
Searching...
No Matches
CheckableItemComboBox Class Reference

A ComboBox that displays multiple checkable items and summarizes selection. More...

#include <CheckableItemComboBox.h>

Inheritance diagram for CheckableItemComboBox:
Collaboration diagram for CheckableItemComboBox:

Public Member Functions

 CheckableItemComboBox (QWidget *parent=nullptr)
 Construct the widget.
QStandardItem * addCheckItem (QString const &label, QVariant const &data, Qt::CheckState checkState)
 Add a checkable item to the combobox model.
Public Member Functions inherited from LazyFillComboBox
Q_SIGNAL void about_to_show_popup ()
 Emitted immediately before the popup is shown.
Q_SIGNAL void popup_hidden ()
 Emitted after the popup has been hidden.
 LazyFillComboBox (QWidget *parent=nullptr)
 Construct a LazyFillComboBox.
void showPopup () override
 Override to emit about_to_show_popup() before showing.
void hidePopup () override
 Override to emit popup_hidden() after hiding the popup.

Protected Member Functions

bool eventFilter (QObject *, QEvent *) override
 Event filter to intercept model and item events.

Detailed Description

A ComboBox that displays multiple checkable items and summarizes selection.

Items added via addCheckItem() are represented by QStandardItems with check states; the widget updates its displayed text to reflect selected entries and forwards item press events to update the model state.

Constructor & Destructor Documentation

◆ CheckableItemComboBox()

CheckableItemComboBox::CheckableItemComboBox ( QWidget * parent = nullptr)
explicit

Construct the widget.

Parameters
parentOptional parent widget.
Here is the call graph for this function:

Member Function Documentation

◆ addCheckItem()

QStandardItem * CheckableItemComboBox::addCheckItem ( QString const & label,
QVariant const & data,
Qt::CheckState checkState )

Add a checkable item to the combobox model.

Parameters
labelVisible item label.
dataAssociated user data.
checkStateInitial check state for the item.
Returns
The created QStandardItem pointer.

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