File indexing completed on 2024-05-26 05:14:44

0001 /*
0002     SPDX-FileCopyrightText: 2007 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "akonadiwidgets_export.h"
0010 
0011 #include <QDialog>
0012 
0013 #include <memory>
0014 
0015 namespace Akonadi
0016 {
0017 class SubscriptionDialogPrivate;
0018 
0019 /**
0020  * Local subscription dialog.
0021  */
0022 class AKONADIWIDGETS_EXPORT SubscriptionDialog : public QDialog
0023 {
0024     Q_OBJECT
0025 public:
0026     /**
0027      * Creates a new subscription dialog.
0028      *
0029      * @param parent The parent widget.
0030      */
0031     explicit SubscriptionDialog(QWidget *parent = nullptr);
0032 
0033     /**
0034      * Creates a new subscription dialog.
0035      *
0036      * @param parent The parent widget.
0037      * @param mimetypes The specific mimetypes
0038      * @since 4.6
0039      */
0040     explicit SubscriptionDialog(const QStringList &mimetypes, QWidget *parent = nullptr);
0041 
0042     /**
0043      * Destroys the subscription dialog.
0044      *
0045      * @note Don't call the destructor manually, the dialog will
0046      *       be destructed automatically as soon as all changes
0047      *       are written back to the server.
0048      */
0049     ~SubscriptionDialog() override;
0050 
0051     /**
0052      * @param showHidden shows hidden collections if set as @c true
0053      * @since 4.9
0054      */
0055     void showHiddenCollection(bool showHidden);
0056 
0057 private:
0058     std::unique_ptr<SubscriptionDialogPrivate> const d;
0059 };
0060 
0061 }