Akonadi

tagselectiondialog.h
1 /*
2  This file is part of Akonadi
3 
4  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
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 
20 class QDialogButtonBox;
21 namespace Akonadi
22 {
23 class TagModel;
24 class 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  */
32 class AKONADIWIDGETS_EXPORT TagSelectionDialog : public QDialog
33 {
34  Q_OBJECT
35 public:
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  Q_REQUIRED_RESULT Akonadi::Tag::List selection() const;
42 
43  Q_REQUIRED_RESULT QDialogButtonBox *buttons() const;
44 
45 Q_SIGNALS:
46  void selectionChanged(const Akonadi::Tag::List &tags);
47 
48 private:
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-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:01:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.