Akonadi::TagSelectionComboBox Class

The TagSelectionCombo class. More...

Header: #include <Akonadi/TagSelectionComboBox>
CMake: find_package(KPim6 REQUIRED COMPONENTS AkonadiWidgets)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiWidgets)

Public Functions

TagSelectionComboBox(QWidget *parent = nullptr)
virtual ~TagSelectionComboBox() override
bool checkable() const
Akonadi::Tag::List selection() const
QStringList selectionNames() const
void setCheckable(bool checkable)
void setSelection(const Akonadi::Tag::List &selection)
void setSelection(const QStringList &selection)

Reimplemented Public Functions

virtual void hidePopup() override

Signals

void selectionChanged(const Akonadi::Tag::List &selection)

Reimplemented Protected Functions

virtual bool eventFilter(QObject *receiver, QEvent *event) override
virtual void keyPressEvent(QKeyEvent *event) override

Detailed Description

Member Function Documentation

[explicit] TagSelectionComboBox::TagSelectionComboBox(QWidget *parent = nullptr)

Creates a new tag selection combobox. parent The parent widget.

[override virtual noexcept] TagSelectionComboBox::~TagSelectionComboBox()

Destroys the tag selection combobox.

bool TagSelectionComboBox::checkable() const

Returns whether tag selection with checkboxes is enabled. Returns True if checkbox selection is enabled, false otherwise.

See also setCheckable().

[override virtual protected] bool TagSelectionComboBox::eventFilter(QObject *receiver, QEvent *event)

Filters events for the given object. receiver The object whose events are being filtered. event The event to filter. Returns True if the event should be filtered, false otherwise.

[override virtual] void TagSelectionComboBox::hidePopup()

Hides the combobox popup.

[override virtual protected] void TagSelectionComboBox::keyPressEvent(QKeyEvent *event)

Handles key press events. event The key event to handle.

Akonadi::Tag::List TagSelectionComboBox::selection() const

Returns the list of currently selected tags. Returns A list of selected Tag objects.

See also setSelection().

[signal] void TagSelectionComboBox::selectionChanged(const Akonadi::Tag::List &selection)

Emitted when the tag selection has changed. selection The new list of selected tags.

QStringList TagSelectionComboBox::selectionNames() const

Returns the names of currently selected tags. Returns A list of tag name strings.

void TagSelectionComboBox::setCheckable(bool checkable)

Sets whether tags can be selected with checkboxes. checkable True to enable checkbox selection, false otherwise.

See also checkable().

void TagSelectionComboBox::setSelection(const Akonadi::Tag::List &selection)

Sets the selected tags. selection The list of tags to select.

See also selection().

void TagSelectionComboBox::setSelection(const QStringList &selection)

Sets the selected tags by name. selection The list of tag name strings to select.