1 | /* |
2 | This file is part of Akonadi |
3 | |
4 | Copyright (c) 2014 Christian Mollekopf <mollekopf@kolabsys.com> |
5 | |
6 | This library is free software; you can redistribute it and/or modify it |
7 | under the terms of the GNU Library General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or (at your |
9 | option) any later version. |
10 | |
11 | This library is distributed in the hope that it will be useful, but WITHOUT |
12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
14 | License for more details. |
15 | |
16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to the |
18 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
19 | 02110-1301, USA. |
20 | */ |
21 | |
22 | #ifndef AKONADI_TAGSELECTIONDIALOG_H |
23 | #define AKONADI_TAGSELECTIONDIALOG_H |
24 | |
25 | #include "akonadi_export.h" |
26 | |
27 | #include <KDialog> |
28 | #include "akonadi/tag.h" |
29 | |
30 | namespace Akonadi { |
31 | |
32 | /** |
33 | * A widget that shows a tag selection and provides means to edit that selection. |
34 | * |
35 | * TODO A standalone dialog version that takes an item and takes care of writing back the changes would be useful. |
36 | * @since 4.13 |
37 | */ |
38 | class AKONADI_EXPORT TagSelectionDialog : public KDialog |
39 | { |
40 | Q_OBJECT |
41 | public: |
42 | explicit TagSelectionDialog(QWidget *parent = 0); |
43 | virtual ~TagSelectionDialog(); |
44 | |
45 | void setSelection(const Akonadi::Tag::List &tags); |
46 | Akonadi::Tag::List selection() const; |
47 | |
48 | Q_SIGNALS: |
49 | void selectionChanged(const Akonadi::Tag::List &tags); |
50 | |
51 | private: |
52 | class Private; |
53 | QSharedPointer<Private> d; |
54 | }; |
55 | |
56 | } |
57 | |
58 | #endif |
59 | |