Akonadi

tagwidget.h
1/*
2 This file is part of Akonadi
3
4 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
5 SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
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
20namespace Akonadi
21{
22class 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 */
30class AKONADIWIDGETS_EXPORT TagWidget : public QWidget
31{
32 Q_OBJECT
33public:
34 explicit TagWidget(QWidget *parent = nullptr);
35 ~TagWidget() override;
36
37 void setSelection(const Akonadi::Tag::List &tags);
38 [[nodiscard]] Akonadi::Tag::List selection() const;
39
40 void clearTags();
41 void setReadOnly(bool readOnly);
42Q_SIGNALS:
43 void selectionChanged(const Akonadi::Tag::List &tags);
44
45private:
46 void updateView();
47 void editTags();
48 std::unique_ptr<TagWidgetPrivate> const d;
49};
50
51}
A widget that shows a tag selection and provides means to edit that selection.
Definition tagwidget.h:31
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.