1 | /* |
2 | Copyright (c) 2007 Volker Krause <vkrause@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or (at your |
7 | option) any later version. |
8 | |
9 | This library is distributed in the hope that it will be useful, but WITHOUT |
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
12 | License for more details. |
13 | |
14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to the |
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. |
18 | */ |
19 | |
20 | #ifndef AKONADI_SUBSCRIPTIONDIALOG_P_H |
21 | #define AKONADI_SUBSCRIPTIONDIALOG_P_H |
22 | |
23 | #include "akonadi_export.h" |
24 | |
25 | #include <kdialog.h> |
26 | |
27 | namespace Akonadi { |
28 | |
29 | /** |
30 | * @internal |
31 | * |
32 | * Local subsription dialog. |
33 | */ |
34 | class AKONADI_EXPORT SubscriptionDialog : public KDialog |
35 | { |
36 | Q_OBJECT |
37 | public: |
38 | /** |
39 | * Creates a new subscription dialog. |
40 | * |
41 | * @param parent The parent widget. |
42 | */ |
43 | explicit SubscriptionDialog(QWidget *parent = 0); |
44 | |
45 | /** |
46 | * Creates a new subscription dialog. |
47 | * |
48 | * @param parent The parent widget. |
49 | * @param mimetypes The specific mimetypes |
50 | * @since 4.6 |
51 | */ |
52 | explicit SubscriptionDialog(const QStringList &mimetypes, QWidget *parent = 0); |
53 | |
54 | /** |
55 | * Destroys the subscription dialog. |
56 | * |
57 | * @note Don't call the destructor manually, the dialog will |
58 | * be destructed automatically as soon as all changes |
59 | * are written back to the server. |
60 | */ |
61 | ~SubscriptionDialog(); |
62 | |
63 | /** |
64 | * @param showHidden shows hidden collections if set as @c true |
65 | * @since 4.9 |
66 | */ |
67 | void showHiddenCollection(bool showHidden); |
68 | |
69 | private: |
70 | class Private; |
71 | Private *const d; |
72 | |
73 | void init(const QStringList &mimetypes); |
74 | |
75 | Q_PRIVATE_SLOT(d, void done()) |
76 | Q_PRIVATE_SLOT(d, void subscriptionResult(KJob *job)) |
77 | Q_PRIVATE_SLOT(d, void modelLoaded()) |
78 | Q_PRIVATE_SLOT(d, void slotSetPattern(const QString &)) |
79 | Q_PRIVATE_SLOT(d, void slotSetIncludeCheckedOnly(bool)) |
80 | Q_PRIVATE_SLOT(d, void slotUnSubscribe()) |
81 | Q_PRIVATE_SLOT(d, void slotSubscribe()) |
82 | }; |
83 | |
84 | } |
85 | |
86 | #endif |
87 | |