Akonadi

tagselectiondialog.h
1/*
2 This file is part of Akonadi
3
4 SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "akonadiwidgets_export.h"
12
13// AkonadiCore
14#include "akonadi/tag.h"
15
16#include <QDialog>
17
18#include <memory>
19
21namespace Akonadi
22{
23class TagModel;
24class TagSelectionDialogPrivate;
25
26/**
27 * A widget that shows a tag selection and provides means to edit that selection.
28 *
29 * TODO A standalone dialog version that takes an item and takes care of writing back the changes would be useful.
30 * @since 4.13
31 */
32class AKONADIWIDGETS_EXPORT TagSelectionDialog : public QDialog
33{
34 Q_OBJECT
35public:
36 explicit TagSelectionDialog(QWidget *parent = nullptr);
37 TagSelectionDialog(TagModel *model, QWidget *parent = nullptr);
38 ~TagSelectionDialog() override;
39
40 void setSelection(const Akonadi::Tag::List &tags);
41 [[nodiscard]] Akonadi::Tag::List selection() const;
42
43 [[nodiscard]] QDialogButtonBox *buttons() const;
44
45Q_SIGNALS:
46 void selectionChanged(const Akonadi::Tag::List &tags);
47
48private:
49 std::unique_ptr<TagSelectionDialogPrivate> const d;
50};
51
52}
A widget that shows a tag selection and provides means to edit that selection.
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 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.