Akonadi

tagselectwidget.h
1 /*
2  SPDX-FileCopyrightText: 2015-2022 Laurent Montel <[email protected]>
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 
17 namespace Akonadi
18 {
19 class 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 
27 class AKONADIWIDGETS_EXPORT TagSelectWidget : public QWidget
28 {
29  Q_OBJECT
30 public:
31  explicit TagSelectWidget(QWidget *parent = nullptr);
32  ~TagSelectWidget() override;
33 
34  void setSelection(const Akonadi::Tag::List &tags);
35  Q_REQUIRED_RESULT Akonadi::Tag::List selection() const;
36 
37  /**
38  * @brief tagToStringList
39  * @return QStringList from selected tag (List of Url)
40  */
41  Q_REQUIRED_RESULT QStringList tagToStringList() const;
42  /**
43  * @brief setSelectionFromStringList, convert a QStringList to Tag (converted from url)
44  */
45  void setSelectionFromStringList(const QStringList &lst);
46 
47 private:
48  /// @cond PRIVATE
49  std::unique_ptr<TagSelectWidgetPrivate> const d;
50  /// @endcond
51 };
52 }
53 
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-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.