Akonadi::TagEditWidget Class
| Header: | #include <Akonadi/TagEditWidget> |
| CMake: | find_package(KPim6 REQUIRED COMPONENTS AkonadiWidgets)target_link_libraries(mytarget PRIVATE KPim6::AkonadiWidgets) |
Public Functions
| TagEditWidget(QWidget *parent = nullptr) | |
| TagEditWidget(Akonadi::TagModel *model, QWidget *parent = nullptr, bool enableSelection = false) | |
| virtual | ~TagEditWidget() override |
| Akonadi::TagModel * | model() const |
| Akonadi::Tag::List | selection() const |
| bool | selectionEnabled() const |
| void | setModel(Akonadi::TagModel *model) |
| void | setSelection(const Akonadi::Tag::List &tags) |
| void | setSelectionEnabled(bool enabled) |
Detailed Description
A widget that offers facilities to add/remove tags and optionally provides a way to select tags.
Member Function Documentation
[explicit] TagEditWidget::TagEditWidget(QWidget *parent = nullptr)
Creates a new tag edit widget. parent The parent widget.
[explicit] TagEditWidget::TagEditWidget(Akonadi::TagModel *model, QWidget *parent = nullptr, bool enableSelection = false)
Creates a new tag edit widget with the given tag model. model The tag model to use. parent The parent widget. enableSelection Whether to enable tag selection.
[override virtual noexcept] TagEditWidget::~TagEditWidget()
Destroys the tag edit widget.
Akonadi::TagModel *TagEditWidget::model() const
Returns the currently used tag model. Returns The tag model.
See also setModel().
Akonadi::Tag::List TagEditWidget::selection() const
Returns the currently selected tags. Returns A list of selected tags.
See also setSelection().
bool TagEditWidget::selectionEnabled() const
Returns whether tag selection is enabled. Returns True if selection is enabled, false otherwise.
See also setSelectionEnabled().
void TagEditWidget::setModel(Akonadi::TagModel *model)
Sets the tag model for this widget. model The tag model to use.
See also model().
void TagEditWidget::setSelection(const Akonadi::Tag::List &tags)
Sets the selected tags. tags The list of tags to select.
See also selection().
void TagEditWidget::setSelectionEnabled(bool enabled)
Sets whether tag selection is enabled. enabled True to enable selection, false otherwise.
See also selectionEnabled().