Akonadi

tagselectwidget.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include "akonadiwidgets_export.h"
10// AkonadiCore
11#include "akonadi/tag.h"
12
13#include <QWidget>
14
15#include <memory>
16
17namespace Akonadi
18{
19class TagSelectWidgetPrivate;
20
21/**
22 * A widget that offers facilities to add/remove tags and provides a way to select tags.
23 *
24 * @since 4.14.6
25 */
26
27class AKONADIWIDGETS_EXPORT TagSelectWidget : public QWidget
28{
29 Q_OBJECT
30public:
31 explicit TagSelectWidget(QWidget *parent = nullptr);
32 ~TagSelectWidget() override;
33
34 void setSelection(const Akonadi::Tag::List &tags);
35 [[nodiscard]] Akonadi::Tag::List selection() const;
36
37 /**
38 * @brief tagToStringList
39 * @return QStringList from selected tag (List of Url)
40 */
41 [[nodiscard]] QStringList tagToStringList() const;
42 /**
43 * @brief setSelectionFromStringList, convert a QStringList to Tag (converted from url)
44 */
45 void setSelectionFromStringList(const QStringList &lst);
46
47private:
48 /// @cond PRIVATE
49 std::unique_ptr<TagSelectWidgetPrivate> const d;
50 /// @endcond
51};
52}
A widget that offers facilities to add/remove tags and provides a way to select tags.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.