File indexing completed on 2025-03-09 04:54:36

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "messageviewer_export.h"
0010 #include <QObject>
0011 #include <memory>
0012 namespace MessageViewer
0013 {
0014 class MessageViewerCheckBeforeDeletingInterface;
0015 class MessageViewerCheckBeforeDeletingPluginPrivate;
0016 /**
0017  * @brief The MessageViewerCheckBeforeDeletingPlugin class
0018  * @author Laurent Montel <montel@kde.org>
0019  */
0020 class MESSAGEVIEWER_EXPORT MessageViewerCheckBeforeDeletingPlugin : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit MessageViewerCheckBeforeDeletingPlugin(QObject *parent = nullptr);
0025     ~MessageViewerCheckBeforeDeletingPlugin() override;
0026 
0027     virtual MessageViewerCheckBeforeDeletingInterface *createInterface(QObject *parent) = 0;
0028     virtual void showConfigureDialog(QWidget *parent);
0029 
0030     void setIsEnabled(bool enabled);
0031     [[nodiscard]] bool isEnabled() const;
0032 Q_SIGNALS:
0033     void configChanged();
0034 
0035 private:
0036     std::unique_ptr<MessageViewerCheckBeforeDeletingPluginPrivate> const d;
0037 };
0038 }