Akonadi

tagwidget.h
1 /*
2  This file is part of Akonadi
3 
4  SPDX-FileCopyrightText: 2010 Tobias Koenig <[email protected]>
5  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #pragma once
11 
12 #include "akonadiwidgets_export.h"
13 // AkonadiCore
14 #include <akonadi/tag.h>
15 
16 #include <QLineEdit>
17 
18 #include <memory>
19 
20 namespace Akonadi
21 {
22 class TagWidgetPrivate;
23 
24 /**
25  * A widget that shows a tag selection and provides means to edit that selection.
26  *
27  * TODO A standalone dialog version that takes an item and takes care of writing back the changes would be useful.
28  * @since 4.13
29  */
30 class AKONADIWIDGETS_EXPORT TagWidget : public QWidget
31 {
32  Q_OBJECT
33 public:
34  explicit TagWidget(QWidget *parent = nullptr);
35  ~TagWidget() override;
36 
37  void setSelection(const Akonadi::Tag::List &tags);
38  Q_REQUIRED_RESULT Akonadi::Tag::List selection() const;
39 
40  void clearTags();
41  void setReadOnly(bool readOnly);
42 Q_SIGNALS:
43  void selectionChanged(const Akonadi::Tag::List &tags);
44 
45 private Q_SLOTS:
46  void editTags();
47  void updateView();
48 
49 private:
50  std::unique_ptr<TagWidgetPrivate> const d;
51 };
52 
53 }
54 
A widget that shows a tag selection and provides means to edit that selection.
Definition: tagwidget.h:30
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:01:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.